Re: RAID-1 not accessible after disk replacement

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

 



Going bigger works once you resize the fs (that requires a separate
command specific to your fs).

Going smaller typically requires the FS to be umounted, maybe fscked,
and resized smaller (assuming the FS even supports that, xfs does not)
before the array is made smaller.  Resizing the array or LV smaller
before and/or without the fs being resized only ends when the resize
smaller is undone (like you did).  When going smaller I also tend to
make the fs a decent amount smaller than I need to, then make the
array smaller and then resize the fs up using no options (so it uses
the current larger device  size).



On Fri, May 24, 2024 at 10:56 AM Richard <richard@xxxxxxxxxx> wrote:
>
> Op vrijdag 24 mei 2024 17:23:49 CEST schreef Richard:
> > Philip, Kuai,
> >
> > Op donderdag 23 mei 2024 18:23:31 CEST schreef Phillip Susi:
> > > Richard <richard@xxxxxxxxxx> writes:
> > > > I grew (--grow) the RAID to an smaller size as it was complaining about
> > > > the
> > > > size (no logging of that).
> > > > After the this action the RAID was functioning and fully accessible.
> > >
> > > I think you mean you used -z to reduce the size of the array.  It
> > > appears that you are trying to replace the failed drive with one that is
> > > half the size, then shrunk the array, which truncated your filesystem,
> > > which is why you can no longer access it.  You can't shrink the disk out
> > > from under the filesystem.
> > >
> > > Grow the array back to the full size of the larger disk and most likely
> > > you should be able to mount the filesystem again.  You will need to get
> > > a replacement disk that is the same size as the original that failed if
> > > you want to replace it, or if you can shrink the filesystem to fit on
> > > the new disk, you have to do that FIRST, then shrink the raid array.
> >
> > I followed your advice, and made the array size the same as it used to be.
> > I'm now able to see the data on the partition (RAID) again.
> > Very nice.
> >
> > Thanks a lot for your support.
>
> I'm getting a bigger drive.  That means that I'm going to get the following
> setup:
>
> /dev/sda6 403GB  (the one that is now the active partition)
>
> I'll make /dev/sdb6 the same size, also 403 GB.
>
> The array size is now set at 236 GB (with sda6 having a size of 403GB).
>
> Once both 403GB partitions are part of the array, would it then be possible to
> grow the array from 236GB to 400GB?  Or will that result in problems as well?
>
> --
> Richard
>
>
>
>





[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux