the right way to edit /etc/fstab in CentOS 4.4?
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?
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.