0

I have a synology nas drive in raid6 that had a drive failed. I replaced the drive and had two other drives kicked off the raid after a power failure crashing the storage pool. I was able to move all the drives over to another system and rebuild the raid and lvm but there are errors on the btrfs file system that prevent mounting.

I have ran btrfs restore with dry run and a number of expected files show up. I currently get

mount error

can't read superblock on /dev/mapper/vg1-volume_1.

This is the last error message, along with the cant read superblock. from dmesg

BTRFS info (device dm-1): using crc32c (crc32c-intel) checksum algorithm
BTRFS info (device dm-1): using free space tree
BTRFS critical (device dm-1): corrupt leaf: root=1 block=503087104 slot=23, invalid root flags, have 0x400000000 expect mask 0x1000000000001
BTRFS error (device dm-1): read time tree block corruption detected on logical 503087104 mirror 1
BTRFS critical (device dm-1): corrupt leaf: root=1 block=503087104 slot=23, invalid root flags, have 0x400000000 expect mask 0x1000000000001
BTRFS error (device dm-1): read time tree block corruption detected on logical 503087104 mirror 2
BTRFS error (device dm-1): open_ctree failed

The last error I was able to clear was from Btrfs super-recover says all superblocks are good but mount disagrees

zero log cleared the first error.

btrfs rescue super-recover -v /dev/mapper/vg1-volume_1
All Devices:
        Device: id = 1, name = /dev/mapper/vg1-volume_1

Before Recovering:
        [All good supers]:
                device name = /dev/mapper/vg1-volume_1
                superblock bytenr = 65536

                device name = /dev/mapper/vg1-volume_1
                superblock bytenr = 67108864

                device name = /dev/mapper/vg1-volume_1
                superblock bytenr = 274877906944

        [All bad supers]:

All supers are valid, no need to recover
btrfs check --check-data-csum
Opening filesystem to check...
Checking filesystem on /dev/mapper/vg1-volume_1
UUID: c9d2c563-30cb-4b27-b29a-d5f2642597d8
[1/7] checking root items
[2/7] checking extents
Invalid key type(BLOCK_GROUP_ITEM) found in root(202)
ignoring invalid key
--------There are a lot of these
Invalid key type(BLOCK_GROUP_ITEM) found in root(202)
ignoring invalid key
[3/7] checking free space tree
[4/7] checking fs roots
[5/7] checking csums against data
[6/7] checking root refs
[7/7] checking quota groups skipped (not enabled on this FS)
found 37552772378624 bytes used, no error found
total csum bytes: 2551494312
total tree bytes: 7828389888
total fs tree bytes: 4063068160
total extent tree bytes: 754450432
btree space waste bytes: 1181718069
file data blocks allocated: 37548545822720
 referenced 37710498009088
btrfs inspect-internal dump-super /dev/mapper/vg1-volume_1
superblock: bytenr=65536, device=/dev/mapper/vg1-volume_1
---------------------------------------------------------
csum_type               0 (crc32c)
csum_size               4
csum                    0x5be2c7ca [match]
bytenr                  65536
flags                   0x1
                        ( WRITTEN )
magic                   _BHRfS_M [match]
fsid                    c9d2c563-30cb-4b27-b29a-d5f2642597d8
metadata_uuid           c9d2c563-30cb-4b27-b29a-d5f2642597d8
label                   2019.10.19-07:46:08 v24922
generation              2838041
root                    29818880
sys_array_size          129
chunk_root_generation   2793730
root_level              1
chunk_root              21020672
chunk_root_level        1
log_root                0
log_root_transid        0
log_root_level          0
total_bytes             39958383427584
bytes_used              37552772378624
sectorsize              4096
nodesize                16384
leafsize (deprecated)   16384
stripesize              4096
root_dir                6
num_devices             1
compat_flags            0x8000000000000000
compat_ro_flags         0x3
                        ( FREE_SPACE_TREE |
                          FREE_SPACE_TREE_VALID )
incompat_flags          0x16b
                        ( MIXED_BACKREF |
                          DEFAULT_SUBVOL |
                          COMPRESS_LZO |
                          BIG_METADATA |
                          EXTENDED_IREF |
                          SKINNY_METADATA )
cache_generation        18446744073709551615
uuid_tree_generation    2838039
dev_item.uuid           3ce7be34-1a1f-42aa-9330-186edef4841e
dev_item.fsid           c9d2c563-30cb-4b27-b29a-d5f2642597d8 [match]
dev_item.type           0
dev_item.total_bytes    39958383427584
dev_item.bytes_used     38619297349632
dev_item.io_align       4096
dev_item.io_width       4096
dev_item.sector_size    4096
dev_item.devid          1
dev_item.dev_group      0
dev_item.seek_speed     0
dev_item.bandwidth      0
dev_item.generation     0

I'm not sure how to proceed that a lot of the options are potentially destructive. When I had the drives in the read only synology pool I was able to downloads all my critical files, but cant find out why this cant be mounted on a regular Linux box.

: I also ccd this on serverfault.

2
  • This was created with the basic settings on a synology nas drive. The underlying fs is a lvm on top of raid6 with btrfs as the actual fs. It mounts read only on the nas box but will not mount on a separate linux box. Mar 11 at 3:20
  • 1
    Please don't double post. serverfault.com/questions/1155999/…
    – paladin
    Mar 11 at 7:20

0

You must log in to answer this question.

Browse other questions tagged .