The cause of this seems to be that we are just telling the SUT to create a metadata block groups with raid 5. The data block groups was not specified. It will be using RAID0.
So that when one disk corrupts, the raid will corrupt. The system will prevent user to mount the partition as rw to prevent data loss (you can mount it with read-only). mkfs.btrfs -f -m raid5 $DEV0 $DEV1 $DEV2 $DEV3 $DEV4 btrfs-progs v4.15.1 See http://btrfs.wiki.kernel.org for more information. Performing full device TRIM /dev/loop0 (2.00GiB) ... Performing full device TRIM /dev/loop1 (2.00GiB) ... Performing full device TRIM /dev/loop2 (2.00GiB) ... Performing full device TRIM /dev/loop3 (2.00GiB) ... Performing full device TRIM /dev/loop4 (2.00GiB) ... Label: (null) UUID: 21f732f9-2850-4732-9901-c4bce48c3efb Node size: 16384 Sector size: 4096 Filesystem size: 10.00GiB Block group profiles: Data: RAID0 1023.75MiB Metadata: RAID5 819.00MiB System: RAID5 12.75MiB SSD detected: no Incompat features: extref, raid56, skinny-metadata Number of devices: 5 Devices: ID SIZE PATH 1 2.00GiB /dev/loop0 2 2.00GiB /dev/loop1 3 2.00GiB /dev/loop2 4 2.00GiB /dev/loop3 5 2.00GiB /dev/loop4 If you create the raid with data block groups assigned with raid 5, the Block group profiles will become: Data: RAID5 819.00MiB Metadata: RAID5 819.00MiB System: RAID5 12.75MiB ** Also affects: ubuntu-kernel-tests Importance: Undecided Status: New ** Changed in: ubuntu-kernel-tests Assignee: (unassigned) => Po-Hsu Lin (cypressyew) ** Changed in: ubuntu-kernel-tests Importance: Undecided => Medium ** Changed in: ubuntu-kernel-tests Status: New => In Progress ** Changed in: linux (Ubuntu) Status: Confirmed => Invalid -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1810376 Title: 5fbc7c59fd22c5a6531b40b0759624b680a95e52 in btrfs_kernel_fixes failed on B Status in ubuntu-kernel-tests: In Progress Status in linux package in Ubuntu: Invalid Bug description: Test failed with mount operation: mount: /tmp/mnt-5fbc7c59fd22c5a6531b40b0759624b680a95e52: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error. This patch could be found in Bionic tree: https://kernel.ubuntu.com/git/ubuntu/ubuntu-bionic.git/commit/?id=5fbc7c59fd22c5a6531b40b0759624b680a95e52 Invoking test 5fbc7c59fd22c5a6531b40b0759624b680a95e52 fix 5fbc7c59fd22c5a6531b40b0759624b680a95e52 Btrfs: fix unfinished readahead thread for raid5/6 degraded mounting Steps to reproduce: # mkfs.btrfs -f /dev/sd[b-f] -m raid5 -d raid5 # mkfs.ext4 /dev/sdc --->corrupt one of btrfs device # mount /dev/sdb /mnt -o degraded # btrfs scrub start -BRd /mnt This is because readahead would skip missing device, this is not true for RAID5/6, because REQ_GET_READ_MIRRORS return 1 for RAID5/6 block mapping. If expected data locates in missing device, readahead thread would not call __readahead_hook() which makes event @rc->elems=0 wait forever. Fix this problem by checking return value of btrfs_map_block(),we can only skip missing device safely if there are several mirrors. mke2fs 1.44.1 (24-Mar-2018) Discarding device blocks: 4096/524288************* *************done Creating filesystem with 524288 4k blocks and 131072 inodes Filesystem UUID: c4b9a22f-cacb-44d6-80b9-cca217a61f5b Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912 Allocating group tables: 0/16***** *****done Writing inode tables: 0/16***** *****done Creating journal (16384 blocks): done Writing superblocks and filesystem accounting information: 0/16***** *****done mount: /tmp/mnt-5fbc7c59fd22c5a6531b40b0759624b680a95e52: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error. ERROR: not a btrfs filesystem: /tmp/mnt-5fbc7c59fd22c5a6531b40b0759624b680a95e52 btrfs scrub start on /tmp/mnt-5fbc7c59fd22c5a6531b40b0759624b680a95e52 failed umount: /tmp/mnt-5fbc7c59fd22c5a6531b40b0759624b680a95e52: not mounted. FAIL: 5fbc7c59fd22c5a6531b40b0759624b680a95e52 (ret=1) ProblemType: Bug DistroRelease: Ubuntu 18.04 Package: linux-image-4.15.0-43-generic 4.15.0-43.46 ProcVersionSignature: User Name 4.15.0-43.46-generic 4.15.18 Uname: Linux 4.15.0-43-generic x86_64 AlsaDevices: total 0 crw-rw---- 1 root audio 116, 1 Dec 31 02:11 seq crw-rw---- 1 root audio 116, 33 Dec 31 02:11 timer AplayDevices: Error: [Errno 2] No such file or directory: 'aplay': 'aplay' ApportVersion: 2.20.9-0ubuntu7.5 Architecture: amd64 ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord': 'arecord' AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1: Date: Thu Jan 3 07:37:01 2019 IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig': 'iwconfig' Lsusb: Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub MachineType: QEMU Standard PC (i440FX + PIIX, 1996) PciMultimedia: ProcFB: 0 cirrusdrmfb ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-43-generic root=UUID=2f68c627-8ab4-40d5-8c06-6563436d0f96 ro console=ttyS0,115200n8 RelatedPackageVersions: linux-restricted-modules-4.15.0-43-generic N/A linux-backports-modules-4.15.0-43-generic N/A linux-firmware 1.173.2 RfKill: Error: [Errno 2] No such file or directory: 'rfkill': 'rfkill' SourcePackage: linux UpgradeStatus: No upgrade log present (probably fresh install) dmi.bios.date: 04/01/2014 dmi.bios.vendor: SeaBIOS dmi.bios.version: Ubuntu-1.8.2-1ubuntu1 dmi.chassis.type: 1 dmi.chassis.vendor: QEMU dmi.chassis.version: pc-i440fx-xenial dmi.modalias: dmi:bvnSeaBIOS:bvrUbuntu-1.8.2-1ubuntu1:bd04/01/2014:svnQEMU:pnStandardPC(i440FX+PIIX,1996):pvrpc-i440fx-xenial:cvnQEMU:ct1:cvrpc-i440fx-xenial: dmi.product.name: Standard PC (i440FX + PIIX, 1996) dmi.product.version: pc-i440fx-xenial dmi.sys.vendor: QEMU To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu-kernel-tests/+bug/1810376/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp