* [BUG] unable to mount zoned volume after force shutdown
@ 2024-06-09 2:23 HAN Yuwei
2024-06-09 10:33 ` Qu Wenruo
2024-06-10 8:53 ` Johannes Thumshirn
0 siblings, 2 replies; 8+ messages in thread
From: HAN Yuwei @ 2024-06-09 2:23 UTC (permalink / raw)
To: linux-btrfs@vger.kernel.org
[-- Attachment #1.1: Type: text/plain, Size: 3849 bytes --]
I can't mount volume on multiple zoned device which data profile is
single & metadata profile is raid1.
It experienced multiple forced shutdown due to kernel 6.10 can't
properly shutdown on loongarch.
# dmesg
[ 1963.698793] BTRFS info (device sdb): first mount of filesystem
b5b2d7d9-9f27-4907-a558-77e8e86df933
[ 1963.707801] BTRFS info (device sdb): using crc32c (crc32c-generic)
checksum algorithm
[ 1963.715597] BTRFS info (device sdb): using free-space-tree
[ 1965.492066] BTRFS info (device sdb): host-managed zoned block device
/dev/sdb, 52156 zones of 268435456 bytes
[ 1966.953590] BTRFS info (device sdb): host-managed zoned block device
/dev/sdc, 52156 zones of 268435456 bytes
[ 1967.346758] BTRFS info (device sdb): zoned mode enabled with zone
size 268435456
[ 2026.287356] BTRFS error (device sdb): zoned: write pointer offset
mismatch of zones in raid1 profile
[ 2026.296445] BTRFS error (device sdb): zoned: failed to load zone info
of bg 5399847632896
[ 2026.304576] BTRFS error (device sdb): failed to read block groups: -5
[ 2026.352547] BTRFS error (device sdb): open_ctree failed
# btrfs inspect-internal dump-super /dev/sdb
superblock: bytenr=65536, device=/dev/sdb
---------------------------------------------------------
csum_type 0 (crc32c)
csum_size 4
csum 0xb27d8032 [match]
bytenr 65536
flags 0x1
( WRITTEN )
magic _BHRfS_M [match]
fsid b5b2d7d9-9f27-4907-a558-77e8e86df933
metadata_uuid 00000000-0000-0000-0000-000000000000
label HYWDATA_ZONED_TEST
generation 80372
root 5400013160448
sys_array_size 258
chunk_root_generation 80368
root_level 0
chunk_root 4852941602816
chunk_root_level 1
log_root 0
log_root_transid (deprecated) 0
log_root_level 0
total_bytes 28001039286272
bytes_used 3306937974784
sectorsize 16384
nodesize 16384
leafsize (deprecated) 16384
stripesize 16384
root_dir 6
num_devices 2
compat_flags 0x0
compat_ro_flags 0x3
( FREE_SPACE_TREE |
FREE_SPACE_TREE_VALID )
incompat_flags 0x1341
( MIXED_BACKREF |
EXTENDED_IREF |
SKINNY_METADATA |
NO_HOLES |
ZONED )
cache_generation 0
uuid_tree_generation 80372
dev_item.uuid 754f2932-38e5-46b4-93d2-dd699076879e
dev_item.fsid b5b2d7d9-9f27-4907-a558-77e8e86df933 [match]
dev_item.type 0
dev_item.total_bytes 14000519643136
dev_item.bytes_used 1823750488064
dev_item.io_align 16384
dev_item.io_width 16384
dev_item.sector_size 16384
dev_item.devid 1
dev_item.dev_group 0
dev_item.seek_speed 0
dev_item.bandwidth 0
dev_item.generation 0
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BUG] unable to mount zoned volume after force shutdown
2024-06-09 2:23 [BUG] unable to mount zoned volume after force shutdown HAN Yuwei
@ 2024-06-09 10:33 ` Qu Wenruo
2024-06-10 8:47 ` Johannes Thumshirn
2024-06-10 8:53 ` Johannes Thumshirn
1 sibling, 1 reply; 8+ messages in thread
From: Qu Wenruo @ 2024-06-09 10:33 UTC (permalink / raw)
To: HAN Yuwei, linux-btrfs@vger.kernel.org, Johannes Thumshirn,
Naohiro Aota
在 2024/6/9 11:53, HAN Yuwei 写道:
> I can't mount volume on multiple zoned device which data profile is
> single & metadata profile is raid1.
> It experienced multiple forced shutdown due to kernel 6.10 can't
> properly shutdown on loongarch.
>
> # dmesg
>
> [ 1963.698793] BTRFS info (device sdb): first mount of filesystem
> b5b2d7d9-9f27-4907-a558-77e8e86df933
> [ 1963.707801] BTRFS info (device sdb): using crc32c (crc32c-generic)
> checksum algorithm
> [ 1963.715597] BTRFS info (device sdb): using free-space-tree
> [ 1965.492066] BTRFS info (device sdb): host-managed zoned block device
> /dev/sdb, 52156 zones of 268435456 bytes
> [ 1966.953590] BTRFS info (device sdb): host-managed zoned block device
> /dev/sdc, 52156 zones of 268435456 bytes
> [ 1967.346758] BTRFS info (device sdb): zoned mode enabled with zone
> size 268435456
> [ 2026.287356] BTRFS error (device sdb): zoned: write pointer offset
> mismatch of zones in raid1 profile
> [ 2026.296445] BTRFS error (device sdb): zoned: failed to load zone info
> of bg 5399847632896
My guess is, due to the forced shutdown, btrfs' writer pointer is later
than the zone write pointer.
IMHO, we should not error out but mark this zone as read-only and let
balance to kick in.
@Johannes and @naohiro, mind to enhance the error handling there?
Thanks,
Qu
> [ 2026.304576] BTRFS error (device sdb): failed to read block groups: -5
> [ 2026.352547] BTRFS error (device sdb): open_ctree failed
>
> # btrfs inspect-internal dump-super /dev/sdb
> superblock: bytenr=65536, device=/dev/sdb
> ---------------------------------------------------------
> csum_type 0 (crc32c)
> csum_size 4
> csum 0xb27d8032 [match]
> bytenr 65536
> flags 0x1
> ( WRITTEN )
> magic _BHRfS_M [match]
> fsid b5b2d7d9-9f27-4907-a558-77e8e86df933
> metadata_uuid 00000000-0000-0000-0000-000000000000
> label HYWDATA_ZONED_TEST
> generation 80372
> root 5400013160448
> sys_array_size 258
> chunk_root_generation 80368
> root_level 0
> chunk_root 4852941602816
> chunk_root_level 1
> log_root 0
> log_root_transid (deprecated) 0
> log_root_level 0
> total_bytes 28001039286272
> bytes_used 3306937974784
> sectorsize 16384
> nodesize 16384
> leafsize (deprecated) 16384
> stripesize 16384
> root_dir 6
> num_devices 2
> compat_flags 0x0
> compat_ro_flags 0x3
> ( FREE_SPACE_TREE |
> FREE_SPACE_TREE_VALID )
> incompat_flags 0x1341
> ( MIXED_BACKREF |
> EXTENDED_IREF |
> SKINNY_METADATA |
> NO_HOLES |
> ZONED )
> cache_generation 0
> uuid_tree_generation 80372
> dev_item.uuid 754f2932-38e5-46b4-93d2-dd699076879e
> dev_item.fsid b5b2d7d9-9f27-4907-a558-77e8e86df933 [match]
> dev_item.type 0
> dev_item.total_bytes 14000519643136
> dev_item.bytes_used 1823750488064
> dev_item.io_align 16384
> dev_item.io_width 16384
> dev_item.sector_size 16384
> dev_item.devid 1
> dev_item.dev_group 0
> dev_item.seek_speed 0
> dev_item.bandwidth 0
> dev_item.generation 0
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BUG] unable to mount zoned volume after force shutdown
2024-06-09 10:33 ` Qu Wenruo
@ 2024-06-10 8:47 ` Johannes Thumshirn
0 siblings, 0 replies; 8+ messages in thread
From: Johannes Thumshirn @ 2024-06-10 8:47 UTC (permalink / raw)
To: Qu Wenruo, HAN Yuwei, linux-btrfs@vger.kernel.org, Naohiro Aota
On 09.06.24 12:33, Qu Wenruo wrote:
>
>
> 在 2024/6/9 11:53, HAN Yuwei 写道:
>> I can't mount volume on multiple zoned device which data profile is
>> single & metadata profile is raid1.
>> It experienced multiple forced shutdown due to kernel 6.10 can't
>> properly shutdown on loongarch.
>>
>> # dmesg
>>
>> [ 1963.698793] BTRFS info (device sdb): first mount of filesystem
>> b5b2d7d9-9f27-4907-a558-77e8e86df933
>> [ 1963.707801] BTRFS info (device sdb): using crc32c (crc32c-generic)
>> checksum algorithm
>> [ 1963.715597] BTRFS info (device sdb): using free-space-tree
>> [ 1965.492066] BTRFS info (device sdb): host-managed zoned block device
>> /dev/sdb, 52156 zones of 268435456 bytes
>> [ 1966.953590] BTRFS info (device sdb): host-managed zoned block device
>> /dev/sdc, 52156 zones of 268435456 bytes
>> [ 1967.346758] BTRFS info (device sdb): zoned mode enabled with zone
>> size 268435456
>> [ 2026.287356] BTRFS error (device sdb): zoned: write pointer offset
>> mismatch of zones in raid1 profile
>> [ 2026.296445] BTRFS error (device sdb): zoned: failed to load zone info
>> of bg 5399847632896
>
> My guess is, due to the forced shutdown, btrfs' writer pointer is later
> than the zone write pointer.
>
> IMHO, we should not error out but mark this zone as read-only and let
> balance to kick in.
>
> @Johannes and @naohiro, mind to enhance the error handling there?
That's definitely a possibility we need to look into yes.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BUG] unable to mount zoned volume after force shutdown
2024-06-09 2:23 [BUG] unable to mount zoned volume after force shutdown HAN Yuwei
2024-06-09 10:33 ` Qu Wenruo
@ 2024-06-10 8:53 ` Johannes Thumshirn
2024-06-10 12:47 ` HAN Yuwei
1 sibling, 1 reply; 8+ messages in thread
From: Johannes Thumshirn @ 2024-06-10 8:53 UTC (permalink / raw)
To: HAN Yuwei, linux-btrfs@vger.kernel.org; +Cc: Naohiro Aota
On 09.06.24 04:24, HAN Yuwei wrote:
> I can't mount volume on multiple zoned device which data profile is
> single & metadata profile is raid1.
> It experienced multiple forced shutdown due to kernel 6.10 can't
> properly shutdown on loongarch.
>
> # dmesg
>
> [ 1963.698793] BTRFS info (device sdb): first mount of filesystem
> b5b2d7d9-9f27-4907-a558-77e8e86df933
> [ 1963.707801] BTRFS info (device sdb): using crc32c (crc32c-generic)
> checksum algorithm
> [ 1963.715597] BTRFS info (device sdb): using free-space-tree
> [ 1965.492066] BTRFS info (device sdb): host-managed zoned block device
> /dev/sdb, 52156 zones of 268435456 bytes
> [ 1966.953590] BTRFS info (device sdb): host-managed zoned block device
> /dev/sdc, 52156 zones of 268435456 bytes
> [ 1967.346758] BTRFS info (device sdb): zoned mode enabled with zone
> size 268435456
> [ 2026.287356] BTRFS error (device sdb): zoned: write pointer offset
> mismatch of zones in raid1 profile
> [ 2026.296445] BTRFS error (device sdb): zoned: failed to load zone info
> of bg 5399847632896
> [ 2026.304576] BTRFS error (device sdb): failed to read block groups: -5
> [ 2026.352547] BTRFS error (device sdb): open_ctree failed
>
Can you check the write pointers for the zones mapping to this block group?
that should be
blkzone report -c 1 -o 0x274A00000 /dev/sdb
and for the other device as well
Thanks,
Johannes
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BUG] unable to mount zoned volume after force shutdown
2024-06-10 8:53 ` Johannes Thumshirn
@ 2024-06-10 12:47 ` HAN Yuwei
2024-06-10 14:13 ` Naohiro Aota
0 siblings, 1 reply; 8+ messages in thread
From: HAN Yuwei @ 2024-06-10 12:47 UTC (permalink / raw)
To: Johannes Thumshirn, linux-btrfs@vger.kernel.org; +Cc: Naohiro Aota
[-- Attachment #1.1: Type: text/plain, Size: 3756 bytes --]
在 2024/6/10 16:53, Johannes Thumshirn 写道:
> On 09.06.24 04:24, HAN Yuwei wrote:
>> I can't mount volume on multiple zoned device which data profile is
>> single & metadata profile is raid1.
>> It experienced multiple forced shutdown due to kernel 6.10 can't
>> properly shutdown on loongarch.
>>
>> # dmesg
>>
>> [ 1963.698793] BTRFS info (device sdb): first mount of filesystem
>> b5b2d7d9-9f27-4907-a558-77e8e86df933
>> [ 1963.707801] BTRFS info (device sdb): using crc32c (crc32c-generic)
>> checksum algorithm
>> [ 1963.715597] BTRFS info (device sdb): using free-space-tree
>> [ 1965.492066] BTRFS info (device sdb): host-managed zoned block device
>> /dev/sdb, 52156 zones of 268435456 bytes
>> [ 1966.953590] BTRFS info (device sdb): host-managed zoned block device
>> /dev/sdc, 52156 zones of 268435456 bytes
>> [ 1967.346758] BTRFS info (device sdb): zoned mode enabled with zone
>> size 268435456
>> [ 2026.287356] BTRFS error (device sdb): zoned: write pointer offset
>> mismatch of zones in raid1 profile
>> [ 2026.296445] BTRFS error (device sdb): zoned: failed to load zone info
>> of bg 5399847632896
>> [ 2026.304576] BTRFS error (device sdb): failed to read block groups: -5
>> [ 2026.352547] BTRFS error (device sdb): open_ctree failed
>>
> Can you check the write pointers for the zones mapping to this block group?
>
> that should be
> blkzone report -c 1 -o 0x274A00000 /dev/sdb
# blkzone report -c 1 -o 0x274A00000 /dev/sdb
start: 0x274a00000, len 0x080000, cap 0x080000, wptr 0x000000 reset:0
non-seq:0, zcond: 1(em) [type: 2(SEQ_WRITE_REQUIRED)]
# blkzone report -c 1 -o 0x274A00000 /dev/sdc
start: 0x274a00000, len 0x080000, cap 0x080000, wptr 0x000000 reset:0
non-seq:0, zcond: 1(em) [type: 2(SEQ_WRITE_REQUIRED)]
FYI,
# btrfs inspect-internal dump-tree /dev/sdb|grep -A 10 -B 10 5399847632896
io_align 65536 io_width 65536 sector_size 16384
num_stripes 1 sub_stripes 1
stripe 0 devid 1 offset 1819187085312
dev_uuid 754f2932-38e5-46b4-93d2-dd699076879e
item 104 key (FIRST_CHUNK_TREE CHUNK_ITEM 5399579197440)
itemoff 7851 itemsize 80
length 268435456 owner 2 stripe_len 65536 type DATA|single
io_align 65536 io_width 65536 sector_size 16384
num_stripes 1 sub_stripes 1
stripe 0 devid 2 offset 1819455520768
dev_uuid ee669b85-f641-4d6a-9a66-da13907d55b2
item 105 key (FIRST_CHUNK_TREE CHUNK_ITEM 5399847632896)
itemoff 7739 itemsize 112
length 268435456 owner 2 stripe_len 65536 type
METADATA|RAID1
io_align 65536 io_width 65536 sector_size 16384
num_stripes 2 sub_stripes 1
stripe 0 devid 1 offset 1819455520768
dev_uuid 754f2932-38e5-46b4-93d2-dd699076879e
stripe 1 devid 2 offset 1819723956224
dev_uuid ee669b85-f641-4d6a-9a66-da13907d55b2
item 106 key (FIRST_CHUNK_TREE CHUNK_ITEM 5400116068352)
itemoff 7659 itemsize 80
length 268435456 owner 2 stripe_len 65536 type DATA|single
io_align 65536 io_width 65536 sector_size 16384
> and for the other device as well
>
> Thanks,
> Johannes
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BUG] unable to mount zoned volume after force shutdown
2024-06-10 12:47 ` HAN Yuwei
@ 2024-06-10 14:13 ` Naohiro Aota
2024-06-11 6:48 ` HAN Yuwei
0 siblings, 1 reply; 8+ messages in thread
From: Naohiro Aota @ 2024-06-10 14:13 UTC (permalink / raw)
To: HAN Yuwei; +Cc: Johannes Thumshirn, linux-btrfs@vger.kernel.org
On Mon, Jun 10, 2024 at 08:47:37PM GMT, HAN Yuwei wrote:
>
> 在 2024/6/10 16:53, Johannes Thumshirn 写道:
> > On 09.06.24 04:24, HAN Yuwei wrote:
> > > I can't mount volume on multiple zoned device which data profile is
> > > single & metadata profile is raid1.
> > > It experienced multiple forced shutdown due to kernel 6.10 can't
> > > properly shutdown on loongarch.
> > >
> > > # dmesg
> > >
> > > [ 1963.698793] BTRFS info (device sdb): first mount of filesystem
> > > b5b2d7d9-9f27-4907-a558-77e8e86df933
> > > [ 1963.707801] BTRFS info (device sdb): using crc32c (crc32c-generic)
> > > checksum algorithm
> > > [ 1963.715597] BTRFS info (device sdb): using free-space-tree
> > > [ 1965.492066] BTRFS info (device sdb): host-managed zoned block device
> > > /dev/sdb, 52156 zones of 268435456 bytes
> > > [ 1966.953590] BTRFS info (device sdb): host-managed zoned block device
> > > /dev/sdc, 52156 zones of 268435456 bytes
> > > [ 1967.346758] BTRFS info (device sdb): zoned mode enabled with zone
> > > size 268435456
> > > [ 2026.287356] BTRFS error (device sdb): zoned: write pointer offset
> > > mismatch of zones in raid1 profile
> > > [ 2026.296445] BTRFS error (device sdb): zoned: failed to load zone info
> > > of bg 5399847632896
> > > [ 2026.304576] BTRFS error (device sdb): failed to read block groups: -5
> > > [ 2026.352547] BTRFS error (device sdb): open_ctree failed
> > >
> > Can you check the write pointers for the zones mapping to this block group?
> >
> > that should be
> > blkzone report -c 1 -o 0x274A00000 /dev/sdb
> # blkzone report -c 1 -o 0x274A00000 /dev/sdb
> start: 0x274a00000, len 0x080000, cap 0x080000, wptr 0x000000 reset:0
> non-seq:0, zcond: 1(em) [type: 2(SEQ_WRITE_REQUIRED)]
> # blkzone report -c 1 -o 0x274A00000 /dev/sdc
> start: 0x274a00000, len 0x080000, cap 0x080000, wptr 0x000000 reset:0
> non-seq:0, zcond: 1(em) [type: 2(SEQ_WRITE_REQUIRED)]
blkzone takes a physical offset in sector unit (512 bytes). According to
the dump-tree output below, the BG 5399847632896 is at "1819455520768" on
/dev/sdb and "1819723956224". So, "blkzone report -o" should take
"0xd3d00000" and "0xd3d80000".
Thanks,
>
> FYI,
> # btrfs inspect-internal dump-tree /dev/sdb|grep -A 10 -B 10 5399847632896
> io_align 65536 io_width 65536 sector_size 16384
> num_stripes 1 sub_stripes 1
> stripe 0 devid 1 offset 1819187085312
> dev_uuid 754f2932-38e5-46b4-93d2-dd699076879e
> item 104 key (FIRST_CHUNK_TREE CHUNK_ITEM 5399579197440) itemoff
> 7851 itemsize 80
> length 268435456 owner 2 stripe_len 65536 type DATA|single
> io_align 65536 io_width 65536 sector_size 16384
> num_stripes 1 sub_stripes 1
> stripe 0 devid 2 offset 1819455520768
> dev_uuid ee669b85-f641-4d6a-9a66-da13907d55b2
> item 105 key (FIRST_CHUNK_TREE CHUNK_ITEM 5399847632896) itemoff
> 7739 itemsize 112
> length 268435456 owner 2 stripe_len 65536 type
> METADATA|RAID1
> io_align 65536 io_width 65536 sector_size 16384
> num_stripes 2 sub_stripes 1
> stripe 0 devid 1 offset 1819455520768
> dev_uuid 754f2932-38e5-46b4-93d2-dd699076879e
> stripe 1 devid 2 offset 1819723956224
> dev_uuid ee669b85-f641-4d6a-9a66-da13907d55b2
> item 106 key (FIRST_CHUNK_TREE CHUNK_ITEM 5400116068352) itemoff
> 7659 itemsize 80
> length 268435456 owner 2 stripe_len 65536 type DATA|single
> io_align 65536 io_width 65536 sector_size 16384
>
> > and for the other device as well
> >
> > Thanks,
> > Johannes
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BUG] unable to mount zoned volume after force shutdown
2024-06-10 14:13 ` Naohiro Aota
@ 2024-06-11 6:48 ` HAN Yuwei
2024-08-11 6:19 ` Yuwei Han
0 siblings, 1 reply; 8+ messages in thread
From: HAN Yuwei @ 2024-06-11 6:48 UTC (permalink / raw)
To: Naohiro Aota; +Cc: Johannes Thumshirn, linux-btrfs@vger.kernel.org
[-- Attachment #1.1: Type: text/plain, Size: 4806 bytes --]
在 2024/6/10 22:13, Naohiro Aota 写道:
> On Mon, Jun 10, 2024 at 08:47:37PM GMT, HAN Yuwei wrote:
>> 在 2024/6/10 16:53, Johannes Thumshirn 写道:
>>> On 09.06.24 04:24, HAN Yuwei wrote:
>>>> I can't mount volume on multiple zoned device which data profile is
>>>> single & metadata profile is raid1.
>>>> It experienced multiple forced shutdown due to kernel 6.10 can't
>>>> properly shutdown on loongarch.
>>>>
>>>> # dmesg
>>>>
>>>> [ 1963.698793] BTRFS info (device sdb): first mount of filesystem
>>>> b5b2d7d9-9f27-4907-a558-77e8e86df933
>>>> [ 1963.707801] BTRFS info (device sdb): using crc32c (crc32c-generic)
>>>> checksum algorithm
>>>> [ 1963.715597] BTRFS info (device sdb): using free-space-tree
>>>> [ 1965.492066] BTRFS info (device sdb): host-managed zoned block device
>>>> /dev/sdb, 52156 zones of 268435456 bytes
>>>> [ 1966.953590] BTRFS info (device sdb): host-managed zoned block device
>>>> /dev/sdc, 52156 zones of 268435456 bytes
>>>> [ 1967.346758] BTRFS info (device sdb): zoned mode enabled with zone
>>>> size 268435456
>>>> [ 2026.287356] BTRFS error (device sdb): zoned: write pointer offset
>>>> mismatch of zones in raid1 profile
>>>> [ 2026.296445] BTRFS error (device sdb): zoned: failed to load zone info
>>>> of bg 5399847632896
>>>> [ 2026.304576] BTRFS error (device sdb): failed to read block groups: -5
>>>> [ 2026.352547] BTRFS error (device sdb): open_ctree failed
>>>>
>>> Can you check the write pointers for the zones mapping to this block group?
>>>
>>> that should be
>>> blkzone report -c 1 -o 0x274A00000 /dev/sdb
>> # blkzone report -c 1 -o 0x274A00000 /dev/sdb
>> start: 0x274a00000, len 0x080000, cap 0x080000, wptr 0x000000 reset:0
>> non-seq:0, zcond: 1(em) [type: 2(SEQ_WRITE_REQUIRED)]
>> # blkzone report -c 1 -o 0x274A00000 /dev/sdc
>> start: 0x274a00000, len 0x080000, cap 0x080000, wptr 0x000000 reset:0
>> non-seq:0, zcond: 1(em) [type: 2(SEQ_WRITE_REQUIRED)]
> blkzone takes a physical offset in sector unit (512 bytes). According to
> the dump-tree output below, the BG 5399847632896 is at "1819455520768" on
> /dev/sdb and "1819723956224". So, "blkzone report -o" should take
> "0xd3d00000" and "0xd3d80000".
# blkzone report -o 0xd3d00000 -c 1 /dev/sda
start: 0x0d3d00000, len 0x080000, cap 0x080000, wptr 0x04f0e0 reset:0
non-seq:0, zcond: 4(cl) [type: 2(SEQ_WRITE_REQUIRED)]
# blkzone report -o 0xd3d80000 -c 1 /dev/sda
start: 0x0d3d80000, len 0x080000, cap 0x080000, wptr 0x080000 reset:0
non-seq:0, zcond:14(fu) [type: 2(SEQ_WRITE_REQUIRED)]
FYI: my loongson device is in RMA. So I am using D2000 (arm64 w/ 4k
pages) for reading. can't try any mount for now but can do inspect-internal.
> Thanks,
>
>> FYI,
>> # btrfs inspect-internal dump-tree /dev/sdb|grep -A 10 -B 10 5399847632896
>> io_align 65536 io_width 65536 sector_size 16384
>> num_stripes 1 sub_stripes 1
>> stripe 0 devid 1 offset 1819187085312
>> dev_uuid 754f2932-38e5-46b4-93d2-dd699076879e
>> item 104 key (FIRST_CHUNK_TREE CHUNK_ITEM 5399579197440) itemoff
>> 7851 itemsize 80
>> length 268435456 owner 2 stripe_len 65536 type DATA|single
>> io_align 65536 io_width 65536 sector_size 16384
>> num_stripes 1 sub_stripes 1
>> stripe 0 devid 2 offset 1819455520768
>> dev_uuid ee669b85-f641-4d6a-9a66-da13907d55b2
>> item 105 key (FIRST_CHUNK_TREE CHUNK_ITEM 5399847632896) itemoff
>> 7739 itemsize 112
>> length 268435456 owner 2 stripe_len 65536 type
>> METADATA|RAID1
>> io_align 65536 io_width 65536 sector_size 16384
>> num_stripes 2 sub_stripes 1
>> stripe 0 devid 1 offset 1819455520768
>> dev_uuid 754f2932-38e5-46b4-93d2-dd699076879e
>> stripe 1 devid 2 offset 1819723956224
>> dev_uuid ee669b85-f641-4d6a-9a66-da13907d55b2
>> item 106 key (FIRST_CHUNK_TREE CHUNK_ITEM 5400116068352) itemoff
>> 7659 itemsize 80
>> length 268435456 owner 2 stripe_len 65536 type DATA|single
>> io_align 65536 io_width 65536 sector_size 16384
>>
>>> and for the other device as well
>>>
>>> Thanks,
>>> Johannes
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BUG] unable to mount zoned volume after force shutdown
2024-06-11 6:48 ` HAN Yuwei
@ 2024-08-11 6:19 ` Yuwei Han
0 siblings, 0 replies; 8+ messages in thread
From: Yuwei Han @ 2024-08-11 6:19 UTC (permalink / raw)
To: Naohiro Aota; +Cc: Johannes Thumshirn, linux-btrfs@vger.kernel.org
Hello? My loongson is back online.
Kindly reminder here. I am still keeping drive state.
HAN Yuwei.
在 2024/6/11 14:48, HAN Yuwei 写道:
>
> 在 2024/6/10 22:13, Naohiro Aota 写道:
>> On Mon, Jun 10, 2024 at 08:47:37PM GMT, HAN Yuwei wrote:
>>> 在 2024/6/10 16:53, Johannes Thumshirn 写道:
>>>> On 09.06.24 04:24, HAN Yuwei wrote:
>>>>> I can't mount volume on multiple zoned device which data profile is
>>>>> single & metadata profile is raid1.
>>>>> It experienced multiple forced shutdown due to kernel 6.10 can't
>>>>> properly shutdown on loongarch.
>>>>>
>>>>> # dmesg
>>>>>
>>>>> [ 1963.698793] BTRFS info (device sdb): first mount of filesystem
>>>>> b5b2d7d9-9f27-4907-a558-77e8e86df933
>>>>> [ 1963.707801] BTRFS info (device sdb): using crc32c (crc32c-generic)
>>>>> checksum algorithm
>>>>> [ 1963.715597] BTRFS info (device sdb): using free-space-tree
>>>>> [ 1965.492066] BTRFS info (device sdb): host-managed zoned block
>>>>> device
>>>>> /dev/sdb, 52156 zones of 268435456 bytes
>>>>> [ 1966.953590] BTRFS info (device sdb): host-managed zoned block
>>>>> device
>>>>> /dev/sdc, 52156 zones of 268435456 bytes
>>>>> [ 1967.346758] BTRFS info (device sdb): zoned mode enabled with zone
>>>>> size 268435456
>>>>> [ 2026.287356] BTRFS error (device sdb): zoned: write pointer offset
>>>>> mismatch of zones in raid1 profile
>>>>> [ 2026.296445] BTRFS error (device sdb): zoned: failed to load zone
>>>>> info
>>>>> of bg 5399847632896
>>>>> [ 2026.304576] BTRFS error (device sdb): failed to read block
>>>>> groups: -5
>>>>> [ 2026.352547] BTRFS error (device sdb): open_ctree failed
>>>>>
>>>> Can you check the write pointers for the zones mapping to this block
>>>> group?
>>>>
>>>> that should be
>>>> blkzone report -c 1 -o 0x274A00000 /dev/sdb
>>> # blkzone report -c 1 -o 0x274A00000 /dev/sdb
>>> start: 0x274a00000, len 0x080000, cap 0x080000, wptr 0x000000 reset:0
>>> non-seq:0, zcond: 1(em) [type: 2(SEQ_WRITE_REQUIRED)]
>>> # blkzone report -c 1 -o 0x274A00000 /dev/sdc
>>> start: 0x274a00000, len 0x080000, cap 0x080000, wptr 0x000000 reset:0
>>> non-seq:0, zcond: 1(em) [type: 2(SEQ_WRITE_REQUIRED)]
>> blkzone takes a physical offset in sector unit (512 bytes). According to
>> the dump-tree output below, the BG 5399847632896 is at "1819455520768" on
>> /dev/sdb and "1819723956224". So, "blkzone report -o" should take
>> "0xd3d00000" and "0xd3d80000".
> # blkzone report -o 0xd3d00000 -c 1 /dev/sda
>
> start: 0x0d3d00000, len 0x080000, cap 0x080000, wptr 0x04f0e0 reset:0
> non-seq:0, zcond: 4(cl) [type: 2(SEQ_WRITE_REQUIRED)]
>
> # blkzone report -o 0xd3d80000 -c 1 /dev/sda
> start: 0x0d3d80000, len 0x080000, cap 0x080000, wptr 0x080000 reset:0
> non-seq:0, zcond:14(fu) [type: 2(SEQ_WRITE_REQUIRED)]
>
> FYI: my loongson device is in RMA. So I am using D2000 (arm64 w/ 4k
> pages) for reading. can't try any mount for now but can do
> inspect-internal.
>
>> Thanks,
>>
>>> FYI,
>>> # btrfs inspect-internal dump-tree /dev/sdb|grep -A 10 -B 10
>>> 5399847632896
>>> io_align 65536 io_width 65536 sector_size 16384
>>> num_stripes 1 sub_stripes 1
>>> stripe 0 devid 1 offset 1819187085312
>>> dev_uuid 754f2932-38e5-46b4-93d2-dd699076879e
>>> item 104 key (FIRST_CHUNK_TREE CHUNK_ITEM 5399579197440)
>>> itemoff
>>> 7851 itemsize 80
>>> length 268435456 owner 2 stripe_len 65536 type
>>> DATA|single
>>> io_align 65536 io_width 65536 sector_size 16384
>>> num_stripes 1 sub_stripes 1
>>> stripe 0 devid 2 offset 1819455520768
>>> dev_uuid ee669b85-f641-4d6a-9a66-da13907d55b2
>>> item 105 key (FIRST_CHUNK_TREE CHUNK_ITEM 5399847632896)
>>> itemoff
>>> 7739 itemsize 112
>>> length 268435456 owner 2 stripe_len 65536 type
>>> METADATA|RAID1
>>> io_align 65536 io_width 65536 sector_size 16384
>>> num_stripes 2 sub_stripes 1
>>> stripe 0 devid 1 offset 1819455520768
>>> dev_uuid 754f2932-38e5-46b4-93d2-dd699076879e
>>> stripe 1 devid 2 offset 1819723956224
>>> dev_uuid ee669b85-f641-4d6a-9a66-da13907d55b2
>>> item 106 key (FIRST_CHUNK_TREE CHUNK_ITEM 5400116068352)
>>> itemoff
>>> 7659 itemsize 80
>>> length 268435456 owner 2 stripe_len 65536 type
>>> DATA|single
>>> io_align 65536 io_width 65536 sector_size 16384
>>>
>>>> and for the other device as well
>>>>
>>>> Thanks,
>>>> Johannes
>>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-08-11 6:19 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-09 2:23 [BUG] unable to mount zoned volume after force shutdown HAN Yuwei
2024-06-09 10:33 ` Qu Wenruo
2024-06-10 8:47 ` Johannes Thumshirn
2024-06-10 8:53 ` Johannes Thumshirn
2024-06-10 12:47 ` HAN Yuwei
2024-06-10 14:13 ` Naohiro Aota
2024-06-11 6:48 ` HAN Yuwei
2024-08-11 6:19 ` Yuwei Han
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox