[plug] Help! Can't stop mdadm from picking up hda1 on reboot

Ari Finander outrider at operamail.com
Sun Jan 22 14:54:43 WST 2006


> ----- Original Message -----
> From: "Tomasz Grzegurzko" <tomasz_g at arach.net.au>
> To: plug at plug.org.au
> Subject: Re: [plug] Help! Can't stop mdadm from picking up hda1 on reboot
> Date: Sun, 22 Jan 2006 07:34:43 +0800
> 
> 
> Ari Finander wrote:
> > Hi all,
> >
> > I had a 200GB RAID1 array set up with mdadm on a Fedora Core 3 
> > box, but it ran out of free space. So, I am trying to separate 
> > the drives, hda1 and hdc1, in order to double my storage space (I 
> > already have a backup strategy in place to backup 400GB of data, 
> > when I get to that point). I stopped /dev/md0 and changed 
> > /etc/fstab to reflect the separate drives (mounted as /pub1 and 
> > /pub2 now). However, when I reboot I get the error that /dev/hda1 
> > is already mounted or /pub1 is busy (the first errors I got were  
> > filesystem errors on /dev/hda1 which I fixed with fsck.ext3). 
> > /dev/hdc1 automounts to /pub2 just fine! Each time I reboot I 
> > have to do:
> > mdadm -S /dev/md0
> > mdadm -r /dev/hda1
> > mount /dev/hda1
> > in order to get /dev/hda1 to mount to /pub1
> >
> > It may or may not be relevant, but after separating the drives 
> > and formatting (mkfs.ext3 -j -m 0 /dev/hdc1) I ended up with 
> > errors moving a directory to /pub2 (/dev/hdc1) where it reported 
> > that /dev/hda1 was read only and it couldn't remove the files, 
> > although it DID copy them all. This happened for the last 20GB 
> > out of 100GB transfered to /pub2 (/dev/hdc1). It was after this 
> > that I ran the hard drive manufacturers' diagnostics software on 
> > all drives (including that which holds the root filesystem) and 
> > when I rebooted it gave me the file system errors on /dev/hda1.
> >
> > What am I doing wrong? Please help!?
> >
> > Ari
> >
> 
> I think its mdadm using the raid magic something or others to 
> automatically remount these on boot. What does dmesg say when your 
> system is coming up? A reformat (repartition also!!!) should fix 
> that.
> Changing the partitions to Linux instead of Linux raid autodetect 
> or whatever would do the trick there.
> 
> 
> Regards,
> Tomasz

Thanks Tomasz,

As I mentioned in my followup, mdadm --zero-superblock /dev/hda1 did the trick: it was picking up on the RAID superblock and mdadm was grabbing the drive. However, your post got me curious, and I checked both hda1 and hdc1 with fdisk and found that they both did not have readable partition tables (even though the system was using them just fine at this point). I used fdisk to create partition tables on these drives for type 83, linux. After a reboot they're still working okay now.

cheers,

Ari



-- 
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 8 at http://www.opera.com

Powered by Outblaze



More information about the plug mailing list