Questions tagged [mdadm]

The Linux software RAID management tool

mdadm is the Linux software RAID management tool.

5 questions
2
votes
1 answer

systemd: unlock LUKS encrypted mdadm raid on boot

I set up a RAID using this guide: https://wiki.debian.org/SoftwareRAID on a minimal Stretch install. After that, I cryptsetup luksFormat'ed /dev/md0 (without using LVM). The problem is that the encrypted partition isn't unlocked automatically. My…
trilean
  • 515
  • 5
  • 11
2
votes
3 answers

no mdadm -D output in crontab

I have the following script: #!/bin/bash # wait, just in case hdd md0 in not mountet yet sleep 30 # write Raid state in log-file mdadm -D /dev/md0 > /home/main_usr/myScripts/raidHealth.log #just check if it writes to the file echo "just a Test"…
Mac Jo
  • 41
  • 6
1
vote
1 answer

Kill watch from bash

I need to be able to call this: watch -n1 cat /proc/mdstat from bash. For raid creating watching (after mdadm --create etc.), and then kill it then building process will end. #!/bin/bash #PID=$! while progress=$(cat /proc/mdstat |grep -oE…
gek
  • 524
  • 6
  • 18
1
vote
1 answer

Auto yes to raid5 array script

I am working on a script to install a array raid5. I am having trouble with inserting auto=yes when the script ask: if I want to continue creating array. I tried --auto=yes (http://www.linuxmanpages.com/man8/mdadm.8.php) but very unsure where to…
user3185936
  • 1,567
  • 6
  • 23
  • 44
0
votes
0 answers

Python's shell=True subprocess.Popen keyword argument breaking mdadm command

I'm trying to control mdadm from a Python script, and have a call similar to this: subprocess.Popen('mdadm --create /dev/md1 --raid-devices=4 /dev/md-0 /dev/md-1 /dev/md-2 /dev/md-3'.split()) mdadm then complains with mdadm: You have listed more…
user1769868
  • 133
  • 7