add scripts to enable lukscrypto over md (softwareraid)
Signed-off-by: Nico Schottelius <nico@denkbrett.schottelius.org>
This commit is contained in:
parent
7c0ca71ed4
commit
03d1f4c451
2 changed files with 28 additions and 0 deletions
26
buch_start.sh
Executable file
26
buch_start.sh
Executable file
|
@ -0,0 +1,26 @@
|
|||
|
||||
#devs='/dev/sde /dev/sdf /dev/sdg'
|
||||
devs="/dev/sdb /dev/sdc /dev/sdd"
|
||||
set -e
|
||||
set -x
|
||||
mdadm --assemble /dev/md0 $devs
|
||||
cryptsetup luksOpen /dev/md0 raid
|
||||
fsck /dev/mapper/raid
|
||||
mount /home/server/raid
|
||||
|
||||
exit 0
|
||||
|
||||
#mdadm --assemble /dev/md0 /dev/sde /dev/sdf /dev/sdg
|
||||
#cryptsetup luksOpen /dev/md0 raid
|
||||
|
||||
[19:25] denkbrett:~nico# mdadm --assemble --scan
|
||||
/dev/md0: File exists
|
||||
mdadm: /dev/md/0 has been started with 2 drives (out of 3).
|
||||
mdadm: /dev/md/0 already active, cannot restart it!
|
||||
mdadm: /dev/md/0 needed for /dev/sdc...
|
||||
mdadm: /dev/md/0 already active, cannot restart it!
|
||||
mdadm: /dev/md/0 needed for /dev/sdc...
|
||||
[19:25] denkbrett:~nico# mdadm --manage -a /dev/md0 /dev/sdc
|
||||
mdadm: re-added /dev/sdc
|
||||
[19:25] denkbrett:~nico#
|
||||
|
2
buch_stop.sh
Executable file
2
buch_stop.sh
Executable file
|
@ -0,0 +1,2 @@
|
|||
cryptsetup luksClose raid
|
||||
mdadm --misc --stop /dev/md0
|
Loading…
Reference in a new issue