xfs_logprint(8)

πŸ’– xfs_logprint β€” the manual, but make it make sense πŸ’–

okay bestie, so this is xfs_logprint(8), from the System Manager's Manual section of the manual pages. she's a system manager girlie and she's here to read your filesystem's diary. let's get into it ✨


✨ NAME ✨

xfs_logprint β€” print the log of an XFS filesystem 🫢


🌸 SYNOPSIS 🌸

xfs_logprint [ options ] device

πŸ¦‹ DESCRIPTION πŸ¦‹

so xfs_logprint prints the log of an XFS filesystem (peep xfs(5) if you wanna know more about XFS itself, iykyk).

the device argument is the pathname of the partition or logical volume that's holding your filesystem. and yes, the device can be a regular file if you're using the -f option β€” more on that below. the contents of the filesystem remain undisturbed, she's just looking, not touching, no cap. πŸ’…

there are two major modes of operation in xfs_logprint, and honestly they're giving very different energies:

  • Mode one is better for filesystem operation debugging. it's called the transactional view and you turn it on with the -t option. this view prints only the portion of the log that pertains to recovery β€” in other words, it prints out complete transactions between the tail and the head. this view tries to display each transaction without regard to how they are split across log records. so she's stitching the whole story back together for you, periodt.
  • Mode two starts printing out information from the beginning of the log. some error blocks might print out at the beginning, because the last log record usually overlaps the oldest log record β€” messy, I know 😭. a message gets printed when the physical end of the log is reached, and also when the logical end of the log is reached. this one is a log record view, displayed one record at a time, and heads up: transactions that span log records may not be decoded fully. πŸ™ˆ

✨ OPTIONS ✨

one bullet per option, bestie, we're not skipping a single one:

  • -b β€” extract and print buffer information. only used in transactional view.
  • -c β€” attempt to continue when an error is detected. brave of her honestly.
  • -C filename β€” copy the log from the filesystem to the file filename. the log itself is not printed. so she's just moving the tea elsewhere, no spillage πŸ“
  • -d β€” dump the log from front to end, printing where each log record is located on disk.
  • -D β€” do not decode anything; just print data. raw and unfiltered, we love a minimal queen.
  • -e β€” exit when an error is found in the log. normally xfs_logprint tries to continue and unwind from bad logs, but sometimes it just dies in bad ways πŸ’€. using this option prevents core dumps. so like, -e is the emotionally regulated option.
  • -f β€” specifies that the filesystem image to be processed is stored in a regular file at device (see the mkfs.xfs(8) -d file option). this might happen if an image copy of a filesystem has been made into an ordinary file with xfs_copy(8).
  • -h β€” print u32 hex dump data in host-endian order. the default is to print without any endian decoding. little-endian besties rise 🌈
  • -l logdev β€” external log device. only for those filesystems which use an external log.
  • -i β€” extract and print inode information. only used in transactional view.
  • -q β€” extract and print quota information. only used in transactional view.
  • -n β€” do not try and interpret log data; just interpret log header information. header only, no lore.
  • -o β€” also print buffer data in hex. normally, buffer data is just decoded, so better information can be printed β€” but sometimes you want the raw hex anyway, and that's valid.
  • -s start-block β€” override any notion of where to start printing. she decides where the story begins ✨
  • -t β€” print out the transactional view. (this is the mode-one girlie from the description, come thru.)
  • -v β€” print "overwrite" data.
  • -V β€” prints the version number and exits. short and sweet, main character exit πŸ’…

πŸ‘‘ SEE ALSO πŸ‘‘

mkfs.xfs(8), mount(8).


πŸ’– reminder bestie: xfs_logprint reads the log, it does not mess with your filesystem contents. but -D is literally just raw data with zero decoding, and -e exists because bad logs can make this thing die in bad ways β€” so if you're poking at a cursed log, -e is your friend. fr fr.

and that's the whole page, no skips, no cuts πŸŽ€ this was xfs_logprint(8), straight from the System Manager's Manual β€” she's been sitting in that footer forever and she's still iconic. go print some logs, bestie, you got this πŸŒΈπŸ¦‹πŸ’œ