Re: /etc/fstab rootfs options vs grub2 rootflags cmdline

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2016-05-04 14:07, Chris Murphy wrote:
On Wed, May 4, 2016 at 7:52 AM, Niccolò Belli <darkbasic@xxxxxxxxxxxxxxx> wrote:


I tried to add rootflags=noatime,compress=lzo,discard,autodefrag to
GRUB_CMDLINE_LINUX in /etc/default/grub as you suggested but my system
didn't manage to boot, probably because grub automatically adds
rootflags=subvol=@ and only a single rootflags can be taken into account. Do
you have any suggestion?

Well, strictly speaking none of these options are necessary as
rootflags at boot time because ostensibly on most distros the file
system is read only until it reads fstab and then remounts rw with all
of your options. So it doesn't matter that some of them are missing.
If your distro immediately mounts btrfs rw (I think Ubuntu does?) then
it's a small problem for a small number of files that get touched
during startup. I don't think it's worth the hassle.
For what it's worth:
1. This only applies on systems using an initramfs. IF you're using systemd, you're using an initramfs, but it's still worth remembering. 2. Some options can't be set in rootflags (the lazytime mount option for example, as well as some of the FS specific ones). 3. Some options can't be changed during a remount from ro to rw (mostly FS specific ones, I don't know of any right now for BTRFS that can't be changed though.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux