Re: confusing /etc/fstab

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Labeling does introduce a problem:  What happens if 2 partitions have the same label?  Which one does mount choose?  I do not know the algorithm
    
It doesn't.  The conflict cannot be resolved, and it will hang
Actually it says 'press any key to continue' but that just reboots with the same problem.
In such cases , I strongly suggest changing the labels. Here I used to
have FC2 and FC3 test releases (during FC3 test) installed.
The root for FC2 was labeled / , the one for FC3 was labeled fc3/ . And
the same way for other partitions.
Now , if you need to insert another disk with the same labels , you can
always change the root=LABEL=/ part on grub to point to the right device.
This change can be done at boot time (just press "a" on grub screen) and
it probably will fix the issue, since the kernel will know exactly which
partition to use on boot time.
        
That would take care of getting the right root partition but what about the 
case where, for example, /usr was in a separate partition on each disk with 
the same labels?
Even if you use only hard-coded device names in /etc/fstab and /boot/grub/grub.conf, linux will crap out and dump you into run level 3 if there are any duplicate labels
It is for that reason, that I seldom use labels.
A machine that has drives already labeled at boot time will give new
partitions created new labels. Swapping different drives in with
conflicting labels will always cause a problem when labels are used in
fstab for mounting.

I always put the partition name in fstab instead of using labels and
thus do not have the conflict.
    
Swapping drives around when you have hard-coded partition names in fstab
will also cause problems; drives can change device names and then not be
mountable. The gist of it is that if you're adding in extra drives (and
particularly if you're removing drives), you'd better know what you're
doing or you could have problems. The same goes for adding and removing
partitions, though filesystem labels are a bit more robust than
partition names in that case.

Paul.
  
Swapping drives around between PC's always requires fstab changes with or without labels; otherwise EIDE devices never change names unless they are physically moved to a different IDE bus or switched between master and slave.  I agree labels are useful for USB and Firewire drives, but they should probably never be labeled with names like '/' and '/tmp' that are likely to be reused on many different drives.  Unfortunately the Fedora installers (FC1, FC2 and FC3) like to create multiple partitions with just these sorts of labels - ONCE it created a partion labeled '/1', but most times I've ended up with a difficult to boot machine with multiple 'LABEL=/' partitions.

Labels would be a lot more useful if more applications displayed both device and label (and mount point). When df displays only labels and fdisk displays only device names, I have to look up what parameters to give which tool to print labels for devices, and hand-map between the two. 

It would also be very nice if I could tell fstab which partitions are critical, and which should be ignored if not present, rather than causing fatal errors.  Currently I seem to only be able to do this if I don't mind mounting all non-critical partitions manually after boot.

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux