On Sat, Jan 24, 2015 at 03:32:44PM +0100, Daniel Pocock wrote:
> 
> 
> 
> I've got a RAID1 on two 1TB partitions, /dev/sda3 and /dev/sdb3
> 
> I'm adding two new disks, they will have bigger partitions /dev/sdc3 and
> /dev/sdd3
> 
> I'd like the BtrFs to migrate from the old partitions to the new ones as
> safely and quickly as possible and if it is reasonable to do so, keeping
> it online throughout the migration.
> 
> Should I do the following:
> 
> btrfs device add /dev/sdc3 /dev/sdd3 /mnt/btrfs0
> btrfs device delete /dev/sda3 /dev/sdb3 /mnt/btrfs0
> 
> or should I do it this way:
> 
> btrfs device add /dev/sdc3 /mnt/btrfs0
> btrfs device delete /dev/sda3 /mnt/btrfs0
> btrfs device add /dev/sdd3 /mnt/btrfs0
> btrfs device delete /dev/sdb3 /mnt/btrfs0
> 
> or is there some other way to go about it?

btrfs replace start /dev/sda3 /dev/sdc3 /mountpoint
btrfs fi resize 3:max /mountpoint
btrfs replace start /dev/sdb3 /dev/sdd3 /mountpoint
btrfs fi resize 4:max /mountpoint

   The 3 and 4 in the resize commands should be the devid of the
newly-added device.

   Hugo.

-- 
Hugo Mills             | I'll take your bet, but make it ten thousand francs.
hugo@... carfax.org.uk | I'm only a _poor_ corrupt official.
http://carfax.org.uk/  |
PGP: 65E74AC0          |                              Capt. Renaud, Casablanca

Attachment: signature.asc
Description: Digital signature

Reply via email to