XFS

From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page XFS and the translation is 35% complete.
Outdated translations are marked like this.

Il filesystem XFS è un filesystem journaling ad alte prestazioni. È compatibile con ACL (POSIX) per l'uso con Linux.

XFS has a particularly strong reputation for reliability and led to the creation of the venerable xfstests Linux kernel test suite which now tests regressions in various filesystems.

Installazione

Kernel

KERNEL Enable XFS support (CONFIG_XFS_FS:)
File systems  --->
   <*> XFS filesystem support

Opzionali:

KERNEL Enable optional XFS features
File systems  --->
   [*]   XFS Quota support
   [*]   XFS POSIX ACL support
   [*]   XFS Realtime subvolume support
   [ ]   XFS Verbose Warnings
   [ ]   XFS Debugging support

Emerge

Il pacchetto sys-fs/xfsprogs è necessario per le utilità dello spazio utente XFS:

root #emerge --ask sys-fs/xfsprogs

Utilizzo

Monta il filesystem XFS con il comando mount.

Make an XFS filesystem with mkfs.xfs from xfsprogs:

root #mkfs.xfs -L 'label'

The label is optional. Further tuning on creation might be interesting for use as a RAID, multi-terabyte drives, and doing the journaling for a HDD on a separate SSD.

XFS supports SSD discards in /etc/fstab.

Maintenance

Year 2038 timestamp support (bigtime)

Older partitions (created with <xfsprogs-5.15) will not have bigtime enabled by default. Mounting such partitions results in a warning like:

root #dmesg
...
[    4.036258] xfs filesystem being mounted at /home supports timestamps until 2038 (0x7fffffff)
...

To check the current version of xfsprogs, run mkfs.xfs -V. There's no need for this on up-to-date Gentoo systems, but it might be necessary if using install media from another distribution with older userland.

The bigtime code support was enabled by default in xfsprogs 5.15, so manual setting is not required in newer versions.

Beginning with kernel 5.10, XFS gained bigtime support to extend the maximum recorded date stamps from 2038 to 2486 for the V5 on-disk format.[1]

To upgrade an older filesystem to bigtime, first cleanly unmount the file system. The upgrade will refuse to run if the unmount was not completely clean.

Then run:

root #xfs_admin -O bigtime=1 /dev/sda1

Replacing /dev/sda1 with the device path.

Nota
XFS on the root mount will require an initramfs or other live environment with the necessary tools to perform an upgrade to the metadata.

Using Dracut initramfs to perform the upgrade

First, Dracut needs additional files included in the initramfs in order to perform the upgrade. This can be accomplished with either the --install option or inside a configuration file using the install_items option.

root #dracut --install "/usr/sbin/xfs_admin /usr/bin/expr" ...

Then, the kernel command line option can be modified to include rd.break=pre-mount to stop the initramfs just before it would mount the root filesystem. Ensure this is done temporarily and removed on subsequent reboots after upgrade.

Rimozione

Per pianificare la rimozione alla prossima esecuzione:

root #emerge --ask --depclean --verbose sys-fs/xfsprogs

Vedere anche

  • FATfilesystem originalmente creato per l'uso con MS-DOS (e successivamente Microsoft Windows pre-NT).
  • Ext4 — un open source filesystem e la versione più recente della serie estesa di filesystem.
  • Btrfs — un filesystem CoW (copy-on-write, copia-in-scrittura) adatto a Linux che mira ad implementare funzionalità avanzate, concentrandosi sulla tolleranza agli errori, la riparazione e la facilità di amministrazione.

References