.TH "mount.ocfs2" "8" "January 2012" "Version @VERSION@" "OCFS2 Manual Pages"
.SH "NAME"
mount.ocfs2 \-  mount an \fIOCFS2\fR filesystem
.SH "SYNOPSIS"
\fBmount.ocfs2\fR [\fI\-vn\fR] [\fB\-o options\fR] \fIdevice\fR \fIdir\fR
.SH "DESCRIPTION"
.PP 
\fBmount.ocfs2\fR mounts an \fIOCFS2\fR filesystem at \fIdir\fR. It is usually
invoked indirectly by the \fBmount(8)\fR command.

.SH "OPTIONS"

.TP
\fB\_netdev\fR
Indicates that the file system resides on a device that requires network access
(used to prevent the system from attempting to mount these filesystems until the
network has been enabled on the system). \fBmount.ocfs2(8)\fR transparently appends
this option during mount. However, users mounting the volume via /etc/fstab must
explicitly specify this mount option to delay the system from mounting the volume
until after the network has been enabled.

.TP
\fBnoatime\fR
The file system will not update access time.

.TP
\fBrelatime\fR
The file system will update atime only if the on-disk atime is older than mtime
or ctime. This is the default mode.

.TP
\fBstrictatime,atime\_quantum=nrsec\fR
The file system will always perform atime updates, but the minimum update
interval is specified by atime_quantum which defaults to 60 secs. Set it to
zero to always update atime. These two options need work together.

.TP
\fB[no]acl\fR
Enables / disables POSIX ACLs (access control lists) support. It is enabled by default.

.TP
\fB[no]user_xattr\fR
Enables / disables extended user attributes. It is enabled by default.

.TP
\fBcommit=nrsec\fR
Sync all data and metadata every nrsec seconds. The default value is 5 seconds.
Zero means default.

.TP
\fBdata=[ordered|writeback]\fR
Specifies the handling of file data during metadata journalling.

.RS
.TP
\fBordered\fR
This is the default mode. Data is flushed to disk before the corresponding meta-data
is committed to the journal.

.TP
\fBwriteback\fR
Data  ordering is not preserved - data may be flushed to disk after the corresponding
meta-data is committed to the journal. This is rumored to be the higher-throughput
option. While it guarantees internal file system integrity, it can allow old data to
appear in files after a crash and journal recovery.
.RE

.TP
\fBerrors=[remount-ro|errors=panic|errors=continue]\fR
Specifies the behavior when an on-disk corruption is encountered.

.RS
.TP
\fBremount-ro\fR
This is the default mode. The file system is remounted read-only.

.TP
\fBpanic\fR
The system is halted via panic.
.RE

.RS
.TP
\fBcontinue\fR
Ignore errors. Just log error message, return error code to the calling process
and continue.
.RE

.TP
\fBlocalflocks\fR
This disables cluster-aware \fBflock(2)\fR.

.TP
\fBcoherency=[full|coherency]\fR
Specifies the extent of coherency for the cached file data across the cluster.
This mount option works with Linux kernel \fB2.6.37\fR and later.

.RS
.TP
\fBfull\fR
This is the default mode. The file system ensures the cached file data is coherent
across the cluster for all IO modes.

.TP
\fBbuffered\fR
The file system only ensures the cached file data coherency for buffered mode IOs.
It does not perform IO serialization for direct IOs. This allows multiple nodes to
perform concurrent direct IOs to the same file. This is the recommended mode for
volumes hosting \fIdatabase\fR files.
.RE

.TP
\fBresv_level=level\fR
Specifies the level of allocation reservation for files. The higher the value, the more
aggressive it is. Valid values are between 0 (reservation off) to 8 (maximum space
for reservation). It defaults to 2. This mount option works with Linux kernel
\fB2.6.35\fR and later.

.TP
\fBdir_resv_level=level\fR
By default, directory reservation scales with file reserveration. Users should rarely
need to change this value. If the file allocation reservation is turned off, this option
will have no effect. This mount option works with Linux kernel \fB2.6.35\fR and later.
.TP
\fBinode64\fR
Indicates that the file system can create inodes at any location in the volume, including
those which will result in inode numbers greater than 4 billion.

.TP
\fBnocluster\fR
This option allows users to mount a clustered volume without configuring the cluster stack.
However, you must be aware that you can only mount the file system from one node at the
same time, otherwise, the file system may be damaged. Please use it with caution.

.TP
\fB[no]intr\fR
Specifies whether a signal can interrupt IOs. It is disabled by default.

.TP
\fBro\fR
Mount the file system read-only.

.TP
\fBrw\fR
Mount the file system read-write.

.SH "NOTES"
.PP
To mount and umount a \fIOCFS2\fR volume, do:


.nf
.ft 6
# mount /dev/sda1 /mount/path
 ...
# umount /mount/path
.ft
.fi

Users mounting a clustered volume should be aware of the following:

.in +4n
1. The cluster stack must to be online for a clustered mount to succeed.

2. The clustered mount operation is not instantaneous; it must wait for the node to join the DLM domain.

3. Likewise, clustered umount is also not instantaneous; it involves migrating all mastered lock-resources to the other nodes in the cluster.
.in

If the mount fails, detailed errors can be found via \fBdmesg(8)\fR. These might include incorrect
cluster configuration (say, a missing node or incorrect IP address) or a firewall interfering with
\fBo2cb\fR network traffic. Check the configuration as listed in \fBo2cb(7)\fR or the man page of
the active cluster stack.

To auto-mount volumes on startup, the file system tools include an \fIocfs2\fR init service.
This runs after the \fIo2cb\fR init service has started the cluster. The \fIocfs2\fR init service
mounts all \fIOCFS2\fR volumes listed in /etc/fstab.

.nf
.ft 6
# chkconfig --add o2cb
o2cb 0:off 1:off 2:on 3:on 4:off 5:on 6:off

$ chkconfig --add ocfs2
o2cb 0:off 1:off 2:on 3:on 4:off 5:on 6:off

$ cat /etc/fstab
 ...
/dev/sda1     /u01     ocfs2     _netdev,defaults     0  0
 ...
.ft
.fi

.SH "SEE ALSO"
.BR debugfs.ocfs2(8)
.BR fsck.ocfs2(8)
.BR mkfs.ocfs2(8)
.BR mounted.ocfs2(8)
.BR o2cb(7)
.BR o2cluster(8)
.BR o2image(8)
.BR o2info(1)
.BR tunefs.ocfs2(8)

.SH "AUTHORS"
Oracle Corporation

.SH "COPYRIGHT"
Copyright \(co 2004, 2012 Oracle. All rights reserved.
