LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I permanently mount local device? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-permanently-mount-local-device-767106/)

hmsdefender 11-05-2009 11:56 AM

How do I permanently mount local device?
 
I'm been handed the responsibility of administering my own development systems. I know very little about managing a Linux system. At present, there is an unused filesystem called /export/kits mounted on a device called /dev/sba3, but I don't see an entry in /etc/fstab for it. It mounts every time the system boots. I want to unmount /export/kits and create a root level filesystem called /apps on that device, permanently, so that /apps, not /export/kits, is associated with /dev/sda3 at boot time. Any help is appreciated.

TB0ne 11-05-2009 01:46 PM

Quote:

Originally Posted by hmsdefender (Post 3745934)
I'm been handed the responsibility of administering my own development systems. I know very little about managing a Linux system. At present, there is an unused filesystem called /export/kits mounted on a device called /dev/sba3, but I don't see an entry in /etc/fstab for it. It mounts every time the system boots. I want to unmount /export/kits and create a root level filesystem called /apps on that device, permanently, so that /apps, not /export/kits, is associated with /dev/sda3 at boot time. Any help is appreciated.

Well, the file you need to look at is /etc/fstab, as you've noted above. If /export/kits isn't in there, that may be just a directory, or perhaps /exports is mounted.

Regardless, if you open the fstab file in an editor, you should be able to look at the existing lines, and copy one, making the necessary changes. Step one would be to create the /apps directory. Step two would be to associate /dev/sda3 with /apps. A line like this:
Code:

/dev/sda3 /apps                ext3      acl,user_xattr        1 2
would be what you need. Since you don't say anything about your version/distro of Linux, can't really advise on GUI tools you might be able to use. Also, be SURE to make a backup of the /etc/fstab file before you edit it. And, be aware that it's picky....don't use spaces instead of tabs, and be VERY SURE you don't mess with the other lines in there, unless you know what you're doing.

Since you got handed the admin responsibilities, that implies that you've got other admins there. One of them can probably give you a hand, or spend five minutes with you.

MBybee 11-05-2009 02:15 PM

Quote:

Originally Posted by TB0ne (Post 3746057)
And, be aware that it's picky....don't use spaces instead of tabs, and be VERY SURE you don't mess with the other lines in there, unless you know what you're doing.

Since you got handed the admin responsibilities, that implies that you've got other admins there. One of them can probably give you a hand, or spend five minutes with you.

Actually, I've never used tabs (just formatting preference on small screens) and never had a problem - do you actually have a system that has this issue? I'm curious where it pops up.

TB0ne 11-05-2009 03:22 PM

Quote:

Originally Posted by MBybee (Post 3746098)
Actually, I've never used tabs (just formatting preference on small screens) and never had a problem - do you actually have a system that has this issue? I'm curious where it pops up.

Yep, had several. RedHat, SuSE, and Solaris....fstab is picky, in my experience.

archlinux_jessica 11-05-2009 04:03 PM

Thanks TB0ne. I always used tabs on fstab, so I never realized such a issue existed. I will keep that in mind if anyone experiences some oddities with fstab.

-Jessica-

wfh 11-05-2009 07:02 PM

Quote:

Originally Posted by hmsdefender (Post 3745934)
...there is an unused filesystem called /export/kits mounted on a device called /dev/sba3, but I don't see an entry in /etc/fstab for it. It mounts every time the system boots.

IMO, that's pretty wierd. File systems don't just mount themselves, so there must be some process at work here...cron job, perhaps?

Quote:

I want to unmount /export/kits and create a root level filesystem called /apps on that device, permanently, so that /apps, not /export/kits, is associated with /dev/sda3 at boot time. Any help is appreciated.
What happens when you unmount this filesystem? Does it grinch at being unmounted?

Can you simply mount it by hand to see what happens?

schneidz 11-05-2009 07:56 PM

maybe symlink (ln -s /export/kits /apps) would be the lazy way of dealing with it.

assuming redhat: maybe some genius decided it was better to mount it via /etc/rc.d rather than in fstab.
maybe doing this will find the culprit:
Code:

find /etc/rc.d -exec grep -l kits '{}' \;
quick-and-dirty solution:
else, perhaps putting a few lines in /etc/rc.d/rc.local will get you what you want (always backup any file before editing it).
Code:

umount -f /dev/sda3
mount /dev/sda3 /apps

i would put a comment in /etc/fstab so that the poor bastard that inherits it next knows what the hell is going on.

hmsdefender 11-06-2009 10:50 AM

I found an entry in a file called blkid.tab that associates /exports/kits with a label /exports/kits1. Unfortunately I don't know the significance, if any, of this.

PS - There is one system administrator available to me, but that person doesn't seem to know how to go about accomplishing what I want in this case (or in just about any other matter I've had so far). No help there I'm afraid.

PPS - The system in question is running RedHat Linux 4.4.

wfh 11-06-2009 12:44 PM

Quote:

Originally Posted by hmsdefender (Post 3747219)
I found an entry in a file called blkid.tab

*WHERE* did you find this file?

Was this in a home directory in someone's account? Was it in another location?

What was in the file? Please post the file.


All times are GMT -5. The time now is 02:55 AM.