1

I'd like to disable log in the xfs.

I didn't find an option in

mkfs.xfs

So my question is: Is it possibile to disable them or move them in RAM? If yes, how? Thanks

L C
  • 438
  • 2
  • 10
  • 28
JosephITA
  • 502
  • 2
  • 11
  • 21

2 Answers2

4

You cannot disable the logging code paths in xfs, but you can remove any actual IO overhead by using some dirty tricks (note, I have not tested this beyond mounting it):

# modprobe null_blk
# mkfs.xfs -l logdev=/dev/nullb1,size=16m <DATA_DEVICE>
# mount -o logdev=/dev/nullb1 <DATA_DEVICE> <MOUNT_POINT>

Of course by doing this you lose all consistency guarantees that the log would give you, and after a crash or power loss you will need to run xfs_repair to make the filesystem consistent again.

Eric Sandeen
  • 141
  • 1
  • 5
2

The xfs filesystem is a journal filesystem so no you cannot disable logging entirely.(i'm not sure why you would). The mkfs.xfs -l [log_section_options] will allow you to shrink the size of the log or move it to another device. You may do something like this : mkfs.xfs -l size=512b /dev/sdc1 to shrink the log file to the minimum size allowed.

  • but can I move it in RAM? Thank you for your reply – JosephITA May 22 '15 at 07:11
  • I would recommend reading the documentation, I am not an expert on xfs. If i had to wager a guess i would say no because RAM is volatile memory and that would defeat the point of logging. –  May 26 '15 at 16:28
  • The reason you would want to is because it's super buggy and prone to allocation deadlocks where trivial IO ops can block for a long time because they get put on a wait list behind long running ops. – GL2014 Apr 02 '22 at 00:31