Raid array mount fails with error

  • I am trying to mount an existing MDADM RAID10 array (BTRFS fs on top) with a new OMV installation.

    MDADM is finding the array (as md2) and reports no problems (in GUI and CLI) but when trying to mount the fs I always get the following error:

    wrong fs type, bad option, bad superblock on /dev/md2, missing codepage or helper program, or other error. 

    I tried

    mount /dev/md2 /srv/disk1

    mount -t btrfs /dev/md2 /srv/disk1

    mount -t ext4 /dev/md2 /srv/disk1

    OMV GUI can see the fs as BTRFS but also throws errors when mounting inside the GUI.

    OMV6 HP t630

    OMV6 Xeon / i5 - SCSI PC

    OMV6 on Raspberry Pi4

    OMV5 on ProLiant N54L (AMD)

  • Code
    Jan 11 16:06:24 Z45 kernel: BTRFS: device label 2021.07.28-14:29:09 v23739 devid 1 transid 57555696 /dev/md2 scanned by mount (4080)
    Jan 11 16:06:24 Z45 kernel: BTRFS info (device md2): first mount of filesystem 3f00777f-2ee6-439f-a110-6b3ace067ad1
    Jan 11 16:06:24 Z45 kernel: BTRFS info (device md2): using crc32c (crc32c-intel) checksum algorithm
    Jan 11 16:06:24 Z45 kernel: BTRFS info (device md2): using free space tree
    Jan 11 16:06:24 Z45 kernel: BTRFS critical (device md2): corrupt leaf: root=1 block=142342258688 slot=0, invalid root flags, have 0x400000000 expect mask 0x1000000000001
    Jan 11 16:06:24 Z45 kernel: BTRFS error (device md2): read time tree block corruption detected on logical 142342258688 mirror 1
    Jan 11 16:06:24 Z45 kernel: BTRFS critical (device md2): corrupt leaf: root=1 block=142342258688 slot=0, invalid root flags, have 0x400000000 expect mask 0x1000000000001
    Jan 11 16:06:24 Z45 kernel: BTRFS error (device md2): read time tree block corruption detected on logical 142342258688 mirror 2
    Jan 11 16:06:24 Z45 kernel: BTRFS error (device md2): open_ctree failed

    OMV6 HP t630

    OMV6 Xeon / i5 - SCSI PC

    OMV6 on Raspberry Pi4

    OMV5 on ProLiant N54L (AMD)

  • If you used BTRFS single on top of MD RAID, then data is single and metadata is dup. The fact that the error mentions "mirror 1" and "mirror 2" reads like possible metadata corruption which unfortunately typically means recover what you can if you can get it to mount, or restore from backups.


    See the 1st reply by Chris Murphy on this thread: https://discussion.fedoraproje…superblock-btrfs/114445/2 and use the first set of mount read-only options and then the 2nd.

  • It didnt work. I now found out that 'normal' Linux does not recognise BTRFS filesystems created by Synology. Thats why I cannot mount the fs under OMV.

    OMV6 HP t630

    OMV6 Xeon / i5 - SCSI PC

    OMV6 on Raspberry Pi4

    OMV5 on ProLiant N54L (AMD)

  • It didnt work. I now found out that 'normal' Linux does not recognise BTRFS filesystems created by Synology. Thats why I cannot mount the fs under OMV.

    I could have told you that if you'd mentioned that up front. The version of BTRFS on Synology is heavily patched with custom changes that have never been upstreamed to the main BTRFS project. If your RAID10 disks are out of a Synology NAS they would normally be partitioned in a way OMV does not, and have LVM on top before any logical volume is formatted with BTRFS. If the filesystem had been EXT4 you could have at least read all the data.

  • I could have told you that if you'd mentioned that up front. The version of BTRFS on Synology is heavily patched with custom changes that have never been upstreamed to the main BTRFS project. If your RAID10 disks are out of a Synology NAS they would normally be partitioned in a way OMV does not, and have LVM on top before any logical volume is formatted with BTRFS. If the filesystem had been EXT4 you could have at least read all the data.

    Yeah. thanks. It really beats me why a company like Synology has to create their own version of BTRFS.

    OMV6 HP t630

    OMV6 Xeon / i5 - SCSI PC

    OMV6 on Raspberry Pi4

    OMV5 on ProLiant N54L (AMD)

  • Yeah. thanks. It really beats me why a company like Synology has to create their own version of BTRFS.

    You'd have to read their blurb to get a sense of how they decided to fit BTRFS to their existing storage stack of MD RAID (SHR/SHR2) > LVM (patched?) > BTRFS patched. They make no use of BTRFS RAID profiles. Somehow their system claims to be able to detect and repair a BTRFS filesystem where the data is "checksummed" even though the filesystem doesn't appear to keep a second copy as in the case of native BTRFS RAID. But their system can fail if metadata is corruputed just as main stream BTRFS would.

  • To read the BTRFS data disk of Synology without the Synology system, you may need Ubuntu 18.04.4 or an earlier version, with a kernel of 4.15.0-108 or earlier. If the Synology system is still functional, you won't need to go through all this trouble.

    OMV 7.x | 6.8 Proxmox Kernel

    GIGABYTE Z370M DS3H Motherboard

    Intel G4560 CPU | 16G×1 Non-ECC RAM

    128G SSD + 1T SSD + 4T×2 HDD

    500W PSU

  • To read the BTRFS data disk of Synology without the Synology system, you may need Ubuntu 18.04.4 or an earlier version, with a kernel of 4.15.0-108 or earlier. If the Synology system is still functional, you won't need to go through all this trouble.

    Thanks for the tip. I am currently trying with 16.04 but that doesnt detect my 2.5GB USB-Network adapter....

    OMV6 HP t630

    OMV6 Xeon / i5 - SCSI PC

    OMV6 on Raspberry Pi4

    OMV5 on ProLiant N54L (AMD)

  • The Synology Knowledge Center has a official guide that you can refer to.


    However, I saw in another tutorial that the official guide has some issues. It's in Chinese, so you might need to use a translator.


    Well, when I used Synology, I formatted it to EXT4. I can't verify the accuracy of the another tutorial. A few days ago, when I mounted the Synology EXT4 disk, I also referred to the official guide, and it mounted correctly. Later, I realized that the EXT4 from Synology can be directly mounted on OMV. ||


    Anyway, please make sure to have a backup before proceeding.

    OMV 7.x | 6.8 Proxmox Kernel

    GIGABYTE Z370M DS3H Motherboard

    Intel G4560 CPU | 16G×1 Non-ECC RAM

    128G SSD + 1T SSD + 4T×2 HDD

    500W PSU

  • To read the BTRFS data disk of Synology without the Synology system, you may need Ubuntu 18.04.4 or an earlier version, with a kernel of 4.15.0-108 or earlier. If the Synology system is still functional, you won't need to go through all this trouble.

    Synology uses kernel 4.4 IIRC. Honestly, I never thought about using an old Linux distro to read the data. Obviously you can hope if works it you stick the drives back in a Syno NAS, but if there's metadata corruption it's not going to mount thr BTRFS filesystem.

  • Synology uses kernel 4.4 IIRC. Honestly, I never thought about using an old Linux distro to read the data. Obviously you can hope if works it you stick the drives back in a Syno NAS, but if there's metadata corruption it's not going to mount thr BTRFS filesystem.

    Sure, when I first saw the official guide using this version of ubuntu, I was skeptical about whether it would work. :D It was mentioned in this post that it's because linux merged a patch, which means only the kernel before this version can read it properly.


    Putting it back in the Synology NAS is indeed a good option. Temporarily installing XPEnology is also doable. I’ve even used UFS Explorer Professional Recovery software on Win10 to read this unconventional BTRFS before (Oh, that was several months ago).


    Of course, if metadata corruption prevents it from being read, it's a very bad outcome.

    OMV 7.x | 6.8 Proxmox Kernel

    GIGABYTE Z370M DS3H Motherboard

    Intel G4560 CPU | 16G×1 Non-ECC RAM

    128G SSD + 1T SSD + 4T×2 HDD

    500W PSU

  • Zafkiel I hadn't seen that reddit post before, but it reminded me that Synology implemented a form of Windws ACL on their filesystems which turns into a custom mount option for BTRFS along with a "syno space allocator" option, whatever that is, and even an explicit rollback option for BTRFS snaphsots. So it's hardly bog standard BTRFS.,

  • Does Synology use MDADM or BTRFS for the actual raid management of RAID10? I believe its MDADM and only the filesystem on top is BTRFS. Right?

    OMV6 HP t630

    OMV6 Xeon / i5 - SCSI PC

    OMV6 on Raspberry Pi4

    OMV5 on ProLiant N54L (AMD)

  • Does Synology use MDADM or BTRFS for the actual raid management of RAID10? I believe its MDADM and only the filesystem on top is BTRFS. Right?

    Yes, as mentioned already: MD RAID for the "pool", on top is LVM with logical volumes to sub-divide the "pool" storage space. Individual volumes are then formatted with a filesystem or used for block storage ( iscsi luns).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!