Mount a block special device or remote filesystem
Syntax:
mount [-abwruv] [-t type [-o options] [special] mountpoint]
mount [-abwruv] [-T type [-o options] special [mountpoint]]
mount [-abwruv] -e [-t|T type] [-o options] special
[mountpoint]
mount
Options:
-
-e
- Enumerate the children of the special device.
-
-o
options
- Options specific to the server doing the mounting.
These options include:
-
before —
Mount the filesystem so that it's resolved before any other filesystems
mounted at the same pathname (in other words, it's placed in front of
any existing mount).
When you access a file, the system looks on this filesystem first.
-
after —
Mount the filesystem so that it's resolved after any other filesystems
mounted at the same pathname (in other words, it's placed behind any
existing mount).
When you access a file, the system looks on this filesystem last, and
only if the file wasn't found on any other filesystems.
For more information, see
"
Ordering mountpoints
"
in the Process Manager chapter of the System Architecture
guide.
-
-r
- Mount the device as read-only.
-
-T
type … special [mountpoint]
- The special device is a string that may specify a real device or may be just a hint for the server.
If mountpoint isn't specified, the server will automatically create an appropriate mountpoint.
-
-t
type … [special] mountpoint
- If the optional special string is given, the mount request goes to the server which
created, or is responsible for, the special device. If this special device does not exist,
the server interprets the string as a hint. If special is not given, it is passed as
NULL.
-
-u
- Mount for update (remount).
-
-v
- Increase the verbosity.
-
-w
- Mount the device as read/write.
This is the default (if the physical media permit).
-
mountpoint
- Where the device is to be mounted on your system.
-
special
- The name of the special device.
-
type
- The type of filesystem or manager to mount:
If you don't specify the filesystem, mount tries to determine
which to use.
If it can't figure out which to use, it uses qnx4.
Note:
Specify io-pkt for type no matter which of
io-pkt-v4, io-pkt-v4-hc, or io-pkt-v6-hc
you're mounting.
Description:
Without options, mount displays the current mountpoints.
With options set,
this utility mounts the block special device or remote filesystem,
special, as the specified mountpoint.
To mount a real special device, use the -t option;
to specify a special-device string (which isn't necessarily a real device),
use -T.
Note:
Some servers may not support all the mount options, especially
with respect to remounting and enumerating.
Note:
If you specify a filesystem option (e.g.
noatime) on a block
filesystem, and then you remount the filesystem (
mount -u),
the flag is ignored.
The absence of the flag is interpreted as your asking for access time
updates to be turned on.
There's no way for the code in
io-blk to determine if you
wanted to use the default, and therefore didn't specify anything,
or really did want access time updates to be turned on, and therefore
didn't specify anything.
Similarly, if you mounted the filesystem as read-only and then remount
it, the filesystem returns to its default setting.
To maintain the settings, specify the options again using the -o
option for the mount command.
For example:
mount -u -o noatime ...
Examples:
Mount a QNX 4 filesystem on a hard drive as /mnt/fs:
mount -t qnx4 /dev/hd0t77 /mnt/fs
Mount a device driver for io-pkt*.
In this example, devn-ne2000.so is the name of the
shared object that io-pkt* needs to load for the driver, not the
name of a real device:
mount -T io-pkt devn-ne2000.so
If you want to pass options to the driver, use the -o option
before the name of the shared object:
mount -T io-pkt -o mac=12345678 devn-ne2000.so
Enumerate the hard disk partition table:
mount -e /dev/hd0
This will re-read the disk partition table for /dev/hd0, and
create, update or delete /dev/hd0tXX block-special files
for each partition. This is used in the following two scenarios:
- when the disk driver is used without any automatic enumeration
(blk auto=none), or
- when the partition table has been modified (for example, with
fdisk
).
Display the current mountpoints:
mount
Mount the shared object that supports Enhanced Host Controller Interface (EHCI)
USB controllers:
mount -T io-usb devu-ehci.so /dev/io-usb/io-usb
Remount the filesystem that's currently mounted at / as
read-only:
mount -ur /
Remount the filesystem that's currently mounted at / as
read-write:
mount -uw /