Re: How to replace a missing device with a smaller one

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

 




On 2019/11/18 上午10:09, Nathan Dehnel wrote:
> I have a 10-disk raid10 with a missing device I'm trying to replace. I
> get this error when doing it though:
> 
> btrfs replace start 1 /dev/bcache0 /mnt
> ERROR: target device smaller than source device (required 1000203091968 bytes)
> 
> I see that people recommend resizing a disk before replacing it, which
> isn't an option for me because it's gone.

Oh, that's indeed a problem.

We should allow to change missing device's size.

> I'm replacing the drive by
> copying from its mirror, so can I resize the mirror and then replace?
> How do I do that? Do I need to run "btrfs fi res" on each of the
> remaining drives in the array?
> 
As a workaround, you could remove that missing device (which would
relocate all chunks using it, so it can be slow).

Then add the new device to the fs.

With that done, it's recommended to do a convert to take full use the
two added devices.

Thanks,
Qu

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux