1 |
OK, I read several articles (the LWN.net series from December/January [5] and a |
2 |
January article from ars technica [6]) and quite a lot of comments on btrfs |
3 |
today and can answer some of my questions myself. |
4 |
|
5 |
For completions sake, I also read a zdnet article series (starting at [7]), but |
6 |
it wasn't quite as good as the other two IMHO. |
7 |
|
8 |
Am Tue, 6 May 2014 12:18:32 +0200 |
9 |
schrieb Marc Joliet <marcec@×××.de>: |
10 |
|
11 |
[...] |
12 |
> This migration will occur in conjunction with a migration of / + /usr to a |
13 |
> cheap SSD that I just bought (Crucial M500 120 GB). The overall plan is thus as |
14 |
> follows: |
15 |
> |
16 |
> Replace |
17 |
> |
18 |
> /boot on /dev/md1 (EXT3, RAID 1) |
19 |
> / (with assorted sub-directories, sans /usr) on /dev/md2 (EXT4, RAID 10) |
20 |
> the rest on LVM on /dev/md3 (all LVs EXT4, RAID 10) |
21 |
> |
22 |
> with |
23 |
> |
24 |
> / + /boot + /usr + swapfile on the SSD (EXT4) |
25 |
> the rest (/home, my media partitions) on a btrfs RAID 10 |
26 |
|
27 |
This part I think I will stick with. From what I've read so far, I wouldn't |
28 |
trust my entire system to btrfs. Since "the rest" consists of stuff I either |
29 |
automatically backup (using rsnapshot) or have multiple copies of, I should be |
30 |
able to recover from a broken btrfs file system fairly easily. |
31 |
|
32 |
While I am unsure of my choice of RAID level (some comments on LWN.net claim |
33 |
that the MD RAID 10 is more comparable to btrfs' RAID 1, which I will attempt to |
34 |
verify myself beforehand). However, due to btrfs' live rebalancing feature, I |
35 |
worry less about this. By the time I really need more space the RAID 5/6 code |
36 |
(and maybe N-way mirroring) ought to be stable (or at least finished), or I |
37 |
can switch to RAID 1 if I need the flexibility. |
38 |
|
39 |
[...] |
40 |
> The reason why I would choose EXT4 for the SSD is that btrfs still lacks support |
41 |
> for swap files and I worry about creating a swap partition on the SSD. Is that |
42 |
> warranted, or will the wear-levelling of the SSD handle that just fine? Do swap |
43 |
> partitions support SSDs specially? Also, does anyone know whether EXT4 goes |
44 |
> beyond "merely" supporting TRIM? That is, the btrfs wiki advertises the |
45 |
> following: |
46 |
> |
47 |
> "SSD (Flash storage) awareness (TRIM/Discard for reporting free blocks for |
48 |
> reuse) and optimizations (e.g. avoiding unnecessary seek optimizations, |
49 |
> sending writes in clusters, even if they are from unrelated files. This |
50 |
> results in larger write operations and faster write throughput)" |
51 |
> |
52 |
> Does EXT4 also implement such optimisations for SSDs? |
53 |
|
54 |
I will also go ahead with this (despite the open questions), although I will |
55 |
leave swap on the LVM for now. I think tonight (well, today) I "just" want to |
56 |
get the SSD running. Furthermore, "btrfs convert" should be able to up-convert |
57 |
it in the future once btrfs is "production ready" (both articles make a |
58 |
guesstimate of about 1-2 years). |
59 |
|
60 |
I think I would also prefer running a few days from the SSD before converting |
61 |
"the rest" to btrfs, which should be fairly simple at that point. |
62 |
|
63 |
[...] |
64 |
> Is btrfs a good choice for / after all? |
65 |
|
66 |
I have decided: not without a full system backup (which I don't really want). |
67 |
|
68 |
> And should I be using the most recent |
69 |
> kernel versions? (I would go with no, despite the advice from upstream, because |
70 |
> the changes in the last two versions don't seem to be particularly user |
71 |
> visible, at least to me, from reading kernelnewbies.org.) |
72 |
|
73 |
I changed my mind on this: I checked the change logs from the btrfs wiki and |
74 |
realised I should really give the notion of having the latest bug fixes more |
75 |
weight. *Especially* since the focus of the mainline btrfs development is |
76 |
stability and performance (and finalisation of central features, e.g., RAID5/6 |
77 |
support, but that's less important). |
78 |
|
79 |
Thus the question arises: are there any show-stopper bugs in gentoo-sources |
80 |
3.14.x that I should be aware about? They don't have to be directly btrfs |
81 |
related. |
82 |
|
83 |
> I also have a more specific question regarding RAID 10: the btrfs wiki says |
84 |
> that you can add devices with different sizes to a multiple device setup, but I |
85 |
> don't think it says to which RAID levels this applies and how. From [0] I would |
86 |
> say it works with RAID 10 (since that's what the example uses), but thought |
87 |
> maybe somebody here knows more details and/or gotchas. From my understanding, |
88 |
> this means that I can iteratively upgrade my RAID 10 to larger drives and have |
89 |
> btrfs use all of the available space (or at least as much as is possible). This |
90 |
> is important to me because I currently have 4 320 GB HDDs + 1 (possibly broken, |
91 |
> must check) spare and wish to be able to upgrade without having to buy four |
92 |
> HDDs at once. |
93 |
|
94 |
From the [5] I learned that RAID 10 can be extended with *pairs* of drives, so |
95 |
that answers that question. Since my SATA ports are all occupied, I can't just |
96 |
hook up two new drives and remove the old ones. |
97 |
|
98 |
So I have a new question: does "btrfs replace" work if the new drive is larger |
99 |
than the old one? Again, according to [0] it sounds like it should work, but |
100 |
it's not clear to me. |
101 |
|
102 |
As an addendum: btrfs does not support hot spares, but you can easily replace |
103 |
one drive with another, so I can keep my current setup; I just have to replace |
104 |
any failed drive manually (for now). |
105 |
|
106 |
Also (OT): the possibly broken drive (sda) might have simply been a loose SATA |
107 |
cable. The first time it spontaneously failed (triggering the minor data loss |
108 |
mentioned above), adjusting the SATA cables got it to work again, albeit |
109 |
unstably. Today I adjusted the SATA cables again after a different drive (sdd) |
110 |
spontaneously gave up yesterday, and sda started passing SMART tests (both short |
111 |
and long) again (sdd passed, too). Color me confused :-/ . I should see if I |
112 |
can buy shorter SATA cables so they don't get in each others way so much. |
113 |
|
114 |
[...] |
115 |
> [0] |
116 |
> https://btrfs.wiki.kernel.org/index.php/SysadminGuide#RAID_and_data_replication |
117 |
> [1] https://wiki.archlinux.org/index.php/Solid_State_Drives |
118 |
> [2] https://wiki.archlinux.org/index.php/Btrfs |
119 |
> [3] http://wiki.gentoo.org/wiki/Btrfs |
120 |
> [4] http://wiki.gentoo.org/wiki/Btrfs_system_root |
121 |
|
122 |
[5] http://lwn.net/Articles/576276/ |
123 |
[6] |
124 |
http://arstechnica.com/information-technology/2014/01/bitrot-and-atomic-cows-inside-next-gen-filesystems/ |
125 |
[7] |
126 |
http://www.zdnet.com/btrfs-hands-on-my-first-experiments-with-a-new-linux-file-system-7000023681/ |
127 |
|
128 |
> Greetings and thanks in advance for any help given |
129 |
-- |
130 |
Marc Joliet |
131 |
-- |
132 |
"People who think they know everything really annoy those of us who know we |
133 |
don't" - Bjarne Stroustrup |