Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

I have a Fujitsu RX220 running with SATA disks and Software Raid 1. The second drive in the machine has failed (sdb). I have replaced it however the machine will not boot up correctly and allow me to rebuild the raid .

 

I get the following errors on the initramfs shell screen:

 

Gave up waiting for root device

ALERT! Device /dev/md1 was not found! Dropping to shell!

 

I have tried running the mdadm command to assemble the array from the shell:

 

mdadm --assemble /dev/md1 /dev/sda1 /dev/sdb1

 

Gives the error:

 

mdadm: cannot open device /dev/sda1: Device or resource busy
mdadm: /dev/sda1 has no superblock - assembly aborted 

 

However

mdadm --misc --scan /dev/sda

works as expected.

Posted

I have fixed this problem now.

 

I booted the machine using an Ubuntu Server install CD with the 'rescue a broke system option'. This automatically detected and mounted the raid arrays as best it could (running off /dev/sda only).

 

I then used the 'run root shell in /dev/md1' option to get me into the installed system.

 

I then ran

aptitude update && dpkg --configure -a

to fix the initramfs issue.

 

I then did

 

sfdisk -d /dev/sda | sfdisk /dev/sdb
mdadm --manage /dev/md0 --fail /dev/sdb1
mdadm --manage /dev/md0 --remove /dev/sdb1
mdadm --manage /dev/md0 --add /dev/sdb1
mdadm --manage /dev/md1 --fail /dev/sdb3
mdadm --manage /dev/md1 --remove /dev/sdb3
mdadm --manage /dev/md1 --add /dev/sdb3

 

which fixes the raid1 arrays.

 

root@goliath:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md1 : active raid1 sda3[0] sdb3[1]
     485452096 blocks [2/2] [uU]

md0 : active raid1 sda1[0] sdb1[1]
     979840 blocks [2/2] [uU]

unused devices: 

 

alll better.

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...