Load, Reload or Refresh your fstab mounts

In order to load your new mount entries, reload, or refresh your fstab mount points you can do this simply with the mount command as follows :-

Show Plain Text
Text code
  1. mount -a

For those of you doing a reload or refresh due to a mount drop you will need to stop any processes trying to access the mount share and then do a umount as follows :-

Show Plain Text
Text code
  1. umount -f <path_mount_share>

After your umount then simply do the "mount -a" and you should be up and running.

For those trying to automate the connection something similar to the following should work running as a 1 minute cron script :-

Show Plain Text
Text code
  1. #!/bin/sh
  2. if ! mount | grep -q <share_name>
  3. then
  4.   skill <transfer_processes>
  5.   umount -f <share_mount>
  6.   mount -a
  7. fi
Filed under: Linux  Tags: Debian, Ubuntu

1 Responses to “Load, Reload or Refresh your fstab mounts”

Thanks for the example of iso image fstab entrie.. It worked.. I was wondering were to mention 'loop'

Sorry, comments have been closed for this post.