Mounting two devices in one command

According to mount():-

mount [--libxo] [-adflpruvw] [-F fstab] [-o options]
[-t [no]type[,type ...]]

does the type,type imply that you can mount two devices via one command?

ie, should I expect to be able to do something like:-

mount dev/da0p1 mnt/p1, dev/da0p2 mnt/p2
 
Code:
-t [no]type[,type ...]
           The argument following the -t is    used to    indicate the file sys-
           tem  type.   The    type ufs is the    default.  The -t option    can be
           used to indicate    that the actions should    only be    taken on  file
           systems of the specified    type.  More than one type may be spec-
           ified in    a comma    separated list.     The list of file system types
           can  be    prefixed  with no to specify the file system types for
           which action should not be taken.  For example, the mount  com-
           mand:

             mount -a -t nonfs,nullfs
 
Code:
mount [--libxo] [-dfpruvw] [-o options] [-t [no]type[,type ...]]
      special node
mount -t nullfs,ffs /bin /mnt and mount -t nullfs /bin /mnt are the same.
 
[…] does the type,type imply that you can mount two devices via one command? […]
No, as VladiBG meant to point out, (without the no prefix) it whitelists the FS types that may be mounted. A device that does not contain one of the “whitelisted” file systems will not be mounted. Nevertheless it is still possible to mount(8) multiple devices at once via the ‑F mechanism:​
Bash:
mount -a -F /dev/stdin << EOT
# device        mountpoint    file system type  mount options   dump  pass no.
  /dev/da0p1    /mnt/p1       ext4              user_xattr      0     2
  /dev/da0p2    /mnt/p2       ext4              user_xattr      0     2
EOT
[SUP]NB: This will still trigger multiple mount(2) system calls. You cannot achieve atomicity with that. Just $? is zero if everything went well.[/SUP]​
 
Back
Top