Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
17
rated 0 times [  17] [ 0]  / answers: 1 / hits: 47594  / 3 Years ago, sat, may 8, 2021, 8:05:30

From Gentoo, I remember a separate /etc/init.d entry for mounting network drives (i.e., separate from local drives). In Ubuntu, there is umountnfs.sh, which is used during shutdown (in order to ensure clean unmounting while the network is still available), and which one can use to unmount all (currently mounted) network drives.



However, I am missing a quick way for




  • mounting all network drives from /etc/fstab that are not up yet, and/or

  • remounting all network drives (e.g., if the credentials / rights of cifs mounts have been changed).



I would prefer a maintained 3rd party solution over a one-line shell hack.


More From » mount

 Answers
7

You're looking for the -t flag for mount. From man mount:



   -t, --types vfstype
[...]

More than one type may be specified in a comma separated list.
The list of filesystem types can be prefixed with no to specify
the filesystem types on which no action should be taken. (This
can be meaningful with the -a option.) For example, the command:

mount -a -t nomsdos,ext


So, this command would mount all cifs filesystems:



sudo mount -a -t cifs

[#26000] Monday, May 10, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ibuteking

Total Points: 35
Total Questions: 128
Total Answers: 138

Location: Indonesia
Member since Thu, Oct 1, 2020
4 Years ago
;