LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   /etc/fstab labels do not come out consistently (http://www.linuxquestions.org/questions/linux-software-2/etc-fstab-labels-do-not-come-out-consistently-764550/)

VirtualEJ 10-26-2009 11:12 AM

/etc/fstab labels do not come out consistently
 
We're running RHEL 5, kernel-2.6.18-128.1.6.el5.x86_64.rpm. Trying to use ghost for deployment of this solution that includes vmware 2.0 and separate ext3 partitions for each VM. Unfortunately, my /etc/fstab shows labels for these partitions as LABEL=/DC1 in some cases and then in others it shows LABEL=/DC11 I can't edit them and then restart because the fsck will fail. I am trying to use knoppix to fix the problem in one case right now, but I need to get to the bottom of this issue so it comes out the same every time. Is there a way in the install process to force the system to use that actual device names? /dev/sda4, etc...? If not, is there a way to edit the fstab and the place the partitions report their names from so they match up at boot time?

Our end goal is to be able to move ghosted partitions around like virtual appliances, but if the Labels don't match it's really not worth the hassle.

sploot 10-26-2009 11:44 AM

Use udev to name the devices, and then you should be able to have them mount in the appropriate place. Rename their dev nodes and then put those in the fstab file.

here is some info on udev rules

VirtualEJ 10-26-2009 12:58 PM

Quote:

Originally Posted by sploot (Post 3732972)
Use udev to name the devices, and then you should be able to have them mount in the appropriate place. Rename their dev nodes and then put those in the fstab file.

here is some info on udev rules

This may work, thanks.
If I can have the partitions labelled /DC1 AND /DC11, etc.
I just don't understand why I'm having an issue at all though. If I load RH from scratch, sometimes the fstab says one thing and sometimes it says something else. If I take a partition from a system that had the partition labelled LABEL=/DC11 and copy it to a system that had the old partition labelled LABEL=/DC1, it should work. Does the actual partition have a record of it's old label???? It shouldn't. That's like making up your own nickname, you just don't do it.

VirtualEJ 10-26-2009 01:18 PM

OK I forgot I never tried to just change the labels back to the actual dev names.
When I VI the fstab from this:
LABEL=/DC11 /DC1 ext3 nosuid,nodev 1 2
or
LABEL=/DC1 /DC1 ext3 nosuid,nodev 1 2
to this:
/dev/sda7 /DC1 ext3 nosuid,nodev 1 2

It works! It reboots just fine, and after I try ghosting it (which I suspect it will) we'll all be happy again!!


All times are GMT -5. The time now is 03:47 PM.