1 |
Hi all, |
2 |
|
3 |
I've become increasingly motivated to convert to btrfs. From what I've seen, |
4 |
it has become increasingly stable; enough so that it is apparently supposed to |
5 |
become the default FS on OpenSuse in 13.2. |
6 |
|
7 |
I am motivated by various reasons: |
8 |
|
9 |
- The experience of insignificant data loss after a reboot after no |
10 |
(visible) problems during normal operations (no similar occurrence since). I |
11 |
suspect this would have been discovered sooner by btrfs' data checksumming. |
12 |
|
13 |
While the data lost was of a small amount, not to mention insignificant |
14 |
(internet pictures) and could be retrieved again easily, I worry that this |
15 |
sort of silent corruption might happen to data that I *do* care about. My |
16 |
backups would become less than useless if I were to discover such corruption |
17 |
too late. |
18 |
|
19 |
- The outright sexy multiple device support :) . |
20 |
|
21 |
This migration will occur in conjunction with a migration of / + /usr to a |
22 |
cheap SSD that I just bought (Crucial M500 120 GB). The overall plan is thus as |
23 |
follows: |
24 |
|
25 |
Replace |
26 |
|
27 |
/boot on /dev/md1 (EXT3, RAID 1) |
28 |
/ (with assorted sub-directories, sans /usr) on /dev/md2 (EXT4, RAID 10) |
29 |
the rest on LVM on /dev/md3 (all LVs EXT4, RAID 10) |
30 |
|
31 |
with |
32 |
|
33 |
/ + /boot + /usr + swapfile on the SSD (EXT4) |
34 |
the rest (/home, my media partitions) on a btrfs RAID 10 |
35 |
|
36 |
(which replaces an older plan to recreate the RAID 10 + LVM to use the whole |
37 |
disks with the current 1.2 metadata format) |
38 |
|
39 |
The goals are, in addition to alleviating my data safety concerns above, to |
40 |
guarantee that I don't need an initramfs at boot (hence the SSD), and to |
41 |
greatly simplify my partitioning scheme (I just have too many separate logical |
42 |
volumes ;-) ). Any added performance is "just" a nice bonus. |
43 |
|
44 |
The reason why I would choose EXT4 for the SSD is that btrfs still lacks support |
45 |
for swap files and I worry about creating a swap partition on the SSD. Is that |
46 |
warranted, or will the wear-levelling of the SSD handle that just fine? Do swap |
47 |
partitions support SSDs specially? Also, does anyone know whether EXT4 goes |
48 |
beyond "merely" supporting TRIM? That is, the btrfs wiki advertises the |
49 |
following: |
50 |
|
51 |
"SSD (Flash storage) awareness (TRIM/Discard for reporting free blocks for |
52 |
reuse) and optimizations (e.g. avoiding unnecessary seek optimizations, |
53 |
sending writes in clusters, even if they are from unrelated files. This |
54 |
results in larger write operations and faster write throughput)" |
55 |
|
56 |
Does EXT4 also implement such optimisations for SSDs? |
57 |
|
58 |
So I guess I want to know: does anybody have any further suggestions to make? |
59 |
Is btrfs a good choice for / after all? And should I be using the most recent |
60 |
kernel versions? (I would go with no, despite the advice from upstream, because |
61 |
the changes in the last two versions don't seem to be particularly user |
62 |
visible, at least to me, from reading kernelnewbies.org.) |
63 |
|
64 |
I also have a more specific question regarding RAID 10: the btrfs wiki says |
65 |
that you can add devices with different sizes to a multiple device setup, but I |
66 |
don't think it says to which RAID levels this applies and how. From [0] I would |
67 |
say it works with RAID 10 (since that's what the example uses), but thought |
68 |
maybe somebody here knows more details and/or gotchas. From my understanding, |
69 |
this means that I can iteratively upgrade my RAID 10 to larger drives and have |
70 |
btrfs use all of the available space (or at least as much as is possible). This |
71 |
is important to me because I currently have 4 320 GB HDDs + 1 (possibly broken, |
72 |
must check) spare and wish to be able to upgrade without having to buy four |
73 |
HDDs at once. |
74 |
|
75 |
Now to the migration plan: first, partition the SSD and copy all relevant file |
76 |
systems to it; this will be done from a Live-CD (SystemRescueCD). After I have |
77 |
configured the mount options appropriately and can boot from that, I should be |
78 |
able to mount the other file systems (/home and my media partitions) read-only |
79 |
from the actual system and do the RAID + LVM -> btrfs migration from there. |
80 |
|
81 |
Note that I will in general follow the advice from [1-3], and if people |
82 |
recommend btrfs on /, then I will also try to get relevant information from [4]. |
83 |
|
84 |
[0] |
85 |
https://btrfs.wiki.kernel.org/index.php/SysadminGuide#RAID_and_data_replication |
86 |
[1] https://wiki.archlinux.org/index.php/Solid_State_Drives |
87 |
[2] https://wiki.archlinux.org/index.php/Btrfs |
88 |
[3] http://wiki.gentoo.org/wiki/Btrfs |
89 |
[4] http://wiki.gentoo.org/wiki/Btrfs_system_root |
90 |
|
91 |
Greetings and thanks in advance for any help given |
92 |
-- |
93 |
Marc Joliet |
94 |
-- |
95 |
"People who think they know everything really annoy those of us who know we |
96 |
don't" - Bjarne Stroustrup |