mount

QNX SDP8.0Utilities ReferenceUtilities

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 [-f]

Runs on:

QNX OS

Options:

-a
Mount all the devices listed in the /etc/fstab file (or autodetected later on). If you also specify a type, mount only those entries. This option is ignored if you specify special or mountpoint.
-b
Prevent the lookup of the fstab file.
-e
Enumerate the children of the special device.
-f
Display the mount flags and options.
-o options
A comma-separated list of tokens that specifies options for this mount. These can be common mount arguments that apply to any server, or ones that mount passes on for the server to interpret.
The common 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 Pathname Management in the Process Manager chapter of the System Architecture guide.

  • trusted — Mount the device or filesystem as trusted. Used only when you mount a device that provides integrity protection to the underlying filesystem (e.g., QTD) or the filesystem that this type of device protects.

    For more information, see Pathtrust in the System Security Guide.

  • nosuid — Ignore setuid bits on the filesystem.
For a full list of the common mount options (and a description of how mount parses them), see mount_parse_generic_args() in the C Library Reference.
The mount utility assumes that any other options are server-specific ones to pass on for parsing and interpretation. Examples of these options include:
  • The options described in the Filesystem options section of the io-blk.so entry.
  • The general options described in the fs-*.so (filesystem module) entries.
  • Options for networking modules (devs-*.so, mods-*.so). For example, devs-em.so and mods-pci.so.
Note:
You can't use these options to override ownership and permissions on filesystems that support POSIX file ownership. For more information, see Filesystem options in the entry for io-blk.so.
-r
Mount the device as read-only.
-T typespecial [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 doesn't exist, the server interprets the string as a hint. If special isn't 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:
type: Filesystem or manager:
dos fs-dos.so
ext2 fs-ext2.so
ifs Image filesystem (see mkifs)
io-sock io-sock
nfs fs-nfs3
qcfs QNX compressed filesystem (see fs-qcfs.so)
qnx6 Power-Safe filesystem (see fs-qnx6.so)
qtd QNX Trusted Disk (see fs-qtd.so)
udf fs-udf.so

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 qnx6.

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.

The mount utility supports the /etc/fstab file.

In order to use this utility, your process needs to have the vfs/mount-blk (BLK_ABILITY_MOUNTVFS) custom ability enabled. For more information, see procmgr_ability() and procmgr_ability_lookup() in the C Library Reference.

Examples:

Mount a Power-Safe filesystem on a hard drive as /mnt/fs:
mount -t qnx6 /dev/hd0t177 /mnt/fs
Mount a device driver for io-sock*. In this example, devs-em.so is the name of the shared object that io-sock needs to load for the driver, not the name of a real device:
mount -T io-sock devs-em.so
If you want to pass options to the driver, use the -o option before the name of the shared object. The following example mounts an alternative io-sock stack at /alt/dev/io-sock:
mount -T io-sock -o prefix=/alt devs-em.so
Enumerate the hard disk partition table:
mount -e /dev/hd0
This will reread 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).
Mount an NFS 3 client filesystem (fs-nfs3 must be running first):
mount -T nfs -o ver3 server_node:/qnx_bin /bin
Display the current mountpoints:
mount
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 /
Remount the filesystem, adding the noatime option.
mount -u -o noatime /
Page updated: