Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dm-crypt, btrfs, multiple disks
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
BlueFusion
Apprentice
Apprentice


Joined: 08 Mar 2006
Posts: 282
Location: Cleveland, Ohio

PostPosted: Sun Mar 03, 2013 8:51 am    Post subject: dm-crypt, btrfs, multiple disks Reply with quote

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?
_________________
Desktop: i7-940 @ 2.93GHz, ASUS P6T Deluxe, 6GB RAM, 2x 160GB, 2x 500GB, 1x 1TB Seagate Barracuda SATA, nVidia 8800GTS 512MB, Hauppage PVR-250
Back to top
View user's profile Send private message
popsUlfr
Tux's lil' helper
Tux's lil' helper


Joined: 27 Feb 2011
Posts: 80

PostPosted: Sun Mar 03, 2013 2:27 pm    Post subject: Reply with quote

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
View user's profile Send private message
BlueFusion
Apprentice
Apprentice


Joined: 08 Mar 2006
Posts: 282
Location: Cleveland, Ohio

PostPosted: Sun Mar 03, 2013 3:47 pm    Post subject: Reply with quote

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 :wink: .
_________________
Desktop: i7-940 @ 2.93GHz, ASUS P6T Deluxe, 6GB RAM, 2x 160GB, 2x 500GB, 1x 1TB Seagate Barracuda SATA, nVidia 8800GTS 512MB, Hauppage PVR-250
Back to top
View user's profile Send private message
popsUlfr
Tux's lil' helper
Tux's lil' helper


Joined: 27 Feb 2011
Posts: 80

PostPosted: Sun Mar 03, 2013 4:03 pm    Post subject: Reply with quote

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 :wink: .


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
View user's profile Send private message
BlueFusion
Apprentice
Apprentice


Joined: 08 Mar 2006
Posts: 282
Location: Cleveland, Ohio

PostPosted: Sun Mar 03, 2013 4:49 pm    Post subject: Reply with quote

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.
_________________
Desktop: i7-940 @ 2.93GHz, ASUS P6T Deluxe, 6GB RAM, 2x 160GB, 2x 500GB, 1x 1TB Seagate Barracuda SATA, nVidia 8800GTS 512MB, Hauppage PVR-250
Back to top
View user's profile Send private message
popsUlfr
Tux's lil' helper
Tux's lil' helper


Joined: 27 Feb 2011
Posts: 80

PostPosted: Sun Mar 03, 2013 5:26 pm    Post subject: Reply with quote

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 :D
Let's just hope that mixing all these layers together goes well in the end.
Back to top
View user's profile Send private message
BlueFusion
Apprentice
Apprentice


Joined: 08 Mar 2006
Posts: 282
Location: Cleveland, Ohio

PostPosted: Mon Mar 04, 2013 12:37 am    Post subject: Reply with quote

popsUlfr wrote:
Let's just hope that mixing all these layers together goes well in the end.


You and me both, my friend.
_________________
Desktop: i7-940 @ 2.93GHz, ASUS P6T Deluxe, 6GB RAM, 2x 160GB, 2x 500GB, 1x 1TB Seagate Barracuda SATA, nVidia 8800GTS 512MB, Hauppage PVR-250
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum