Re: btrfs device delete /dev/sdc1 /mnt/raid1 user experience

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

 



On Mon, Jun 6, 2016 at 7:19 PM, Kai Hendry <hendry@xxxxxx> wrote:
> On Mon, 6 Jun 2016, at 10:16 PM, Austin S. Hemmelgarn wrote:
>> Based on the fact that you appear to want to carry a disk to copy data
>> more quickly than over then internet, then what you've already done plus
>> this is the correct way to do it.
>
> The trouble is the way I ended up doing it:
> 1) Replacing it with a bigger disk
> 2) Deleting the disk
> 3) btrfs send /mnt/raid1/snapshot | btrfs receive /mnt/onetb/
>
> This took almost **an entire day** over USB3 spinning disks  !
>
> My expectation was that I could quickly remove a mirrored disk, replace
> that disk and hand carry the disk I removed. btrfs shouldn't remove data
> from the disk I removed.

Had this been a two drive raid1, all you need to do is take one drive
with you. No commands necessary. Each drive can be separately mounted
with -o degraded, and you can re-establish two copy replication with
'btrfs dev add' with a new drive and 'btrfs dev del missing' to get
rid of the phantom missing drive. You'd do that locally and then also
at your destination.

A gotcha with this technique though is often single chunks get created
during the -o degraded read-write mount. After 'dev del missing'
completes the replication process, you need to check 'fi df' or 'fi
us' for single chunks. If they exist, get rid of them with a filtered
balance. '-dconvert=raid1,soft -mconvert=raid1,soft' should work I
think. If there are single chunks created and not converted, later if
you need to do a degraded mount it will fail. Usually it can be made
to work with -o ro,degraded in such a case, but it means no more
read-write for the file system, you'd have to recreate it (at this
point until it's fixed).


-- 
Chris Murphy
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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