Este conteúdo não está disponível no idioma selecionado.
3.8. Configuring atime Updates
Each file inode and directory inode has three time stamps associated with it:
ctime— The last time the inode status was changedmtime— The last time the file (or directory) data was modifiedatime— The last time the file (or directory) data was accessed
If
atime updates are enabled as they are by default on GFS2 and other Linux file systems then every time a file is read, its inode needs to be updated.
Because few applications use the information provided by
atime, those updates can require a significant amount of unnecessary write traffic and file locking traffic. That traffic can degrade performance; therefore, it may be preferable to turn off or reduce the frequency of atime updates.
Two methods of reducing the effects of
atime updating are available:
- Mount with
relatime(relative atime), which updates theatimeif the previousatimeupdate is older than themtimeorctimeupdate. - Mount with
noatime, which disablesatimeupdates on that file system.
3.8.1. Mount with relatime Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
The
relatime (relative atime) Linux mount option can be specified when the file system is mounted. This specifies that the atime is updated if the previous atime update is older than the mtime or ctime update.
Usage Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
mount BlockDevice MountPoint -o relatime
mount BlockDevice MountPoint -o relatime
BlockDevice- Specifies the block device where the GFS2 file system resides.
MountPoint- Specifies the directory where the GFS2 file system should be mounted.
Example Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
In this example, the GFS2 file system resides on
/dev/vg01/lvol0 and is mounted on directory /mygfs2. The atime updates take place only if the previous atime update is older than the mtime or ctime update.
mount /dev/vg01/lvol0 /mygfs2 -o relatime
# mount /dev/vg01/lvol0 /mygfs2 -o relatime
3.8.2. Mount with noatime Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
The
noatime Linux mount option can be specified when the file system is mounted, which disables atime updates on that file system.
Usage Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
mount BlockDevice MountPoint -o noatime
mount BlockDevice MountPoint -o noatime
BlockDevice- Specifies the block device where the GFS2 file system resides.
MountPoint- Specifies the directory where the GFS2 file system should be mounted.
Example Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
In this example, the GFS2 file system resides on
/dev/vg01/lvol0 and is mounted on directory /mygfs2 with atime updates turned off.
mount /dev/vg01/lvol0 /mygfs2 -o noatime
# mount /dev/vg01/lvol0 /mygfs2 -o noatime