Gentoo Archives: gentoo-user

From: "Stefan G. Weichinger" <lists@×××××.at>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] btrfs and gcc 4.9
Date: Sat, 08 Nov 2014 21:07:33
Message-Id: 545E8608.7030605@xunil.at
In Reply to: [gentoo-user] btrfs and gcc 4.9 by James
1 Am 08.11.2014 um 21:27 schrieb James:
2
3 > If you would be so cool as to post your subvolume setup;
4 > I'd be very grateful:
5
6 [..]
7
8 > I guess what really has me "confused" is to set up a traditional
9 > fstab, uuid, efi, with grub2. I'm just "dense" I guess
10 > because the aforementioned doc, I think derived from some
11 > of "Duncan's" postings just does not click for me. I've botched
12 > a few runs at btrfs (raid1) one on fresh gentoo installs, just
13 > so you know....
14
15 Starting with filesystems like zfs or btrfs means learning new concepts,
16 yes.
17
18 You talk of subvolumes but show partitioning ... right?
19
20 OK, what do I have here?
21
22 A bit easier as I don't run rootfs on a raid on my main box. I use
23 btrfs-pools with redundancy as well but not in this case.
24
25 The SSD here is partitioned like this:
26
27 Found valid GPT with protective MBR; using GPT.
28 Disk /dev/sda: 488397168 sectors, 232.9 GiB
29 Logical sector size: 512 bytes
30 Disk identifier (GUID): 32048E18-BD83-4873-96CF-48D04B8739E6
31 Partition table holds up to 128 entries
32 First usable sector is 34, last usable sector is 488397134
33 Partitions will be aligned on 2048-sector boundaries
34 Total free space is 2349 sectors (1.1 MiB)
35
36 Number Start (sector) End (sector) Size Code Name
37 1 2048 194559 94.0 MiB EF00 ESI
38 2 194560 480585727 229.1 GiB 8300 Linux filesystem
39 3 480585728 488396799 3.7 GiB 8200
40
41 (partition 3 is just some slice left over afaik)
42
43 -
44
45 /dev/sda2 went into one of the btrfs "pools" here:
46
47 # btrfs fi show
48 Label: 'btrfs_evo' uuid: 741835e6-95a3-49f3-ba85-2ffe3ea0730d
49 Total devices 1 FS bytes used 58.28GiB
50 devid 1 size 229.07GiB used 63.02GiB path /dev/sda2
51
52 -
53
54 And from here you can start to create and use btrfs-subvolumes.
55
56 I currently have the following subvolumes in this pool:
57
58 # btrfs su list /
59 ID 256 gen 56 top level 5 path __active
60 ID 257 gen 2223 top level 256 path __active/root
61 ID 275 gen 2224 top level 256 path __active/root_rasa
62 ID 281 gen 2223 top level 256 path __active/home
63 ID 312 gen 851 top level 256 path __active/oopsfiles
64
65 And then I use them and mount them via /etc/fstab
66
67
68 # grep 741835e6-95a3-49f3-ba85-2ffe3ea0730d /etc/fstab
69 UUID=741835e6-95a3-49f3-ba85-2ffe3ea0730d /mnt/btrfs_pool1 btrfs
70 noauto,noatime,compress=lzo,subvolid=5 0 0
71
72 UUID=741835e6-95a3-49f3-ba85-2ffe3ea0730d / btrfs
73 defaults,noatime,compress=lzo,subvolid=257 0 0
74
75 UUID=741835e6-95a3-49f3-ba85-2ffe3ea0730d /home btrfs
76 defaults,noatime,compress=lzo,subvolid=281 0 0
77
78 UUID=741835e6-95a3-49f3-ba85-2ffe3ea0730d /home/sgw/oopsfiles btrfs
79 defaults,noatime,compress=lzo,subvolid=312 0 0
80
81 UUID=741835e6-95a3-49f3-ba85-2ffe3ea0730d /mnt/root_rasa btrfs
82 x-systemd.automount,noatime,compress=lzo,subvolid=275 0 0
83
84
85 A special note here for mountpoint /mnt/btrfs_pool1: with subvolid 5 I
86 get access to the "root" or top of this btrfs pool: in this mountpoint
87 you can access all the subvolumes like in a directory tree. I mount it
88 "noauto" ... I sometimes use this to modify things or work with snapshots.
89
90 -
91
92 If you set up your btrfs pool with raid1 redundancy this doesn't make
93 any difference from there. Create subvolumes and mount them where you
94 need them.
95
96 -
97
98 Does this help in any way?
99
100 Did you create your pool already?
101
102 There are lots of things to say here, please let us know where we can
103 help, learn and share ;-)
104
105 Stefan

Replies

Subject Author
Re: [gentoo-user] btrfs and gcc 4.9 "Stefan G. Weichinger" <lists@×××××.at>
[gentoo-user] Re: btrfs and gcc 4.9 James <wireless@×××××××××××.com>