Gentoo Archives: gentoo-user

From: Marc Joliet <marcec@×××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] btrfs: subvol without compression
Date: Fri, 20 Jun 2014 10:07:22
Message-Id: 20140620120700.73303d6c@marcec
In Reply to: [gentoo-user] btrfs: subvol without compression by "Stefan G. Weichinger"
1 I don't know if you eventually found an answer yourself, but since nobody else
2 has replied, here's what I found:
3
4 Am Tue, 17 Jun 2014 13:04:08 +0200
5 schrieb "Stefan G. Weichinger" <lists@×××××.at>:
6
7 >
8 > ... I am quite happy now with the performance of that new server I am
9 > preparing.
10 >
11 > See thread "Intel(R) C600 SAS Controller" for that story:
12 >
13 > https://www.mail-archive.com/gentoo-user@l.g.o/msg146119.html
14 >
15 > Right now I get quite good results when doing backups of the 2 existing
16 > VMs (which have their virtio-disks on LVM-LVs on the host) ... up to
17 > 200MB/s ... I can show for reference, if someone is interested.
18 >
19 > I think that is around the possible maximum.
20 >
21 > --->
22 >
23 > The issue I want to share with you is related to a btrfs subvol I have here.
24 >
25 > Block device sda builds the btrfs-pool containing the root-fs:
26 >
27 > # btrfs fi show
28 > Label: ROOT uuid: 9133c469-df1e-45f5-a09f-d1b9c75c69da
29 > Total devices 1 FS bytes used 29.47GiB
30 > devid 1 size 500.00GiB used 278.04GiB path /dev/sda
31 >
32 > Btrfs v3.12
33 >
34 > These are the subvolumes (I could/should rm some, but it doesn't matter
35 > for this issue, afaik):
36 >
37 > # btrfs su list /
38 > ID 257 gen 4282 top level 5 path __active
39 > ID 258 gen 4874 top level 5 path __active/root
40 > ID 266 gen 4772 top level 258 path images
41 > ID 267 gen 838 top level 258 path images/otrs
42 > ID 289 gen 4285 top level 258 path images/windows
43 > ID 538 gen 4874 top level 5 path __active/virt-backup
44 >
45 >
46 > fstab has:
47 >
48 > # grep btrfs /etc/fstab
49 > LABEL=ROOT / btrfs defaults,noatime,compress=lzo 0 0
50 > LABEL=ROOT /mnt/virt-backup btrfs compress=no,noatime,subvolid=538 0 0
51 >
52 >
53 > ... so I want to mount subvolid 538 with disabled compression (to speed
54 > up backups as the files written to it are compressed on the fly via pigz
55 > already).
56
57 So far nothing in particular stands out, that is, it looks like everything is
58 correct.
59
60 > But after booting I get that dir mounted with compress=lzo (which is
61 > default).
62 >
63 > # mount | grep btrfs
64 > /dev/sda on / type btrfs (rw,noatime,compress=lzo,space_cache)
65 > /dev/sda on /mnt/virt-backup type btrfs
66 > (rw,noatime,compress=lzo,space_cache)
67 >
68 > remounting works, though:
69 >
70 > booze ~ # mount -o remount,compress=no /mnt/virt-backup/
71 >
72 > booze ~ # mount | grep btrfs
73 > /dev/sda on / type btrfs (rw,noatime,space_cache)
74 > /dev/sda on /mnt/virt-backup type btrfs (rw,noatime,space_cache)
75 >
76 > BUT it remounts / without compression as well ... !
77 >
78 > Is it a bug? A mistake or misunderstanding?
79
80 From my own google search, at least up to 2011 per-subvolume compression
81 settings were not possible. Then, after subsequently searching on the btrfs
82 wiki for a while, I finally found an answer: no. See this FAQ entry:
83
84 https://btrfs.wiki.kernel.org/index.php/FAQ#Can_I_mount_subvolumes_with_different_mount_options.3F
85
86 [...]
87
88 HTH
89 --
90 Marc Joliet
91 --
92 "People who think they know everything really annoy those of us who know we
93 don't" - Bjarne Stroustrup

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] btrfs: subvol without compression "Stefan G. Weichinger" <lists@×××××.at>
Re: [gentoo-user] btrfs: subvol without compression "Stefan G. Weichinger" <lists@×××××.at>