View previous topic :: View next topic |
Author |
Message |
BlueFusion Guru
Joined: 08 Mar 2006 Posts: 371
|
Posted: Sun Mar 03, 2013 8:51 am Post subject: dm-crypt, btrfs, multiple disks |
|
|
I just started dabbling in dm-crypt on my laptop. I reimaged my harddrive with dm-crypt with btrfs running on top of it. It was easier than I had expected, and the results are good.
My next step is to do this to my desktop. But this would not be so simple (atleast I think not).
I have 3 hard drive that I want to be in a RAID0 btrfs pool. I have a fourth harddrive which contains my /boot partition and Windows.
Ideally, the final product would be a passphrase encrypted, RAID0 btrfs filesystem housing everything Linux (no need for swap on this PC).
How do I go about encrypting all 3 drives as one and then have a functioning btrfs filesystem on top of that? I was thinking this:
physical disks <-> mdadm RAID0 <-> dm-crypt/LUKS <-> btrfs
I'm fairly certain it would work, HOWEVER, this would remove the safeguards that btrfs with the checksums and automatically replacing bad data with the correct data (again, based on checksums). The mdadm layer would prevent this should a disk start to display any bad sectors.
Does anybody have any better ideas? _________________ i7-940 2.93Ghz | ASUS P6T Deluxe (v.1) | 24GB Triple Channel RAM | nVidia GTX660
4x 4TB Seagate NAS HDD (Btrfs raid5) | 2x 120GB Samsung 850 EVO SSD (Btrfs raid1) |
|
Back to top |
|
|
popsUlfr Tux's lil' helper
Joined: 27 Feb 2011 Posts: 80
|
Posted: Sun Mar 03, 2013 2:27 pm Post subject: |
|
|
Hi!
What about this setup:
physical disks <-> mdadm RAID0 <-> lvm2 <-> dm-crypt/LUKS <-> btrfs
?
LVM2 supports metadata+checksums and your luks partition can reside on a logical lvm2 volume which possesses a few safeguards that interest you. It also gives you the flexibility of lvm2 and the features of btrfs at the same time.
I'm using physical disks <-> dm-crypt/LUKS <-> lvm2 <-> ext4 on my laptop. Never really thought about bad sectors and such and I'm not sure how luks would react to them. |
|
Back to top |
|
|
BlueFusion Guru
Joined: 08 Mar 2006 Posts: 371
|
Posted: Sun Mar 03, 2013 3:47 pm Post subject: |
|
|
Hmm, I used LVM once before (a long time ago) and had some poor experiences. I suppose I can give it another try. Since the checksums and the logical volumes is what I am after, that would eliminate the need for btrfs . _________________ i7-940 2.93Ghz | ASUS P6T Deluxe (v.1) | 24GB Triple Channel RAM | nVidia GTX660
4x 4TB Seagate NAS HDD (Btrfs raid5) | 2x 120GB Samsung 850 EVO SSD (Btrfs raid1) |
|
Back to top |
|
|
popsUlfr Tux's lil' helper
Joined: 27 Feb 2011 Posts: 80
|
Posted: Sun Mar 03, 2013 4:03 pm Post subject: |
|
|
BlueFusion wrote: | Hmm, I used LVM once before (a long time ago) and had some poor experiences. I suppose I can give it another try. Since the checksums and the logical volumes is what I am after, that would eliminate the need for btrfs . |
Well it does not completely eliminate the need for btrfs since are some nice features coming with it although it is still an unstable filesystem and I personally would not store my files on a still unstable fs. LVM2 is quite awesome in my opinion, and you can just put about any filesystem on it and still profit from the features coming with lvm. I never had any issue with it but If you do get some troubles just post about it here |
|
Back to top |
|
|
BlueFusion Guru
Joined: 08 Mar 2006 Posts: 371
|
Posted: Sun Mar 03, 2013 4:49 pm Post subject: |
|
|
I do like the btrfs features. It will probably be experimental for atleast another year. It really did mature over the past year, though. Each kernel release had a major improvement to it since 3.0, be it a feature, speed up, or major bug fixes.
I used it on my HTPC desktop in a RAID0 configuration for just under 1 year. I got rid of btrfs as the rootfs because at the time it did not have any function to defragment itself....and with a nearly full filesystem, it was getting slowwwww.
I have also used it as my /usr/src, /usr/portage, and other misc storage (backed up of course) on all of my PCs and a server all without a single hiccup in the last 3 years.
I know I have less than 24 hours on it, but it is running well on my laptop as the rootfs ontop of dm-crypt/luks. I am confident that it will be "stable" for my needs. Nothing on here is critically important. My music collection is what I am most concerned about, and I have it synced across 2 desktops, my laptop, and a backup Dell PE2650.
Of course no matter which way I go, things will be backed up. I'm planning on going with 2x 3TB (or possibly 3x2TB) 7200RPM drives for the btrfs RAID0 array which will be used for everything Linux and then 2x 3TB 5400RPM drives for a second btrfs JBOD array which will contain my /backup filesystem. _________________ i7-940 2.93Ghz | ASUS P6T Deluxe (v.1) | 24GB Triple Channel RAM | nVidia GTX660
4x 4TB Seagate NAS HDD (Btrfs raid5) | 2x 120GB Samsung 850 EVO SSD (Btrfs raid1) |
|
Back to top |
|
|
popsUlfr Tux's lil' helper
Joined: 27 Feb 2011 Posts: 80
|
Posted: Sun Mar 03, 2013 5:26 pm Post subject: |
|
|
BlueFusion wrote: | Of course no matter which way I go, things will be backed up. I'm planning on going with 2x 3TB (or possibly 3x2TB) 7200RPM drives for the btrfs RAID0 array which will be used for everything Linux and then 2x 3TB 5400RPM drives for a second btrfs JBOD array which will contain my /backup filesystem. |
My goodness, you're covered on all bases with such a setup
Let's just hope that mixing all these layers together goes well in the end. |
|
Back to top |
|
|
BlueFusion Guru
Joined: 08 Mar 2006 Posts: 371
|
Posted: Mon Mar 04, 2013 12:37 am Post subject: |
|
|
popsUlfr wrote: | Let's just hope that mixing all these layers together goes well in the end. |
You and me both, my friend. _________________ i7-940 2.93Ghz | ASUS P6T Deluxe (v.1) | 24GB Triple Channel RAM | nVidia GTX660
4x 4TB Seagate NAS HDD (Btrfs raid5) | 2x 120GB Samsung 850 EVO SSD (Btrfs raid1) |
|
Back to top |
|
|
|