Howto RAID Automount?
I have a RAID-1 mirror setup with 2 external USB drives. The drives are only powered on just before a backup, and powered off when I'm done.
How do I configure linux to automatically assemble the RAID and mount the drives when they are powered up. The manual process I follow is: 1. Power on the drives. 2. Determine the device files with Code:
fdisk -l | grep raid Code:
mdadm --assemble /dev/md0 /dev/sdc1 /dev/sdd1 Code:
mount /dev/md0 /mnt/md0 I could easily write a script to do this for me. However, the script would only work after both drives have powered on an initialized. Usually, it takes 20 seconds after powering them on, before I can see the drives with 'fdisk -l'. Any ideas? |
Instead of using fdisk to determine your RAID partitions, and then running a full mdadm command with these partitions, why not let mdadm do the scanning and assembling?
Code:
mdadm -Es > /etc/mdadm.conf Code:
mdadm --examine --scan > /etc/mdadm.conf Eric |
All times are GMT -5. The time now is 03:21 AM. |