2

I'm on Ubuntu 18.04 and if I issue:

$ cat /proc/mounts

I don't see barrier=1 next to my main filesystem (under LVM). Does this mean barriers are not enabled? I read that while there were issues with this some time ago, now barriers are compatible with LVM.

If they are not enabled, how can I enable them? Maybe by adding the option in /etc/fstab?

3

They are enabled by default

Since many years ago, barriers are enabled by default on ext4. If you want to turn barriers off (and you have same sort of battery backup) then you can add barrier=0 to the options field in /etc/fstab. See the ext 4 documentation on kernel.org.

Generally speaking, don't add options to fstab unless you have a good reason; the defaults are safe and well thought.

  • So to get this right, it's normal for barrier=1 to not be there because it's not mentioned as it's a default? Thanks – Jack Jul 1 '18 at 15:23
  • Yes. If you set barrier=0 then it will appear as it would be a non-default setting. – AlexP Jul 1 '18 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.