Results 1 to 2 of 2

Thread: the right way to edit /etc/fstab in CentOS 4.4?

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2007
    Grand Island, New York, USA (NEar Niagra Falls)

    Default the right way to edit /etc/fstab in CentOS 4.4?

    Hi All,

    when my valuebox got built, my second drive was added as /mnt/home. For compatibility with own scripts, I would like to mount this drive as /var/storage. However I'm new to CentOS (I'm a Suse, Solaris and BSD person) and the /etc/fstab on my box has this warning in it:

    # This file is edited by fstab-sync - see 'man fstab-sync' for details

    I need to change the line that reads:

    LABEL=/mnt/home /mnt/home ext3 defaults 1 2


    LABEL=/mnt/home /var/storage ext3 defaults 1 2

    Is it safe to make this change by hand or will Hal events undo my changes? IF it's not safe, how should I proceed?


    Sam S.

  2. #2
    Former Employee Power Poster
    Join Date
    Apr 2005
    Seattle, WA


    You should be able to edit the file by hand to make the change, however you will also want to change the label of the second drive. You'll need to run the command 'tune2fs -L <label> <device>' in order to change the label. Of course this needs to be done when the drive is unmounted. The label will be '/var/storage' and the device will be something like /dev/sdb1, although the actual device name will need to be found from a 'df'.

    Once you've changed the label and modified the fstab file, you should be able to remount to the new location, assuming that you have created the /var/storage directory.

    Of course, you could just create a symlink from /var/storage to /mnt/home.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts