According to the btrfs document[1], adding another disk to the existing
btrfs file system is equivalent to create a raid with Raid 1 on Meta,
Raid 0 on Data group (mkfs.btrfs -m raid1 -d raid0).

So when wiping one of the disks out, it will corrupt the data but the meta 
should be OK:
# btrfs fi show
Label: none  uuid: 3e7e0fb5-5fec-4938-bc20-0e5dfdf466ff
        Total devices 2 FS bytes used 128.00KiB
        devid    1 size 512.00MiB used 88.00MiB path /dev/loop0
        *** Some devices missing

This behaviour in this test case has been changed in the kernel with
commit 4330e183c9537df20952d4a9ee142c536fb8ae54, we should be able to
mount the drive with 'rw' in degraded mode, unless the data chunk was
destroyed.

[1]
https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices

** Changed in: ubuntu-kernel-tests
     Assignee: (unassigned) => Po-Hsu Lin (cypressyew)

** Changed in: ubuntu-kernel-tests
       Status: New => In Progress

-- 
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/1809870

Title:
  2365dd3ca02bbb6d3412404482e1d85752549953 in ubuntu_btrfs_kernel_fixes
  failed on B

Status in ubuntu-kernel-tests:
  In Progress
Status in linux package in Ubuntu:
  Incomplete

Bug description:
  Test failed on Bionic, and this patch does exist in Bionic kernel
  tree.

  
  Invoking test 2365dd3ca02bbb6d3412404482e1d85752549953

  fix 2365dd3ca02bbb6d3412404482e1d85752549953

  btrfs: undo sysfs when open_ctree() fails

      reproducer:
      mkfs.btrfs -f /dev/sdb &&    mount /dev/sdb /btrfs &&    btrfs dev add -f 
/dev/sdc /btrfs &&    umount /btrfs &&    wipefs -a /dev/sdc &&    mount -o 
degraded /dev/sdb /btrfs
      //above mount fails so try with RO
      mount -o degraded,ro /dev/sdb /btrfs

      ------
      sysfs: cannot create duplicate filename 
'/fs/btrfs/3f48c79e-5ed0-4e87-b189-86e749e503f4'
      ::

  Performing full device TRIM /dev/loop1 (512.00MiB) ...
  mount -o degraded /dev/loop0 
/tmp/mnt-2365dd3ca02bbb6d3412404482e1d85752549953 was expected to fail

  FAIL: 2365dd3ca02bbb6d3412404482e1d85752549953 (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 20 18:17 seq
   crw-rw---- 1 root audio 116, 33 Dec 20 18:17 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:
  CurrentDmesg:
   
  Date: Thu Dec 27 07:34:54 2018
  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/1809870/+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

Reply via email to