Linux Lite Forums

Hardware - Support => Hard Drives and SSDs => Topic started by: Silicon on February 10, 2018, 09:19:48 AM

Title: Set up encrypted RAID 1 volume in Linux Lite 2.6 64bit
Post by: Silicon on February 10, 2018, 09:19:48 AM
I've been interested in Linux Lite for years and finally used it to build a dedicated system as my primary desktop. It's booting off an encrypted SSD, so LVM is already enabled. I'm using LL release 2.6 64-bit and would prefer to stick with this release unless upgrading is absolutely necessary. Hardware is an HP xw8400 PC.

I just added a pair of 2TB SATA HDDs to use as a RAID 1 data store. Set them up as RAID 1 mirrored drives called "storage" in the Intel Matrix Storage Manager and running GParted shows the individual drives as /dev/sdb and /dev/sdc, along with the RAID device as /dev/mapper/isw_beeaagchga_storage.

Here's where I'm stuck - how to turn the RAID 1 device into an encrypted volume? I've seen wildly varying instructions on various blogs and web sites and have tried a couple of different methods with no success. GParted doesn't seem to offer an obvious method.

This is my first post to this forum. Thanks in advance for the assistance.
Title: Re: Set up encrypted RAID 1 volume in Linux Lite 2.6 64bit
Post by: trinidad on February 10, 2018, 01:46:34 PM
I don't use your structure but perhaps this link will advise.

https://superuser.com/questions/1038411/debian-encrypted-raid-1-setup

TC
Title: Re: Set up encrypted RAID 1 volume in Linux Lite 2.6 64bit
Post by: Silicon on February 11, 2018, 10:11:06 AM
Thanks, followed those instructions and now I've got a desktop icon labeled "2.0 TB Encrypted" that authenticates and mounts when double-clicked. A few follow-up issues:

1. When mounted it appears as "2.0 TB Volume" on the left side of the File Manager, and it mounts to /media/administrator/f7761b96-6f7f-4c03-b131-360d860c8f0f/. How can I specify a new name and mount point? Ideally I'd like it to just mount it to /storage/ or something similarly simple near the root level of the filesystem. Or should I just create a directory called /storage/ that links to /media/administrator/f7761b96-6f7f-4c03-b131-360d860c8f0f/ and call it a day?

2. Is there a way to invoke the opening & mounting of the encrypted volume at login so I don't have to double-click the desktop icon?

3. Is there a way to change the appearance of the desktop icon? It's currently a generic curled piece of paper and when I try to apply an emblem in the properties panel it doesn't seem to have any effect.
Title: Re: Set up encrypted RAID 1 volume in Linux Lite 2.6 64bit
Post by: trinidad on February 11, 2018, 12:02:48 PM
You can modify grub to prompt you for a password to mount the volume, but the volume would have to part of your file system i/e have some files saved on it already and be included as one big single disk. Otherwise Grub would need the disk UUIDs and initrd from your OS kernel would need the volume UUID, which you could do with an SELinux loopback to grub kind of like an ISO setup. Jerry may have a better idea. Right now you're on the media channel, that is your RAID device is being treated like removable storage which has some advantages (protects your OS from disk failure problems) and some disadvantages (does not mount at boot with the OS). I don't know what you're saving, what data you intend to store on the volume but you might want to look into Debian open media vault instead. Really pretty easy to set up and use. 

TC