PDA

View Full Version : How to set /etc/fstab again after system has started



voipfc
21st November 2006, 10:31 PM
Is it possible to add entries to the /etc/fstab and sort reinitialize it with new mounts after Linux has started.
I want to create directories and link to remote files via sshfs after the system has started.

They will be temporary folders which will be cleared before the machine is shutdown and after it is restarted.

Chosen Reject
21st November 2006, 11:06 PM
According to man mount


The command
mount -a [-t type] [-O optlist]
(usually given in a bootscript) causes all file systems mentioned in fstab (of the
proper type and/or having or not having the proper options) to be mounted as indi-
cated, except for those whose line contains the noauto keyword. Adding the -F
option will make mount fork, so that the filesystems are mounted simultaneously.

voipfc
21st November 2006, 11:14 PM
Can that be aplpied to a system that ihas started completely and has files open on some of hte mounts?

Chosen Reject
21st November 2006, 11:17 PM
Yeah, you can run it manually after the whole system has started. I don't know what would happen if some files are open on the mounts. I suspect nothing bad will happen, but don't quote me on that.