Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #180920

Re: Encrypted RAID1 for storage with Debian Jessie

From commentsabout@riseup.net
Newsgroups linux.debian.user
Subject Re: Encrypted RAID1 for storage with Debian Jessie
Date 2017-05-11 01:50 +0200
Message-ID <tFJwJ-76F-11@gated-at.bofh.it> (permalink)
References <txNe9-5Mj-1@gated-at.bofh.it> <tybzP-47z-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello,

On 2017-04-19 09:11, tv.debian@googlemail.com wrote:
> System on usb flash disks always caused me troubles, I use it only if
> the system can be loaded in ram at boot time and the drive isn't used
> for write operation. A low-end small SSD would be a far better option
> in my opinion.

Thanks for the advice. I managed to find a 40 Go Intel SSD, for under 
30€ :)

On 2017-04-19 15:06, Joshua Schaeffer wrote:
> I can't speak to your system being on USB, but in general you can just
> do something like the following:
> 
>     $mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda
> /dev/sdb
>     $mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/sdc
> /dev/sdd
>     $mdadm --create /dev/md2 --level=1 --raid-devices=2 /dev/sde
> /dev/sdf
> 
> If you want to use LVM then you create the PV, VG, and LV:
> 
>     $pvcreate /dev/md0
>     $pvcreate /dev/md1
>     $pvcreate /dev/md2
>     $vgcreate vg_data1 /dev/md0
>     $vgcreate vg_data2 /dev/md1
>     $vgcreate vg_data3 /dev/md2
>     $lvcreate vg_data1 -n lv_data1 -L <size>
>     $lvcreate vg_data2 -n lv_data2 -L <size>
> 
>     $lvcreate vg_data3 -n lv_data3 -L <size>
> 
> Then create your LUKS partition:
> 
>     $cryptsetup -v --verify-passphrase luksFormat /dev/mapper/lv_data1
> vg_data1-lv_data1_crypt
>     $cryptsetup -v --verify-passphrase luksFormat /dev/mapper/lv_data2
> vg_data2-lv_data2_crypt
> 
>     $cryptsetup -v --verify-passphrase luksFormat /dev/mapper/lv_data3
> vg_data3-lv_data3_crypt
> 
> Then create your filesystem and mount them:
> 
>     $mkfs.ext4 /dev/mapper/vg_data1-lv_data1_crypt
>     $mkfs.ext4 /dev/mapper/vg_data2-lv_data2_crypt
> 
>     $mkfs.ext4 /dev/mapper/vg_data3-lv_data3_crypt
> 
>     $mount -t ext4 /dev/mapper/vg_data1-lv_data1_crypt /mnt/data1
>     $mount -t ext4 /dev/mapper/vg_data2-lv_data2_crypt /mnt/data2
> 
>     $mount -t ext4 /dev/mapper/vg_data3-lv_data3_crypt /mnt/data3

Thank you for the detailed explanations.

I'm a complete noob when it comes to this kind of operations, so, sorry 
for the dumb question : following tv.debian@'s advises, I purchased a 
cheap SSD and installed my system on it (the SSD, and one pair of HDD 
are plugged in). From there on, how should I proceed ?

Thanks in advanced for your help.

CA

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Encrypted RAID1 for storage with Debian Jessie commentsabout@riseup.net - 2017-04-19 04:10 +0200
  Re: Encrypted RAID1 for storage with Debian Jessie "tv.debian@googlemail.com" <tv.debian@googlemail.com> - 2017-04-19 11:20 +0200
    Re: Encrypted RAID1 for storage with Debian Jessie Joshua Schaeffer <jschaeffer0922@gmail.com> - 2017-04-19 17:10 +0200
  Re: Encrypted RAID1 for storage with Debian Jessie David Christensen <dpchrist@holgerdanske.com> - 2017-04-20 06:10 +0200
    Re: Encrypted RAID1 for storage with Debian Jessie commentsabout@riseup.net - 2017-05-11 01:50 +0200
      Re: Encrypted RAID1 for storage with Debian Jessie commentsabout@riseup.net - 2017-06-06 14:00 +0200
      Re: Encrypted RAID1 for storage with Debian Jessie Andy Smith <andy@strugglers.net> - 2017-06-07 08:20 +0200
        Re: Encrypted RAID1 for storage with Debian Stretch commentsabout@riseup.net - 2017-08-30 13:50 +0200
          Re: Encrypted RAID1 for storage with Debian Stretch David Christensen <dpchrist@holgerdanske.com> - 2017-08-31 06:00 +0200
            Re: Encrypted RAID1 for storage with Debian Stretch commentsabout@riseup.net - 2017-08-31 15:40 +0200
              Re: Encrypted RAID1 for storage with Debian Stretch David Christensen <dpchrist@holgerdanske.com> - 2017-09-01 07:30 +0200
        Re: Encrypted RAID1 for storage with Debian Jessie commentsabout@riseup.net - 2017-08-31 02:10 +0200

csiph-web