Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

/etc/mtab & /proc/mounts --- please help

Status
Not open for further replies.

santanudas

Technical User
Mar 18, 2002
121
GB
Hi all,

I got a problem and a n urgent fix. Here is my situation one:

I got /var (/dev/hda6) totally filled up so I decided to switch that one with /home (/dev/hda8) as I got plenty of spaces left over there. To do that I edited the /etc/mtab file and switched the entry for /var with /home so that the new entry points the /dev/had8 to /var and /dev/hda6 to /home. But after the reboot, I found /etc/mtab had switched back to its original. /proc/mounts, which is actually a symbolic link to /proc/self/mounts whilst /proc/self is link to pid, contains the same information as /etc/mtab but editing /proc/self/mounts is not permissible. My /etc/mtab is not linked to /proc/mounts.

Any one out here faced this type of problem before? Or can any one please help me?
Thanks to all you guys in advance!!!!
 
Sorry, I actually didn't get what you mean to say. My understanding was fstab now just a reference file. My fstab is something like this:

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
LABEL=/usr /usr ext3 defaults 1 2
LABEL=/var /var ext3 defaults 1 2
LABEL=/home /home ext3 defaults 1 2
LABEL=/tmp /tmp ext3 defaults 1 2
/dev/hda3 swap swap defaults 0 0

Should I change any thing here?
Thanks for replying.
 
You define your mounts in /etc/fstab. mtab and /proc/mounts are for the OS to keep track of what's mounted and if you change them you can screw up your system.
 
Well, I wanted to know what should I change in /etc/fstab.

I though, maybe it's a good idea to use LABEL= rather than specify the actual device file in /etc/fstab to makes it possible to move disks around on IDE/SCSI buses without having changed configuration files like aforementioned, grub.conf etc. But I may be wrong.
 
hi, I got a way out now. You don't really ned to do any thing directly with this new type of /etc/fstab, which uses LABEL rather than actual device name. There is tool, named e2lable to change (or asign a new one) the name of the lable associated with the actual device.

Many thanks to all for replying.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top