[opensuse] How to get Btrfs settings?
How to get Btrfs settings and properties, e.g. if COW is enabled or not? 'btrfs subvolume show' or 'btrfs subvolume list' don't show such information... -- Vojtěch Zeisek Komunita openSUSE GNU/Linuxu Community of the openSUSE GNU/Linux https://www.opensuse.org/ https://trapa.cz/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am Donnerstag, 29. Dezember 2016, 11:17:07 CET schrieb Vojtěch Zeisek:
How to get Btrfs settings and properties, e.g. if COW is enabled or not? 'btrfs subvolume show' or 'btrfs subvolume list' don't show such information...
IIRC there is the nodatacow mount option, so: # mount | column -t And there is the NOCOW file attribute (set by chattr +C on empty files): # lsattr $FILE and # lsattr -d $DIRECTORY for directories. HTH Jan -- I already came, so stop jerking me off. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Dne 29.12.2016 12:22, Jan Ritzerfeld napsal:
Am Donnerstag, 29. Dezember 2016, 11:17:07 CET schrieb Vojtěch Zeisek:
How to get Btrfs settings and properties, e.g. if COW is enabled or not? 'btrfs subvolume show' or 'btrfs subvolume list' don't show such information...
IIRC there is the nodatacow mount option, so: # mount | column -t
And there is the NOCOW file attribute (set by chattr +C on empty files): # lsattr $FILE and # lsattr -d $DIRECTORY for directories.
Thank You, but it doesn't seem to work. E.g. /var/lib/mysql should be subvolume without COW. But I'm unable to read this information from output: $ sudo mount | grep mysql /dev/mapper/pocitac-korinek on /var/lib/mysql type btrfs (rw,relatime,ssd,space_cache,subvolid=271,subvol=/@/var/lib/mysql) $ sudo lsattr -d /var/lib/mysql ----------------C-- /var/lib/mysql $ sudo btrfs subvolume list / | grep mysql ID 271 gen 6357 top level 257 path @/var/lib/mysql $ sudo btrfs subvolume show /var/lib/mysql /var/lib/mysql Name: mysql UUID: 2884ef96-a8e5-0c4d-a0d5-9b8c38e33c84 Parent UUID: - Received UUID: - Creation time: 2016-12-21 13:46:49 +0100 Subvolume ID: 271 Generation: 6357 Gen at creation: 27 Parent ID: 257 Top level ID: 257 Flags: - Snapshot(s): $ sudo btrfs filesystem show /var/lib/mysql Label: 'koren' uuid: 245008ce-5baa-4818-a690-49c5ea2ab3da Total devices 1 FS bytes used 725.17GiB devid 1 size 885.00GiB used 731.05GiB path /dev/mapper/pocitac-korinek -- Vojtěch Zeisek Komunita openSUSE GNU/Linuxu Community of the openSUSE GNU/Linux https://www.opensuse.org/ https://trapa.cz/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thu, Dec 29, 2016 at 3:03 PM, Vojtěch Zeisek <vojtech.zeisek@opensuse.org> wrote: ...
Thank You, but it doesn't seem to work. E.g. /var/lib/mysql should be subvolume without COW. But I'm unable to read this information from output: ... $ sudo lsattr -d /var/lib/mysql ----------------C-- /var/lib/mysql
What do you think 'C' stands for? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Dne 29.12.2016 13:12, Andrei Borzenkov napsal:
On Thu, Dec 29, 2016 at 3:03 PM, Vojtěch Zeisek <vojtech.zeisek@opensuse.org> wrote: ...
Thank You, but it doesn't seem to work. E.g. /var/lib/mysql should be subvolume without COW. But I'm unable to read this information from output: ... $ sudo lsattr -d /var/lib/mysql ----------------C-- /var/lib/mysql
What do you think 'C' stands for?
Ah, right, thanks. ;-) From man chattr: "A file with the 'C' attribute set will not be subject to copy-on-write updates." Is it possible to get this information using some btrfs command? -- Vojtěch Zeisek Komunita openSUSE GNU/Linuxu Community of the openSUSE GNU/Linux https://www.opensuse.org/ https://trapa.cz/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thu, Dec 29, 2016 at 3:46 PM, Vojtěch Zeisek <vojtech.zeisek@opensuse.org> wrote:
Dne 29.12.2016 13:12, Andrei Borzenkov napsal:
On Thu, Dec 29, 2016 at 3:03 PM, Vojtěch Zeisek <vojtech.zeisek@opensuse.org> wrote: ...
Thank You, but it doesn't seem to work. E.g. /var/lib/mysql should be subvolume without COW. But I'm unable to read this information from output:
...
$ sudo lsattr -d /var/lib/mysql ----------------C-- /var/lib/mysql
What do you think 'C' stands for?
Ah, right, thanks. ;-) From man chattr: "A file with the 'C' attribute set will not be subject to copy-on-write updates." Is it possible to get this information using some btrfs command?
I do not think so. It is either global mount option or per-file attribute. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Dne 29.12.2016 14:54, Andrei Borzenkov napsal:
On Thu, Dec 29, 2016 at 3:46 PM, Vojtěch Zeisek <vojtech.zeisek@opensuse.org> wrote:
Dne 29.12.2016 13:12, Andrei Borzenkov napsal:
On Thu, Dec 29, 2016 at 3:03 PM, Vojtěch Zeisek <vojtech.zeisek@opensuse.org> wrote: ...
Thank You, but it doesn't seem to work. E.g. /var/lib/mysql should be subvolume without COW. But I'm unable to read this information from output: ... $ sudo lsattr -d /var/lib/mysql ----------------C-- /var/lib/mysql
What do you think 'C' stands for?
Ah, right, thanks. ;-) From man chattr: "A file with the 'C' attribute set will not be subject to copy-on-write updates." Is it possible to get this information using some btrfs command?
I do not think so. It is either global mount option or per-file attribute.
Thank You for the explanation. I was wondering what is actual settings for /var/lib/mysql and also for ~/.local/share/{akonadi,baloo} as they also use their own DBs, they don't have separate subvolumes (well, /home is on separated subvolume excluding it from snapshots) and I have Btrfs on whole / (so no separated partition for /home). It seems to be fine. The ~/.local/share/{akonadi,baloo} directories are without COW, so they should work well with Btrfs. I hope. :-) -- Vojtěch Zeisek Komunita openSUSE GNU/Linuxu Community of the openSUSE GNU/Linux https://www.opensuse.org/ https://trapa.cz/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Andrei Borzenkov
-
Jan Ritzerfeld
-
Vojtěch Zeisek