1829737 Members
1756 Online
109992 Solutions
New Discussion

/etc/fstab question

 
SOLVED
Go to solution
Rainer von Bongartz
Honored Contributor

/etc/fstab question


I change a bit on my servers lvm layout and mount points.

Can I just edit the /etc/fstab and then re-boot the server during the night to make the new mount points active.

Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
7 REPLIES 7
Ian Dennison_1
Honored Contributor

Re: /etc/fstab question

If these are new mount points, you can do them while the system is up.

If you are reorganising existing mount points, I would recommend you copy the /etc/fstab to a safe place before changing it, so you can back the change out if things go wrong.

Share and Enjoy! Ian
Building a dumber user
Christian Gebhardt
Honored Contributor
Solution

Re: /etc/fstab question

Hi


Yes you can edit /etc/fstab.
To be sure there is no syntax error in fstab umount the filesystems (if possible) and try
mount -a
to mount them again.

Chris
Bill Hassell
Honored Contributor

Re: /etc/fstab question

/etc/fstab is a fairly crucial file so I recommend making your changes to the volumes, add/change the entires in /etc/fstab, then use mount and umount for the new mountpoints. That way, you can see if fstab has been correctly edited. It's not a good idea to wait for a reboot to test fstab.


Bill Hassell, sysadmin
Radhakrishnan Venkatara
Trusted Contributor

Re: /etc/fstab question

hi

check ur new mount points first with using mount and umount command .

u can edit /etc/fstab safely no issues on that.

it is not required always to reboot the server to make active of new mount points.

radhakrishnan
Negative thinking is a highest form of Intelligence
Bill McNAMARA_1
Honored Contributor

Re: /etc/fstab question

I never edit the /etc/fstab manually except to change the fsck options, I always use:

mount -p > /etc/fstab

the mount -p is in an /etc/fstab format.
anything that isn't currently mounted of course won't show up!

It works for me (tm)
doug hosking
Esteemed Contributor

Re: /etc/fstab question

I agree that a reboot isn't strictly needed. However, it's often a good idea as a sanity check, if you can do it without major inconvenience. At the very least I would try to carefully check at the next reboot to make sure that everything came up cleanly.

One problem I often see is an ordering problem.
For example, if you have /var and /var/adm
partitions, you need to be sure that /var is mounted before /var/adm is, and that /var/adm is unmounted before /var is.

Problems of this type aren't always obvious if you just test things manually one file system at a time.

Not applicable

Re: /etc/fstab question

You can simply use # mount -p > /etc/fstab