xfs_freeze(8)

πŸ’– NAME πŸ’–

okay so bestie, this is xfs_freeze(8) from the System Manager's Manual πŸŽ€ and it's basically how you pause an XFS filesystem and unpause it. The official name is xfs_freeze - suspend access to an XFS filesystem ✨

🧾 SYNOPSIS 🧾

xfs_freeze [ -f | -u ] mount-point
xfs_freeze -V

🌸 DESCRIPTION 🌸

okay so xfs_freeze suspends and resumes access to an XFS filesystem (see xfs(5)) πŸ¦‹

it halts new access to the filesystem and creates a stable image on disk πŸ“Έ it's literally made for volume managers and hardware RAID devices that can make snapshots, so it's giving backup energy πŸ’…

the mount-point argument is the pathname of the directory where the filesystem is mounted. no cap, the filesystem has to be mounted before you can freeze it (see mount(8)) 🧚

  • -f β€” this one freezes the filesystem so nothing new can change it 🧊 all the ongoing transactions get to finish, new write system calls get halted, other calls that would modify the filesystem get halted too, and all the dirty data, metadata, and log info gets written to disk. any process trying to write to the frozen filesystem will just block and wait until it's unfrozen πŸ’€
  • -u β€” this one un-freezes the filesystem so everything can go again 🌈 any filesystem modifications that got blocked by the freeze are unblocked and allowed to finish ✨
  • -V β€” prints the version number and exits πŸ“
⚠️ bestie, unless you're using -V, you MUST pass either -f or -u. no exceptions πŸ™ˆ

okay but here's the tea πŸ«– even after freezing, the on-disk filesystem can still have info about files that are in the middle of being unlinked. those files won't actually get unlinked until the filesystem is unfrozen or a clean mount of the snapshot is complete πŸ₯Ί

πŸ’œ NOTES πŸ’œ

ngl this part is kind of a lot, but it's important 🫢

a copy of a frozen XFS filesystem will usually have the same universally unique identifier (UUID) as the original, so it might be prevented from being mounted 😭 the XFS nouuid mount option can be used to get around this issue πŸ”§

also, in Linux kernel version 2.6.29, the interface XFS uses to freeze and unfreeze got elevated to the VFS πŸ‘‘ which means this tool can now be used on lots of other Linux filesystems too. literally so iconic 🌟

πŸ¦‹ SEE ALSO πŸ¦‹

xfs(5), lvm(8), mount(8) πŸ’…


bestie that's the whole thing, you're welcome πŸ’– xfs_freeze(8) πŸŽ€βœ¨

πŸ“¦ where this page comes from