bigtime=value This option enables filesystems that can handle inode timestamps from December 1901 to July 2486, and quota timer expirations from January 1970 to July 2486. The value is either 0 to disable the feature, or 1 to enable large timestamps. If this feature is not enabled, the filesystem can only handle timestamps from December 1901 to January 2038, and quota timers from January 1970 to February 2106. By default, mkfs.xfs will not enable this feature. If the option -m crc=0 is used, the large timestamp feature is not supported and is disabled.
xfsの取り扱える時間は1901年12月から2038年1月だが,
bigtime
を 1
にすると1901年12月から2486年7月まで扱えるようになる.
bigtime=1
でmkfs
$ mkfs.xfs -m bigtime=1 device
> xfs_info ./disk0.img | grep -m1 bigtime = reflink=1 bigtime=1 inobtcount=1 > sudo faketime '2107-12-12 12:36:22' touch /mnt/time > ls -lA /mnt 合計 0 -rw-r--r-- 1 root root 0 12月 12 2107 time
bigtime=0
> xfs_info ./disk1.img | grep -m1 bigtime = reflink=1 bigtime=0 inobtcount=1 > sudo faketime '2107-12-12 12:36:22' touch /mnt/time > ls -lA /mnt 合計 0 -rw-r--r-- 1 root root 0 1月 19 2038 time
bigtimeを0→1に書き換える.※非マウント状態で実行.
> sudo xfs_admin -O bigtime=1 ./disk1.img Running xfs_repair to upgrade filesystem. Cannot get host filesystem geometry. Repair may fail if there is a sector size mismatch between the image and the host filesystem. Phase 1 - find and verify superblock... Cannot get host filesystem geometry. Repair may fail if there is a sector size mismatch between the image and the host filesystem. Phase 2 - using internal log - zero log... - scan filesystem freespace and inode maps... - found root inode chunk Adding large timestamp support to filesystem. Phase 3 - for each AG... - scan and clear agi unlinked lists... - process known inodes and perform inode discovery... - agno = 0 - agno = 1 - agno = 2 - agno = 3 - process newly discovered inodes... Phase 4 - check for duplicate blocks... - setting up duplicate extent list... - check for inodes claiming duplicate blocks... - agno = 0 - agno = 1 - agno = 2 - agno = 3 Phase 5 - rebuild AG headers and trees... - reset superblock... Phase 6 - check inode connectivity... - resetting contents of realtime bitmap and summary inodes - traversing filesystem ... - traversal finished ... - moving disconnected inodes to lost+found ... Phase 7 - verify and correct link counts... done
> sudo mount ./disk1.img /mnt > sudo faketime '2400-12-12 12:36:22' touch /mnt/time-2400 > sudo faketime '2500-12-12 12:36:22' touch /mnt/time-2500 > ls -lA /mnt 合計 0 -rw-r--r-- 1 root root 0 1月 19 2038 time -rw-r--r-- 1 root root 0 12月 12 2400 time-2400 -rw-r--r-- 1 root root 0 7月 3 2486 time-2500
アップグレードのみで戻せない.
> sudo xfs_admin -O bigtime=0 ./disk1.img Running xfs_repair to upgrade filesystem. -c bigtime only supports upgrades
RHEL 9から規定値になった.
大きなファイルシステムでマウント時間が短縮される.
既存のファイルシステムに設定.
> sudo xfs_admin -O inobtcount=1 ./disk1.img
アップグレードのみで戻せない.
> sudo xfs_admin -O inobtcount=0 ./disk1.img Running xfs_repair to upgrade filesystem. -c inobtcount only supports upgrades
RHEL 9から規定値になった.
コメント