[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Replacing failed drive in software RAID



On Thu, Nov 07, 2013 at 02:12:02AM -0700, Bob Proulx wrote:
> > > I'm offered to reassemble RAID. Is it safe to use auto reconfigure
> > > option or should I assemble all three manually?
> 
> As long as all of the disks are to be assembled then automatic mode
> should be okay.  Don't use automatic mode if you have disks attached
> that you do not want to be assembled.  The automated mode will scan to
> see what is there and assemble anything that it can assemble.  But if
> the only disks attached are the ones you want to assemble then I think
> the automated mode is okay.

Three disks are from original RAID and fourth disk is new one that should
replace failed sda. So I guess all disks are the ones I want to assemble.

> If the rescue tries to assemble two arrays that both have the same
> minor number then it will assign a new minor number to one of the
> arrays.  This really isn't bad but causes the renumbered ones to be in
> the wrong place.  This can be corrected using the --update=super-minor
> option.  This shouldn't be needed but I will mention it just in case.

I'll keep that in mind.

> > > Should I recreate md1 and md2 with three drives? Would that work?
> 
> You have lost me on the context of this question.

This was in case I should reassemble RAID device with root partition manually. In that
case I would have to recreate other two RAID devices as well. You already
answered that they will be reassembled in degraded mode, so that answers my
question. Three devices would be enough. 

> > > After this is done successfully, I assume I should go with:
> > > # vgscan
> > > # vgchange -a y volume_group_name
> 
> That should not be needed.  LVM happens at the next layer up.  LVM
> shouldn't ever notice that the physical volume has gone away.  There
> shouldn't be any need to make any LVM changes at all.
> 
> Unless you are doing something that you haven't explained.  :-/

No, just wanted to know if any additional step is needed. 

> In rescue mode simply assemble the raid.  Then it will ask you to
> select a root file system.  If you are using lvm and have named them
> appropriately then this should be easy.  I always name my root "root"
> so that I can find it easily.
> 
> > > and mount manually all partitions (there is root and swap, so I
> > > guess I only need to mount root). Am I right?
> 
> The installer will ask you for your root partition.  Then it will
> offer you a shell in the target environment.  After getting a shell in
> the root partition you will need to mount the other partitions.
> 
>   # mount -a
> 
> > > Then, after creating partition table and adding new drive into
> > > RAID, would simple:
> > > # grub-install /dev/sda
> > > do the job?
> 
> Yes.
> 
> > > Anything else to think about?
> > 
> > Can anyone just confirm that it is safe to use auto reassemble RAID feature
> > from Debian installer?
> 
> It has always worked for me.  As long as all of the attached disks are
> to be assembled.  Don't do the automated if you have extra disks that
> should not be assembled.
> 
> Bob

Thanks for all your help, Bob. I don't usually need this step by step approach
but in this case I needed to be sure I won't loose my data. Your patience and
answers are much appreciated.

Regards,
Veljko


Reply to: