Skip to content

Instantly share code, notes, and snippets.

@steelcowboy
Created September 15, 2020 01:59
Show Gist options
  • Save steelcowboy/1c27196730554ca8cbb21e01643f2bc7 to your computer and use it in GitHub Desktop.
Save steelcowboy/1c27196730554ca8cbb21e01643f2bc7 to your computer and use it in GitHub Desktop.
What's in my fstab versus mount options after a reboot

Disk Mounts after Reboot

steelcowboy@my-hostname:~> mount | grep nvme
/dev/nvme0n1p2 on / type btrfs (ro,relatime,ssd,space_cache,subvolid=358,subvol=/@/.snapshots/58/snapshot)
/dev/nvme0n1p2 on /root type btrfs (rw,noatime,ssd,space_cache,subvolid=260,subvol=/@/root)
/dev/nvme0n1p3 on /var type btrfs (rw,noatime,compress=zstd:1,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/)
/dev/nvme0n1p2 on /.snapshots type btrfs (rw,noatime,ssd,space_cache,subvolid=266,subvol=/@/.snapshots)
/dev/nvme0n1p2 on /boot/grub2/i386-pc type btrfs (rw,noatime,ssd,space_cache,subvolid=265,subvol=/@/boot/grub2/i386-pc)
/dev/nvme0n1p2 on /boot/grub2/x86_64-efi type btrfs (rw,noatime,ssd,space_cache,subvolid=264,subvol=/@/boot/grub2/x86_64-efi)
/dev/nvme0n1p2 on /boot/writable type btrfs (rw,noatime,ssd,space_cache,subvolid=263,subvol=/@/boot/writable)
/dev/nvme0n1p2 on /home type btrfs (rw,noatime,ssd,space_cache,subvolid=262,subvol=/@/home)
/dev/nvme0n1p2 on /opt type btrfs (rw,noatime,ssd,space_cache,subvolid=261,subvol=/@/opt)
/dev/nvme0n1p2 on /srv type btrfs (rw,noatime,ssd,space_cache,subvolid=259,subvol=/@/srv)
/dev/nvme0n1p2 on /usr/local type btrfs (rw,noatime,ssd,space_cache,subvolid=257,subvol=/@/usr/local)
/dev/nvme0n1p1 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/nvme0n1p3 on /var/lib/docker/btrfs type btrfs (rw,noatime,compress=zstd:1,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/)

Note only /var and /var/lib/docker/btrfs have the mount compress and space_cache options.

Fstab

steelcowboy@my-hostname:~> cat /etc/fstab | sed 's#\(UUID=\)[^[:space:]]\+#\1<MY_DISK>#g'
UUID=<MY_DISK>  /                       btrfs    ro                                          0  0  
UUID=<MY_DISK>  /.snapshots             btrfs    defaults,noatime,space_cache=v2,discard=async,compress=zstd:1,subvol=/@/.snapshots  0  0  
UUID=<MY_DISK>  /var                    btrfs    defaults,noatime,space_cache=v2,discard=async,compress=zstd:1,x-initrd.mount  0  0  
UUID=<MY_DISK>  /usr/local              btrfs    defaults,noatime,space_cache=v2,discard=async,compress=zstd:1,subvol=/@/usr/local  0  0  
UUID=<MY_DISK>  /srv                    btrfs    defaults,noatime,space_cache=v2,discard=async,compress=zstd:1,subvol=/@/srv  0  0  
UUID=<MY_DISK>  /root                   btrfs    defaults,noatime,space_cache=v2,discard=async,compress=zstd:1,subvol=/@/root,x-initrd.mount  0  0  
UUID=<MY_DISK>  /opt                    btrfs    defaults,noatime,space_cache=v2,discard=async,compress=zstd:1,subvol=/@/opt  0  0  
UUID=<MY_DISK>  /home                   btrfs    defaults,noatime,space_cache=v2,discard=async,compress=zstd:1,subvol=/@/home  0  0  
UUID=<MY_DISK>  /boot/writable          btrfs    defaults,noatime,space_cache=v2,discard=async,compress=zstd:1,subvol=/@/boot/writable  0  0  
UUID=<MY_DISK>  /boot/grub2/x86_64-efi  btrfs    defaults,noatime,space_cache=v2,discard=async,compress=zstd:1,subvol=/@/boot/grub2/x86_64-efi  0  0  
UUID=<MY_DISK>  /boot/grub2/i386-pc     btrfs    defaults,noatime,space_cache=v2,discard=async,compress=zstd:1,subvol=/@/boot/grub2/i386-pc  0  0  
UUID=<MY_DISK>                             /boot/efi               vfat     utf8                                        0  2  
overlay                                    /etc                    overlay  defaults,upperdir=/sysroot/var/lib/overlay/58/etc,lowerdir=/sysroot/var/lib/overlay/57/etc:/sysroot/var/lib/overlay/56/etc:/sysroot/var/lib/overlay/55/etc:/sysroot/var/lib/overlay/54/etc:/sysroot/var/lib/overlay/53/etc:/sysroot/var/lib/overlay/52/etc:/sysroot/var/lib/overlay/51/etc:/sysroot/var/lib/overlay/50/etc:/sysroot/var/lib/overlay/49/etc:/sysroot/var/lib/overlay/48/etc:/sysroot/var/lib/overlay/47/etc:/sysroot/var/lib/overlay/46/etc:/sysroot/etc,workdir=/sysroot/var/lib/overlay/work-etc,x-systemd.requires-mounts-for=/var,x-systemd.requires-mounts-for=/var/lib/overlay,x-systemd.requires-mounts-for=/sysroot/var,x-systemd.requires-mounts-for=/sysroot/var/lib/overlay,x-initrd.mount  0  0  
UUID=<MY_DISK>  /var/lib/slowstorage    btrfs    defaults,noatime,space_cache=v2,compress=zstd:1  0  0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment