13

Sometimes you need to disconnect and reconnect mounts that have gone bad and don't want to disconnect + reconnect the entire list of fstab entries.

Is this possible without having to basically rerun the full underlying mount command that fstab abstracts away? Something like:

mount /Videos

where fstab contains:

//[email protected]/Videos$ /Videos smbfs nodev,nosuid,auto

I'd rather not copy and paste the entire fstab entry and modify it to use the mount -o syntax

6
  • It's exactly how fstab works: man7.org/linux/man-pages/man8/mount.8.html
    – Tom Yan
    Commented Apr 16, 2016 at 7:06
  • I know that. My question is does the "mount -a" shortcut have some kind of filter that can do the messy stuff for you. Commented Apr 16, 2016 at 7:07
  • What does you question have to do with mount -a? What "filter"/"messy stuff"?
    – Tom Yan
    Commented Apr 16, 2016 at 7:10
  • If I haven't made it clear by what I've written in the question then no amount of further explaining will either. But thanks for the reply. Commented Apr 16, 2016 at 7:11
  • 4
    umount /Videos and mount /Videos will work, and the latter will use the source, type and options in //[email protected]/Videos$ /Videos smbfs nodev,nosuid,auto, if that's what you want to know.
    – Tom Yan
    Commented Apr 16, 2016 at 7:13

1 Answer 1

17

(Thanks to Tan for the answer)

umount /Videos and mount /Videos will work, and the latter will use the source, type and options in //[email protected]/Videos$ /Videos smbfs nodev,nosuid,auto that is specified in fstab.

Side-note: I don’t bother with /etc/fstab anymore. I use /etc/auto.direct.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .