On 10/7/19 5:45 AM, Anand Jain wrote:
In open_fs_devices() we identify alien device but we don't reset its the device::name. So progs device list does not show the device missing as shown in the script below. mkfs.btrfs -fq /dev/sdd && mount /dev/sdd /btrfs mkfs.btrfs -fq -draid1 -mraid1 /dev/sdc /dev/sdb sleep 3 # avoid racing with udev's useless scans if needed btrfs dev add -f /dev/sdb /btrfs mount -o degraded /dev/sdc /btrfs1 No missing device: btrfs fi show -m /btrfs1 Label: none uuid: 3eb7cd50-4594-458f-9d68-c243cc49954d Total devices 2 FS bytes used 128.00KiB devid 1 size 12.00GiB used 1.26GiB path /dev/sdc devid 2 size 12.00GiB used 1.26GiB path /dev/sdb Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx>
Why not just remove the device if there's any error? I'm not sure why these particular checks make a difference from any other error? Thanks,
Josef
