allywilson
Technical User
Hi all,
A little background is needed here I think...
I have my OS installed on /dev/sda.
I had a single drive for storage at /dev/sdb
I've bought another identical drive for storage and want to RAID1 them. It's located at /dev/sdc.
I used fdisk to create /dev/sdc1 with type fd (Linux RAID Autodetect).
I then ran
I then formatted /dev/md_d0 to be ext4 and mounted it at /media/raid.
So, I now copied the contents of /dev/sdb1 to /dev/md_d0.
I unmounted /dev/sdb1.
I then ran:
I then monitored /proc/mdstat until I seen it had successfully rebuilt the array.
I modified fstab to have the following:
and I could successfully mount /media/raid.
If I reboot, it doesn't automount. Worse than that, if I manually mount it I get a bad superblock error
I have to run the following:
Which allows me to mount /dev/raid but mdstat only shows /dev/sdc1 as being active.
I then have to run:
and it will start rebuilding the array again.
How can I stop it from always needing to rebuild the array? As well as be active and automount?
Any help appreciated
A little background is needed here I think...
I have my OS installed on /dev/sda.
I had a single drive for storage at /dev/sdb
I've bought another identical drive for storage and want to RAID1 them. It's located at /dev/sdc.
I used fdisk to create /dev/sdc1 with type fd (Linux RAID Autodetect).
I then ran
Code:
sudo mdadm --create --verbose /dev/md_d0 --level=1 --raid-devices=1 /dev/sdc1
I then formatted /dev/md_d0 to be ext4 and mounted it at /media/raid.
So, I now copied the contents of /dev/sdb1 to /dev/md_d0.
I unmounted /dev/sdb1.
I then ran:
Code:
mdadm --add /dev/md_d0 /dev/sdb1
mdadm --grow /dev/md_d0 --raid-devices=2
I then monitored /proc/mdstat until I seen it had successfully rebuilt the array.
I modified fstab to have the following:
Code:
/dev/md_d0 /media/raid ext4 relatime,errors=remount-ro 0 1
and I could successfully mount /media/raid.
If I reboot, it doesn't automount. Worse than that, if I manually mount it I get a bad superblock error
Code:
mount: wrong fs type, bad option, bad superblock on /dev/md_d0,
missing codepage or helper program, or other error
(could this be the IDE device where you in fact use
ide-scsi so that sr0 or sda or so is needed?)
I have to run the following:
Code:
sudo mdadm --run /dev/md_d0
I then have to run:
Code:
sudo mdadm --add /dev/md_d0 /dev/sdb1
How can I stop it from always needing to rebuild the array? As well as be active and automount?
Any help appreciated