Questo contenuto non è disponibile nella lingua selezionata.
5.2. Mounting an ext4 File System
An ext4 file system can be mounted with no extra options. For example:
mount /dev/device /mount/point
# mount /dev/device /mount/pointmount /dev/device /mount/pointmount /dev/device /mount/pointmount /dev/device /mount/point
The ext4 file system also supports several mount options to influence behavior. For example, the
acl
parameter enables access control lists, while the user_xattr
parameter enables user extended attributes. To enable both options, use their respective parameters with -o
, as in:
mount -o acl,user_xattr /dev/device /mount/point
# mount -o acl,user_xattr /dev/device /mount/pointmount -o acl,user_xattr /dev/device /mount/pointmount -o acl,user_xattr /dev/device /mount/pointmount -o acl,user_xattr /dev/device /mount/point
As with ext3, the option
data_err=abort
can be used to abort the journal if an error occurs in file data.
mount -o data_err=abort /dev/device /mount/point
# mount -o data_err=abort /dev/device /mount/pointmount -o data_err=abort /dev/device /mount/pointmount -o data_err=abort /dev/device /mount/pointmount -o data_err=abort /dev/device /mount/pointmount -o data_err=abort /dev/device /mount/pointmount -o data_err=abort /dev/device /mount/pointmount -o data_err=abort /dev/device /mount/pointmount -o data_err=abort /dev/device /mount/point
The
tune2fs
utility also allows administrators to set default mount options in the file system superblock. For more information on this, refer to man tune2fs
.
Write Barriers Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
By default, ext4 uses write barriers to ensure file system integrity even when power is lost to a device with write caches enabled. For devices without write caches, or with battery-backed write caches, disable barriers using the
nobarrier
option, as in:
mount -o nobarrier /dev/device /mount/point
# mount -o nobarrier /dev/device /mount/pointmount -o nobarrier /dev/device /mount/pointmount -o nobarrier /dev/device /mount/pointmount -o nobarrier /dev/device /mount/point
For more information about write barriers, refer to Chapter 22, Write Barriers.
Direct Access Technology Preview Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
Starting with Red Hat Enterprise Linux 7.3,
Direct Access
(DAX) provides, as a Technology Preview on the ext4 and XFS file systems, a means for an application to directly map persistent memory into its address space. To use DAX, a system must have some form of persistent memory available, usually in the form of one or more Non-Volatile Dual In-line Memory Modules (NVDIMMs), and a file system that supports DAX must be created on the NVDIMM(s). Also, the file system must be mounted with the dax
mount option. Then, an mmap
of a file on the dax-mounted file system results in a direct mapping of storage into the application's address space.