1 |
OK, I am in the middle of copying over my data from my backups to the freshly |
2 |
created btrfs file system :-) . Read more below. |
3 |
|
4 |
Am Wed, 7 May 2014 00:53:07 +0200 |
5 |
schrieb Marc Joliet <marcec@×××.de>: |
6 |
|
7 |
[...] |
8 |
> While I am unsure of my choice of RAID level (some comments on LWN.net claim |
9 |
> that the MD RAID 10 is more comparable to btrfs' RAID 1, which I will attempt to |
10 |
> verify myself beforehand). However, due to btrfs' live rebalancing feature, I |
11 |
> worry less about this. By the time I really need more space the RAID 5/6 code |
12 |
> (and maybe N-way mirroring) ought to be stable (or at least finished), or I |
13 |
> can switch to RAID 1 if I need the flexibility. |
14 |
|
15 |
I went with RAID 10 for data and RAID 1 for meta-data. I will see how the disk |
16 |
usage actually turns out and can decide from there whether I want to change |
17 |
either one if I'm not satisfied. |
18 |
|
19 |
> [...] |
20 |
> > The reason why I would choose EXT4 for the SSD is that btrfs still lacks support |
21 |
> > for swap files and I worry about creating a swap partition on the SSD. Is that |
22 |
> > warranted, or will the wear-levelling of the SSD handle that just fine? Do swap |
23 |
> > partitions support SSDs specially? Also, does anyone know whether EXT4 goes |
24 |
> > beyond "merely" supporting TRIM? That is, the btrfs wiki advertises the |
25 |
> > following: |
26 |
> > |
27 |
> > "SSD (Flash storage) awareness (TRIM/Discard for reporting free blocks for |
28 |
> > reuse) and optimizations (e.g. avoiding unnecessary seek optimizations, |
29 |
> > sending writes in clusters, even if they are from unrelated files. This |
30 |
> > results in larger write operations and faster write throughput)" |
31 |
> > |
32 |
> > Does EXT4 also implement such optimisations for SSDs? |
33 |
> |
34 |
> I will also go ahead with this (despite the open questions), although I will |
35 |
> leave swap on the LVM for now. I think tonight (well, today) I "just" want to |
36 |
> get the SSD running. Furthermore, "btrfs convert" should be able to up-convert |
37 |
> it in the future once btrfs is "production ready" (both articles make a |
38 |
> guesstimate of about 1-2 years). |
39 |
> |
40 |
> I think I would also prefer running a few days from the SSD before converting |
41 |
> "the rest" to btrfs, which should be fairly simple at that point. |
42 |
|
43 |
So, as before, the conversion was straightforward, since the RAID + LVM only |
44 |
contained /home and data, thus I could convert without rebooting (though I will |
45 |
reboot once the backups are restored, just to see if that works as expected). |
46 |
|
47 |
Anyway, I performed the following steps: |
48 |
|
49 |
- remount all affected partitions read-only |
50 |
- perform one last backup |
51 |
- unmount the affected partitions |
52 |
- shut down the logical volumes and the RAID (also, remove mdadm, mdraid and |
53 |
lvm from all run-levels) |
54 |
- run "mkfs.btrfs -f -m raid1 -d raid10 -L MARCEC_STORAGE /dev/sd{a,b,c,d}" (-f |
55 |
because the HDDs still had a partition table) |
56 |
- create subvolumes where I used to have separate partitions (adjusting |
57 |
permissions where necessary) |
58 |
- rsync /home from the backup drive (which was surprisingly fast) |
59 |
|
60 |
What I am now in the middle of (2/3 of the way through) is syncing my media |
61 |
partitions. After that, the conversion will be complete, and I will hope and |
62 |
pray to our noodly overlord that I don't encounter any bugs. |
63 |
|
64 |
[...] |
65 |
> Thus the question arises: are there any show-stopper bugs in gentoo-sources |
66 |
> 3.14.x that I should be aware about? They don't have to be directly btrfs |
67 |
> related. |
68 |
|
69 |
This is still an open question. I of course already upgraded prior to the btrfs |
70 |
conversion and haven't noticed anything out of the ordinary, but I would be |
71 |
interested in anybody else's experience. |
72 |
|
73 |
One other thing I noticed: my old RAID had the distinct disadvantage that the |
74 |
newest drive I had added to it had a different alignment than the old ones. |
75 |
Since I had to copy the partition table from one of the existing drives, it was |
76 |
not possible to accommodate this (though I only found out after recently |
77 |
running "blockdev --getalignoff"). I suspect btrfs could be able to deal with |
78 |
that better than mdraid, and searching for "alignment" on the btrfs wiki shows |
79 |
results which heavily imply that it in fact can (quote from the description of |
80 |
the btrfs_chunk data structure: "Optimal alignment parameters for block I/O"). |
81 |
|
82 |
Anyway, everything seems to be running fine so far :-) . |
83 |
|
84 |
[...] |
85 |
|
86 |
-- |
87 |
Marc Joliet |
88 |
-- |
89 |
"People who think they know everything really annoy those of us who know we |
90 |
don't" - Bjarne Stroustrup |