Re: confusing /etc/fstab

From: jim branagan (fedora_at_themusenashville.com)
Date: 02/03/05

  • Next message: Johnathan Bailes: "Re: 100% Linux - Is it possible?"
    Date: Wed, 02 Feb 2005 21:30:49 -0600
    To: For users of Fedora Core releases <fedora-list@redhat.com>
    
    
    
    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.
    
    

    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
    

  • Next message: Johnathan Bailes: "Re: 100% Linux - Is it possible?"

    Relevant Pages

    • Re: LABELs
      ... now that I am making 2 hard drives with the exact same F7 on ... I do recall pointing out to you that duplicate labels will be a ... your *new* partitions, that leaves your previously set up system still ... If you're mounting via labels, you need to ensure drive partitions have ...
      (Fedora)
    • Re: Will this HD swapping work OK? What to beware of?
      ... Check its fstab, too. ... >>the labels on the old disk so they aren't the same as the ones on the ... > install FC4 on the new box and let it see and install the old drives ... > drives over and add them to FSTAB? ...
      (comp.os.linux.misc)
    • Re: Will this HD swapping work OK? What to beware of?
      ... Check its fstab, too. ... >>the labels on the old disk so they aren't the same as the ones on the ... > install FC4 on the new box and let it see and install the old drives ... > drives over and add them to FSTAB? ...
      (comp.os.linux.hardware)
    • Re: Will this HD swapping work OK? What to beware of?
      ... Check its fstab, too. ... Would it be less...risky to change the labels on the old box, ... down and move the drives as the 2nd and 3rd drives in the new box, ... Or install FC4 on the new box, change IT'S labels, then move the old ...
      (comp.os.linux.hardware)
    • Re: Will this HD swapping work OK? What to beware of?
      ... Check its fstab, too. ... Would it be less...risky to change the labels on the old box, ... down and move the drives as the 2nd and 3rd drives in the new box, ... Or install FC4 on the new box, change IT'S labels, then move the old ...
      (comp.os.linux.misc)