[opensuse] Q: btrfs setting in openSUSE LEAP 15.0
Hi, I have a question about btrfs setting in openSUSE LEAP 15.0. Default btrfs subvolume setting is below.
sudo btrfs subvolume list / ID 257 gen 193 top level 5 path @ ID 258 gen 227 top level 257 path @/var ID 259 gen 193 top level 257 path @/usr/local ID 260 gen 227 top level 257 path @/tmp ID 261 gen 193 top level 257 path @/srv ID 262 gen 213 top level 257 path @/root ID 263 gen 193 top level 257 path @/opt ID 264 gen 193 top level 257 path @/boot/grub2/x86_64-efi ID 265 gen 193 top level 257 path @/boot/grub2/i386-pc ID 266 gen 108 top level 257 path @/.snapshots
Top subvolume is @ and several nested subvolumes. And /etc/fstab is here. UUID=9e8ed1d6-38bd-4ba0-91b1-d1f6d151aa85 / btrfs defaults 0 0 UUID=9e8ed1d6-38bd-4ba0-91b1-d1f6d151aa85 /boot/grub2/x86_64-efi btrfs subvol=/@/boot/grub2/x86_64-efi 0 0 UUID=9e8ed1d6-38bd-4ba0-91b1-d1f6d151aa85 /boot/grub2/i386-pc btrfs subvol=/@/boot/grub2/i386-pc 0 0 UUID=9e8ed1d6-38bd-4ba0-91b1-d1f6d151aa85 /.snapshots btrfs subvol=/@/.snapshots 0 0 UUID=9e8ed1d6-38bd-4ba0-91b1-d1f6d151aa85 /var btrfs subvol=/@/var 0 0 UUID=9e8ed1d6-38bd-4ba0-91b1-d1f6d151aa85 /usr/local btrfs subvol=/@/usr/local 0 0 UUID=9e8ed1d6-38bd-4ba0-91b1-d1f6d151aa85 /tmp btrfs subvol=/@/tmp 0 0 UUID=9e8ed1d6-38bd-4ba0-91b1-d1f6d151aa85 /srv btrfs subvol=/@/srv 0 0 UUID=9e8ed1d6-38bd-4ba0-91b1-d1f6d151aa85 /root btrfs subvol=/@/root 0 0 UUID=9e8ed1d6-38bd-4ba0-91b1-d1f6d151aa85 /opt btrfs subvol=/@/opt 0 0 UUID=342cc6c9-4729-4dc4-8ecd-ba51693136fb /home xfs defaults 0 0 UUID=f1001e72-21dd-4a58-8885-ea838704359a swap swap defaults 0 0 It mounts / without subvol option, so I expected I can see "/@" at root (/). However,
ls / bin dev home lib64 mnt proc run selinux sys usr boot etc lib media opt root sbin srv tmp var
My question is - Why there is no /@? Any tricks with it? - Why it doesn't mount @ as / ? If so, we don't need to write multiple lines for /etc/fstab, IMHO. - There are /boot/grub2/* subvolumes, why it doesn't set "chattr+C", instead of subvolume? -- Regards, Hideki Yamane henrich @ iijmio-mail.jp -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed, May 23, 2018 at 2:25 PM, Hideki Yamane <henrich@iijmio-mail.jp> wrote:
Hi,
I have a question about btrfs setting in openSUSE LEAP 15.0. Default btrfs subvolume setting is below.
sudo btrfs subvolume list / ID 257 gen 193 top level 5 path @ ID 258 gen 227 top level 257 path @/var ID 259 gen 193 top level 257 path @/usr/local ID 260 gen 227 top level 257 path @/tmp ID 261 gen 193 top level 257 path @/srv ID 262 gen 213 top level 257 path @/root ID 263 gen 193 top level 257 path @/opt ID 264 gen 193 top level 257 path @/boot/grub2/x86_64-efi ID 265 gen 193 top level 257 path @/boot/grub2/i386-pc ID 266 gen 108 top level 257 path @/.snapshots
Top subvolume is @ and several nested subvolumes.
And /etc/fstab is here.
UUID=9e8ed1d6-38bd-4ba0-91b1-d1f6d151aa85 / btrfs defaults 0 0 UUID=9e8ed1d6-38bd-4ba0-91b1-d1f6d151aa85 /boot/grub2/x86_64-efi btrfs subvol=/@/boot/grub2/x86_64-efi 0 0 UUID=9e8ed1d6-38bd-4ba0-91b1-d1f6d151aa85 /boot/grub2/i386-pc btrfs subvol=/@/boot/grub2/i386-pc 0 0 UUID=9e8ed1d6-38bd-4ba0-91b1-d1f6d151aa85 /.snapshots btrfs subvol=/@/.snapshots 0 0 UUID=9e8ed1d6-38bd-4ba0-91b1-d1f6d151aa85 /var btrfs subvol=/@/var 0 0 UUID=9e8ed1d6-38bd-4ba0-91b1-d1f6d151aa85 /usr/local btrfs subvol=/@/usr/local 0 0 UUID=9e8ed1d6-38bd-4ba0-91b1-d1f6d151aa85 /tmp btrfs subvol=/@/tmp 0 0 UUID=9e8ed1d6-38bd-4ba0-91b1-d1f6d151aa85 /srv btrfs subvol=/@/srv 0 0 UUID=9e8ed1d6-38bd-4ba0-91b1-d1f6d151aa85 /root btrfs subvol=/@/root 0 0 UUID=9e8ed1d6-38bd-4ba0-91b1-d1f6d151aa85 /opt btrfs subvol=/@/opt 0 0 UUID=342cc6c9-4729-4dc4-8ecd-ba51693136fb /home xfs defaults 0 0 UUID=f1001e72-21dd-4a58-8885-ea838704359a swap swap defaults 0 0
It mounts / without subvol option, so I expected I can see "/@" at root (/). However,
ls / bin dev home lib64 mnt proc run selinux sys usr boot etc lib media opt root sbin srv tmp var
My question is - Why there is no /@? Any tricks with it?
btrfs sub get-default /
- Why it doesn't mount @ as / ? If so, we don't need to write multiple lines for /etc/fstab, IMHO.
Then you will lose all subvolumes when booting from snapshot
- There are /boot/grub2/* subvolumes, why it doesn't set "chattr+C", instead of subvolume?
It has nothing to do with copy-on-write. They outside root subvolume so that the content always matches core.img. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (2)
-
Andrei Borzenkov
-
Hideki Yamane