* trouble replacing second disk from pair
@ 2021-12-08 12:40 Rory Campbell-Lange
2021-12-08 13:09 ` Roman Mamedov
0 siblings, 1 reply; 5+ messages in thread
From: Rory Campbell-Lange @ 2021-12-08 12:40 UTC (permalink / raw)
To: linux-btrfs
We're trying to upgrade the disks in a btrfs pair, and I have successfully replaced one of them using btrfs replace. I presently have
Label: 'btrfs-bkp' uuid: da90602a-b98e-4f0b-959a-ce431ac0cdfa
Total devices 2 FS bytes used 700.29GiB
devid 2 size 2.73TiB used 1.73TiB path /dev/mapper/cdisk4
devid 3 size 2.73TiB used 1.75TiB path /dev/mapper/cdisk2
I'd like to get rid of cdisk2 and replace it with a new disk.
However I'm unable to mount cdisk4 (the new disk) in degraded mode to allow me to similarly replace cdisk2 as I previously did for cdisk3. Is this because some of the data in only on cdisk2? If so I'd be grateful to
know how to ensure the two disks have the same data and to allow cdisk2 to be replaced.
Regards
Rory
# btrfs filesystem usage /bkp
Overall:
Device size: 5.46TiB
Device allocated: 3.49TiB
Device unallocated: 1.97TiB
Device missing: 0.00B
Used: 1.37TiB
Free (estimated): 2.04TiB (min: 2.04TiB)
Data ratio: 2.00
Metadata ratio: 1.91
Global reserve: 512.00MiB (used: 0.00B)
Data,single: Size:1.00GiB, Used:1.00MiB
/dev/mapper/cdisk2 1.00GiB
Data,RAID1: Size:1.73TiB, Used:691.24GiB
/dev/mapper/cdisk2 1.73TiB
/dev/mapper/cdisk4 1.73TiB
Data,DUP: Size:8.00GiB, Used:7.30GiB
/dev/mapper/cdisk2 16.00GiB
Metadata,single: Size:1.00GiB, Used:0.00B
/dev/mapper/cdisk2 1.00GiB
Metadata,RAID1: Size:9.00GiB, Used:1.75GiB
/dev/mapper/cdisk2 9.00GiB
/dev/mapper/cdisk4 9.00GiB
Metadata,DUP: Size:1.00GiB, Used:10.03MiB
/dev/mapper/cdisk2 2.00GiB
System,single: Size:32.00MiB, Used:224.00KiB
/dev/mapper/cdisk2 32.00MiB
System,RAID1: Size:32.00MiB, Used:192.00KiB
/dev/mapper/cdisk2 32.00MiB
/dev/mapper/cdisk4 32.00MiB
System,DUP: Size:32.00MiB, Used:0.00B
/dev/mapper/cdisk2 64.00MiB
Unallocated:
/dev/mapper/cdisk2 998.39GiB
/dev/mapper/cdisk4 1018.49GiB
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: trouble replacing second disk from pair
2021-12-08 12:40 trouble replacing second disk from pair Rory Campbell-Lange
@ 2021-12-08 13:09 ` Roman Mamedov
2021-12-08 17:21 ` Rory Campbell-Lange
0 siblings, 1 reply; 5+ messages in thread
From: Roman Mamedov @ 2021-12-08 13:09 UTC (permalink / raw)
To: Rory Campbell-Lange; +Cc: linux-btrfs
On Wed, 8 Dec 2021 12:40:14 +0000
Rory Campbell-Lange <rory@campbell-lange.net> wrote:
> We're trying to upgrade the disks in a btrfs pair, and I have successfully replaced one of them using btrfs replace. I presently have
>
> Label: 'btrfs-bkp' uuid: da90602a-b98e-4f0b-959a-ce431ac0cdfa
> Total devices 2 FS bytes used 700.29GiB
> devid 2 size 2.73TiB used 1.73TiB path /dev/mapper/cdisk4
> devid 3 size 2.73TiB used 1.75TiB path /dev/mapper/cdisk2
>
> I'd like to get rid of cdisk2 and replace it with a new disk.
>
> However I'm unable to mount cdisk4 (the new disk) in degraded mode to allow me to similarly replace cdisk2 as I previously did for cdisk3. Is this because some of the data in only on cdisk2? If so I'd be grateful to
> know how to ensure the two disks have the same data and to allow cdisk2 to be replaced.
Looks like you need to ensure everything is RAID1 first:
btrfs balance start -dconvert=raid1,soft /bkp
btrfs balance start -mconvert=raid1,soft /bkp
btrfs balance start -sconvert=raid1,soft /bkp
It might warn you about operating on system chunks, but I believe this still
needs to be done.
If still unable to mount after that, then post what mount command do you use
and which messages you get in dmesg.
--
With respect,
Roman
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: trouble replacing second disk from pair
2021-12-08 13:09 ` Roman Mamedov
@ 2021-12-08 17:21 ` Rory Campbell-Lange
2021-12-08 18:01 ` Zygo Blaxell
0 siblings, 1 reply; 5+ messages in thread
From: Rory Campbell-Lange @ 2021-12-08 17:21 UTC (permalink / raw)
To: Roman Mamedov; +Cc: linux-btrfs
On 08/12/21, Roman Mamedov (rm@romanrm.net) wrote:
> On Wed, 8 Dec 2021 12:40:14 +0000
> Rory Campbell-Lange <rory@campbell-lange.net> wrote:
>
> > We're trying to upgrade the disks in a btrfs pair, and I have successfully replaced one of them using btrfs replace. I presently have
> >
> > Label: 'btrfs-bkp' uuid: da90602a-b98e-4f0b-959a-ce431ac0cdfa
> > Total devices 2 FS bytes used 700.29GiB
> > devid 2 size 2.73TiB used 1.73TiB path /dev/mapper/cdisk4
> > devid 3 size 2.73TiB used 1.75TiB path /dev/mapper/cdisk2
> >
> > I'd like to get rid of cdisk2 and replace it with a new disk.
> >
> > However I'm unable to mount cdisk4 (the new disk) in degraded mode to allow me to similarly replace cdisk2 as I previously did for cdisk3. Is this because some of the data in only on cdisk2? If so I'd be grateful to
> > know how to ensure the two disks have the same data and to allow cdisk2 to be replaced.
>
> Looks like you need to ensure everything is RAID1 first:
>
> btrfs balance start -dconvert=raid1,soft /bkp
> btrfs balance start -mconvert=raid1,soft /bkp
> btrfs balance start -sconvert=raid1,soft /bkp
>
> It might warn you about operating on system chunks, but I believe this still
> needs to be done.
I wasn't able to run system chunks (-s) on btrfs 4.20.1-2 (debian) without
forcing it:
ERROR: Refusing to explicitly operate on system chunks.
Pass --force if you really want to do that.
Happily everything worked fine after running the data and metadata balances.
Thanks very much indeed for the advice.
Rory
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: trouble replacing second disk from pair
2021-12-08 17:21 ` Rory Campbell-Lange
@ 2021-12-08 18:01 ` Zygo Blaxell
2021-12-08 18:15 ` Roman Mamedov
0 siblings, 1 reply; 5+ messages in thread
From: Zygo Blaxell @ 2021-12-08 18:01 UTC (permalink / raw)
To: Rory Campbell-Lange; +Cc: Roman Mamedov, linux-btrfs
On Wed, Dec 08, 2021 at 05:21:51PM +0000, Rory Campbell-Lange wrote:
> On 08/12/21, Roman Mamedov (rm@romanrm.net) wrote:
> > On Wed, 8 Dec 2021 12:40:14 +0000
> > Rory Campbell-Lange <rory@campbell-lange.net> wrote:
> >
> > > We're trying to upgrade the disks in a btrfs pair, and I have successfully replaced one of them using btrfs replace. I presently have
> > >
> > > Label: 'btrfs-bkp' uuid: da90602a-b98e-4f0b-959a-ce431ac0cdfa
> > > Total devices 2 FS bytes used 700.29GiB
> > > devid 2 size 2.73TiB used 1.73TiB path /dev/mapper/cdisk4
> > > devid 3 size 2.73TiB used 1.75TiB path /dev/mapper/cdisk2
> > >
> > > I'd like to get rid of cdisk2 and replace it with a new disk.
> > >
> > > However I'm unable to mount cdisk4 (the new disk) in degraded mode to allow me to similarly replace cdisk2 as I previously did for cdisk3. Is this because some of the data in only on cdisk2? If so I'd be grateful to
> > > know how to ensure the two disks have the same data and to allow cdisk2 to be replaced.
> >
> > Looks like you need to ensure everything is RAID1 first:
You definitely need these two:
> > btrfs balance start -dconvert=raid1,soft /bkp
> > btrfs balance start -mconvert=raid1,soft /bkp
but not this one:
> > btrfs balance start -sconvert=raid1,soft /bkp
> >
> > It might warn you about operating on system chunks, but I believe this still
> > needs to be done.
>
> I wasn't able to run system chunks (-s) on btrfs 4.20.1-2 (debian) without
> forcing it:
>
> ERROR: Refusing to explicitly operate on system chunks.
> Pass --force if you really want to do that.
-m implies -s. In normal use, there is never a reason to have different
profiles for metadata and system, so balance refuses to do it.
-s is useful to set up some scenarios for developer testing (though even
that could be achieved with -mconvert=...,vrange=... without needing a
special option).
The manual could be clearer on this.
> Happily everything worked fine after running the data and metadata balances.
>
> Thanks very much indeed for the advice.
>
> Rory
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: trouble replacing second disk from pair
2021-12-08 18:01 ` Zygo Blaxell
@ 2021-12-08 18:15 ` Roman Mamedov
0 siblings, 0 replies; 5+ messages in thread
From: Roman Mamedov @ 2021-12-08 18:15 UTC (permalink / raw)
To: Zygo Blaxell; +Cc: Rory Campbell-Lange, linux-btrfs
On Wed, 8 Dec 2021 13:01:40 -0500
Zygo Blaxell <ce3g8jdj@umail.furryterror.org> wrote:
> -m implies -s. In normal use, there is never a reason to have different
> profiles for metadata and system
Then there appears to be no reason to have "system" user-visible as a separate
chunk type.
--
With respect,
Roman
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-12-08 18:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-08 12:40 trouble replacing second disk from pair Rory Campbell-Lange
2021-12-08 13:09 ` Roman Mamedov
2021-12-08 17:21 ` Rory Campbell-Lange
2021-12-08 18:01 ` Zygo Blaxell
2021-12-08 18:15 ` Roman Mamedov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox