BTRFS RAID unmounts when disconnecting *first* drive

If none of the more specific forums is the right place to ask

BTRFS RAID unmounts when disconnecting *first* drive

Postby Vanadar » 2021-01-01 13:41

Hello and happy new year to all of you! I'm new here and have a question regarding BTRFS.

For my new home server, which will mainly be used for running docker containers, I would like to use BTRFS in a RAID1. For me the advantages are that I can increase the volume size by adding more drives, can make snapshots from the running system and can limit the size of subvolumes so one app in a docker container can't eat all the available space.
Of course SMART data, available disk space and so on will be monitored and backups (from the snapshots) will be stored on another machine.
But during tests after the overall successful setup I noticed that the BTRFS volume gets unmounted when I disconnect the first drive. That's not the behaviour I expected from a RAID1 as this should avoid downtimes exactly in such a case. The volume stays mounted when I disconnect one of the other drives.

Can someone help me how I can make sure that the volume stays mounted in such a case?

Versions
Here are some details of the software in use:
Code: Select all
# uname -a
Linux hostname_concealed 4.19.0-13-amd64 #1 SMP Debian 4.19.160-2 (2020-11-28) x86_64 GNU/Linux
# cat /etc/debian_version
10.7
# btrfs version
btrfs-progs v4.20.1


Partitions
The system starts from nvme0n1p2 on an SSD, mounted as /boot. Then I can remotely unlock the encrypted volume nvme0n1p3 via ssh. On that is a LVM volume group with a volume member with BTRFS and a subvolume @root which gets mounted to / and a subvolume @snapshots which gets mounted to /mnt/snapshots/system. To have SWAP also encrypted it is also in the LVM volume group. I know that the SSD is a single point of failure but that's the rest of the system like the mainboard too. But I expect a far lower probability of failures from there than from a spinning HDD and I can restore it much faster due to the small amount of data.
The data shall be stored on an BTRFS volume consisting of three also fully encrypted HDDs sda, sdb and sdc. I started with only two drives but after seeing the volume unmounting when loosing the first drive I thought it unmounts because the device count of the BTRFS volume drops under the minimum for a RAID1. But this behavior didn't change after adding a third drive. The drives are unlocked automatically with a LUKS-keyfile from /root during boot. The second 1, e.g. data-sda1*1* stands for the "generation" of the drive. In my tests I saw that BTRFS has issues to add an encrypted device under the same name another device already had. So when I have to replace e.g. sda in the future with a bigger one or due to drive's health I will increment this and decrypt it as data-a12.
Code: Select all
# lsblk -f
NAME                FSTYPE      LABEL  UUID                                   FSAVAIL FSUSE% MOUNTPOINT
sda
└─sda1              crypto_LUKS        9ee3caa8-14b2-4d32-a1ef-5b858e3e4c5d
  └─data-a11        btrfs       data   7e3fc9ab-d385-4541-8f4b-629f04ebe7c8      3.7T     0% /mnt/snapshots/data
sdb
└─sdb1              crypto_LUKS        dad2f150-93e6-4e6e-9dfc-0489ad1dd190
  └─data-b11        btrfs       data   7e3fc9ab-d385-4541-8f4b-629f04ebe7c8
sdc
└─sdc1              crypto_LUKS        e5560bb9-d930-4fa6-be22-67a96a5f8ef6
  └─data-c11        btrfs       data   7e3fc9ab-d385-4541-8f4b-629f04ebe7c8
nvme0n1
├─nvme0n1p1         vfat               93C2-6713                               505.7M     1% /boot/efi
├─nvme0n1p2         ext2               6a07e2ea-9ab8-4180-a9fd-fd9e043ffa83    170.5M    23% /boot
└─nvme0n1p3         crypto_LUKS        c73f13ea-ef20-4ebf-92d6-dbd0f5cd6d44
  └─nvme0n1p3_crypt LVM2_member        Z2mZtj-1lh2-kxau-v03N-XHcp-MSlJ-DCPtz8
    ├─system-root   btrfs       system 68af359d-8f8c-4b30-a41c-85ff2a9bb01a     93.2G     1% /mnt/snapshots/system
    └─system-swap_1 swap               71ce1c6b-971d-4315-87b9-91ed45224abe                  [SWAP]


Here is the BTRFS output:
Code: Select all
# btrfs filesystem show
Label: 'system'  uuid: 68af359d-8f8c-4b30-a41c-85ff2a9bb01a
        Total devices 1 FS bytes used 1.10GiB
        devid    1 size 95.23GiB used 3.02GiB path /dev/mapper/system-root

Label: 'data'  uuid: 7e3fc9ab-d385-4541-8f4b-629f04ebe7c8
        Total devices 3 FS bytes used 177.08MiB
        devid    1 size 3.64TiB used 1.03GiB path /dev/mapper/data-a11
        devid    2 size 3.64TiB used 2.00GiB path /dev/mapper/data-b11
        devid    3 size 3.64TiB used 1.03GiB path /dev/mapper/data-c11


In /etc/fstab I added the subvolumes just mentioned. /var and /home are commented out during the tests, but shall be mounted to the BTRFS volume data after solving this problem. For the docker containers I will add additional subvolumes.
For the BTRFS volume data I already added the option degraded. I tried several variants for <file system>: /dev/mapper/data-a11, LABEL=data, UUID=7e3fc9ab-d385-4541-8f4b-629f04ebe7c8.
Code: Select all
# cat /etc/fstab
# <file system>                                 <mount point>           <type>  <options>                               <dump>  <pass>

# volumes on LVM-volume system-root
/dev/mapper/system-root                         /                       btrfs   defaults,ssd,subvol=@root               0       0
/dev/mapper/system-root                         /mnt/snapshots/system   btrfs   defaults,ssd,subvol=@snapshots          0       0

# volumes on BTRFS-volume data
# /dev/mapper/data-a11                          /var                    btrfs   defaults,degraded,subvol=@var           0       0
# /dev/mapper/data-a11                          /home                   btrfs   defaults,degraded,subvol=@home          0       0
LABEL=data                                      /mnt/snapshots/data     btrfs   defaults,degraded,subvol=@snapshots     0       0
# UUID=7e3fc9ab-d385-4541-8f4b-629f04ebe7c8     /mnt/snapshots/data     btrfs   defaults,degraded,subvol=@snapshots     0       0

# /boot was on /dev/nvme0n1p2 during installation
UUID=6a07e2ea-9ab8-4180-a9fd-fd9e043ffa83       /boot                   ext2    defaults                                0       2

# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=93C2-6713                                  /boot/efi               vfat    umask=0077                              0       1
/dev/mapper/system-swap_1                       none                    swap    sw                                      0       0


After booting mountinfo always reports /dev/mapper/data-a11 as the file system, no matter if I used device, UUID or label in /etc/fstab.
Code: Select all
# cat /proc/self/mountinfo | grep /dev/mapper/
25 0 0:22 /@root / rw,relatime shared:1 - btrfs /dev/mapper/system-root rw,ssd,space_cache,subvolid=266,subvol=/@root
110 25 0:22 /@snapshots /mnt/snapshots/system rw,relatime shared:59 - btrfs /dev/mapper/system-root rw,ssd,space_cache,subvolid=258,subvol=/@snapshots
119 25 0:48 /@snapshots /mnt/snapshots/data rw,relatime shared:65 - btrfs /dev/mapper/data-a11 rw,degraded,space_cache,subvolid=260,subvol=/@snapshots


Disconnecting
I took a look in syslog what happens when sdc is disconnected and how that differs from that when sda is disconnected:

Disconnect /dev/sda
Code: Select all
# tail -n 100 /var/log/syslog
Dec 31 19:41:00 hostname_concealed kernel: [  172.895345] ata1: SATA link down (SStatus 0 SControl 300)
Dec 31 19:41:06 hostname_concealed kernel: [  178.431582] ata1: SATA link down (SStatus 0 SControl 300)
Dec 31 19:41:11 hostname_concealed kernel: [  183.807736] ata1: SATA link down (SStatus 0 SControl 300)
Dec 31 19:41:11 hostname_concealed kernel: [  183.807761] ata1.00: disabled
Dec 31 19:41:11 hostname_concealed kernel: [  183.807795] ata1.00: detaching (SCSI 1:0:0:0)
Dec 31 19:41:11 hostname_concealed kernel: [  183.808831] sd 1:0:0:0: [sda] Stopping disk
Dec 31 19:41:11 hostname_concealed kernel: [  183.808856] sd 1:0:0:0: [sda] Start/Stop Unit failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
Dec 31 19:41:11 hostname_concealed systemd[1]: Stopped target Local Encrypted Volumes.
Dec 31 19:41:11 hostname_concealed systemd[1]: Stopping Cryptography Setup for data-a11...
Dec 31 19:41:11 hostname_concealed systemd[1]: Unmounting /mnt/snapshots/data...
Dec 31 19:41:11 hostname_concealed systemd[1961]: mnt-snapshots-data.mount: Succeeded.
Dec 31 19:41:11 hostname_concealed systemd-cryptsetup[1991]: device-mapper: remove ioctl on data-a11  failed: Device or resource busy
Dec 31 19:41:11 hostname_concealed kernel: [  183.853348] BTRFS error (device dm-4): bdev /dev/mapper/data-a11 errs: wr 314, rd 1, flush 7, corrupt 0, gen 0
Dec 31 19:41:11 hostname_concealed kernel: [  183.853855] BTRFS error (device dm-4): bdev /dev/mapper/data-a11 errs: wr 315, rd 1, flush 7, corrupt 0, gen 0
Dec 31 19:41:11 hostname_concealed kernel: [  183.859844] BTRFS error (device dm-4): bdev /dev/mapper/data-a11 errs: wr 316, rd 1, flush 7, corrupt 0, gen 0
Dec 31 19:41:11 hostname_concealed kernel: [  183.859935] BTRFS error (device dm-4): bdev /dev/mapper/data-a11 errs: wr 317, rd 1, flush 7, corrupt 0, gen 0
Dec 31 19:41:11 hostname_concealed kernel: [  183.860016] BTRFS error (device dm-4): bdev /dev/mapper/data-a11 errs: wr 318, rd 1, flush 7, corrupt 0, gen 0
Dec 31 19:41:11 hostname_concealed kernel: [  183.860098] BTRFS error (device dm-4): bdev /dev/mapper/data-a11 errs: wr 319, rd 1, flush 7, corrupt 0, gen 0
Dec 31 19:41:11 hostname_concealed kernel: [  183.860173] BTRFS error (device dm-4): bdev /dev/mapper/data-a11 errs: wr 320, rd 1, flush 7, corrupt 0, gen 0
Dec 31 19:41:11 hostname_concealed kernel: [  183.860250] BTRFS error (device dm-4): bdev /dev/mapper/data-a11 errs: wr 321, rd 1, flush 7, corrupt 0, gen 0
Dec 31 19:41:11 hostname_concealed kernel: [  183.860367] BTRFS error (device dm-4): bdev /dev/mapper/data-a11 errs: wr 321, rd 1, flush 8, corrupt 0, gen 0
Dec 31 19:41:11 hostname_concealed kernel: [  183.877392] BTRFS warning (device dm-4): lost page write due to IO error on /dev/mapper/data-a11
Dec 31 19:41:11 hostname_concealed kernel: [  183.877399] BTRFS error (device dm-4): bdev /dev/mapper/data-a11 errs: wr 322, rd 1, flush 8, corrupt 0, gen 0
Dec 31 19:41:11 hostname_concealed kernel: [  183.877504] BTRFS warning (device dm-4): lost page write due to IO error on /dev/mapper/data-a11
Dec 31 19:41:11 hostname_concealed kernel: [  183.877508] BTRFS warning (device dm-4): lost page write due to IO error on /dev/mapper/data-a11
Dec 31 19:41:11 hostname_concealed kernel: [  183.877538] BTRFS error (device dm-4): error writing primary super block to device 1
Dec 31 19:41:12 hostname_concealed systemd[1]: mnt-snapshots-data.mount: Succeeded.
Dec 31 19:41:12 hostname_concealed systemd[1]: Unmounted /mnt/snapshots/data.
Dec 31 19:41:12 hostname_concealed systemd-cryptsetup[1991]: Underlying device for crypt device data-a11 disappeared.
Dec 31 19:41:12 hostname_concealed systemd[1]: systemd-cryptsetup@data\x2da11.service: Succeeded.
Dec 31 19:41:12 hostname_concealed systemd[1]: Stopped Cryptography Setup for data-a11.

Here /mnt/snapshots/data gets unmounted.

Disconnect /dev/sdc
Code: Select all
# tail -n 100 /var/log/syslog
Dec 31 18:48:08 hostname_concealed kernel: [  138.967752] ata3: SATA link down (SStatus 0 SControl 300)
Dec 31 18:48:13 hostname_concealed kernel: [  144.344219] ata3: SATA link down (SStatus 0 SControl 300)
Dec 31 18:48:19 hostname_concealed kernel: [  149.720375] ata3: SATA link down (SStatus 0 SControl 300)
Dec 31 18:48:19 hostname_concealed kernel: [  149.720400] ata3.00: disabled
Dec 31 18:48:19 hostname_concealed kernel: [  149.720446] ata3.00: detaching (SCSI 3:0:0:0)
Dec 31 18:48:19 hostname_concealed kernel: [  149.723435] sd 3:0:0:0: [sdd] Synchronizing SCSI cache
Dec 31 18:48:19 hostname_concealed kernel: [  149.723475] sd 3:0:0:0: [sdd] Synchronize Cache(10) failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
Dec 31 18:48:19 hostname_concealed kernel: [  149.723478] sd 3:0:0:0: [sdd] Stopping disk
Dec 31 18:48:19 hostname_concealed kernel: [  149.723486] sd 3:0:0:0: [sdd] Start/Stop Unit failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
Dec 31 18:48:19 hostname_concealed systemd[1]: Stopped target Local Encrypted Volumes.
Dec 31 18:48:19 hostname_concealed systemd[1]: Stopping Cryptography Setup for data-c11...
Dec 31 18:48:19 hostname_concealed systemd-cryptsetup[1988]: device-mapper: remove ioctl on data-c11  failed: Device or resource busy
Dec 31 18:48:19 hostname_concealed systemd-cryptsetup[1988]: device-mapper: remove ioctl on data-c11  failed: Device or resource busy
Dec 31 18:48:19 hostname_concealed systemd-cryptsetup[1988]: device-mapper: remove ioctl on data-c11  failed: Device or resource busy
Dec 31 18:48:19 hostname_concealed systemd-cryptsetup[1988]: device-mapper: remove ioctl on data-c11  failed: Device or resource busy
Dec 31 18:48:19 hostname_concealed systemd-cryptsetup[1988]: device-mapper: remove ioctl on data-c11  failed: Device or resource busy
Dec 31 18:48:20 hostname_concealed systemd-cryptsetup[1988]: device-mapper: remove ioctl on data-c11  failed: Device or resource busy
Dec 31 18:48:20 hostname_concealed systemd-cryptsetup[1988]: device-mapper: remove ioctl on data-c11  failed: Device or resource busy
Dec 31 18:48:20 hostname_concealed systemd-cryptsetup[1988]: device-mapper: remove ioctl on data-c11  failed: Device or resource busy
Dec 31 18:48:20 hostname_concealed systemd-cryptsetup[1988]: device-mapper: remove ioctl on data-c11  failed: Device or resource busy
Dec 31 18:48:20 hostname_concealed systemd-cryptsetup[1988]: device-mapper: remove ioctl on data-c11  failed: Device or resource busy
Dec 31 18:48:21 hostname_concealed systemd-cryptsetup[1988]: device-mapper: remove ioctl on data-c11  failed: Device or resource busy
Dec 31 18:48:21 hostname_concealed systemd-cryptsetup[1988]: device-mapper: remove ioctl on data-c11  failed: Device or resource busy
Dec 31 18:48:21 hostname_concealed systemd-cryptsetup[1988]: device-mapper: remove ioctl on data-c11  failed: Device or resource busy
Dec 31 18:48:21 hostname_concealed systemd-cryptsetup[1988]: device-mapper: remove ioctl on data-c11  failed: Device or resource busy
Dec 31 18:48:21 hostname_concealed systemd-cryptsetup[1988]: device-mapper: remove ioctl on data-c11  failed: Device or resource busy
Dec 31 18:48:22 hostname_concealed systemd-cryptsetup[1988]: device-mapper: remove ioctl on data-c11  failed: Device or resource busy
Dec 31 18:48:22 hostname_concealed systemd-cryptsetup[1988]: device-mapper: remove ioctl on data-c11  failed: Device or resource busy
Dec 31 18:48:22 hostname_concealed systemd-cryptsetup[1988]: device-mapper: remove ioctl on data-c11  failed: Device or resource busy
Dec 31 18:48:22 hostname_concealed systemd-cryptsetup[1988]: device-mapper: remove ioctl on data-c11  failed: Device or resource busy
Dec 31 18:48:22 hostname_concealed systemd-cryptsetup[1988]: device-mapper: remove ioctl on data-c11  failed: Device or resource busy
Dec 31 18:48:23 hostname_concealed systemd-cryptsetup[1988]: device-mapper: remove ioctl on data-c11  failed: Device or resource busy
Dec 31 18:48:23 hostname_concealed systemd-cryptsetup[1988]: device-mapper: remove ioctl on data-c11  failed: Device or resource busy
Dec 31 18:48:23 hostname_concealed systemd-cryptsetup[1988]: device-mapper: remove ioctl on data-c11  failed: Device or resource busy
Dec 31 18:48:23 hostname_concealed systemd-cryptsetup[1988]: device-mapper: remove ioctl on data-c11  failed: Device or resource busy
Dec 31 18:48:23 hostname_concealed systemd-cryptsetup[1988]: device-mapper: remove ioctl on data-c11  failed: Device or resource busy
Dec 31 18:48:23 hostname_concealed systemd-cryptsetup[1988]: Device data-c11 is still in use.
Dec 31 18:48:23 hostname_concealed systemd-cryptsetup[1988]: Underlying device for crypt device data-c11 disappeared.
Dec 31 18:48:23 hostname_concealed systemd-cryptsetup[1988]: Failed to deactivate: Device or resource busy
Dec 31 18:48:23 hostname_concealed systemd[1]: systemd-cryptsetup@data\x2dc11.service: Control process exited, code=exited, status=1/FAILURE
Dec 31 18:48:23 hostname_concealed systemd[1]: systemd-cryptsetup@data\x2dc11.service: Failed with result 'exit-code'.
Dec 31 18:48:23 hostname_concealed systemd[1]: Stopped Cryptography Setup for data-c11.

Here /mnt/snapshots/data stays mounted.

Reducing complexity by removing encryption layer
I tried the same without the additional complexity of the encryption layer. I created the BTRFS volume directly on the HDDs:
Code: Select all
# lsblk -f
NAME                FSTYPE      LABEL  UUID                                   FSAVAIL FSUSE% MOUNTPOINT
sda
└─sda1              btrfs       data   3f7ee395-f804-4e5e-99cb-2c0941b829e2      3.7T     0% /mnt/snapshots/data
sdb
└─sdb1              btrfs       data   3f7ee395-f804-4e5e-99cb-2c0941b829e2
sdc
└─sdc1              btrfs       data   3f7ee395-f804-4e5e-99cb-2c0941b829e2
nvme0n1
├─nvme0n1p1         vfat               93C2-6713                               505.7M     1% /boot/efi
├─nvme0n1p2         ext2               6a07e2ea-9ab8-4180-a9fd-fd9e043ffa83    170.5M    23% /boot
└─nvme0n1p3         crypto_LUKS        c73f13ea-ef20-4ebf-92d6-dbd0f5cd6d44
  └─nvme0n1p3_crypt LVM2_member        Z2mZtj-1lh2-kxau-v03N-XHcp-MSlJ-DCPtz8
    ├─system-root   btrfs       system 68af359d-8f8c-4b30-a41c-85ff2a9bb01a     93.2G     1% /mnt/snapshots/system
    └─system-swap_1 swap               71ce1c6b-971d-4315-87b9-91ed45224abe                  [SWAP]


The BTRFS volume gets mounted via label, again with option degraded:
Code: Select all
# cat /etc/fstab
# <file system>                                 <mount point>           <type>  <options>                               <dump>  <pass>

# volumes on LVM-volume system-root
/dev/mapper/system-root                         /                       btrfs   defaults,ssd,subvol=@root               0       0
/dev/mapper/system-root                         /mnt/snapshots/system   btrfs   defaults,ssd,subvol=@snapshots          0       0

# volumes on BTRFS-volume data
# /dev/mapper/data-a11                          /var                    btrfs   defaults,degraded,subvol=@var           0       0
# /dev/mapper/data-a11                          /home                   btrfs   defaults,degraded,subvol=@home          0       0
LABEL=data                                      /mnt/snapshots/data     btrfs   defaults,degraded,subvol=@snapshots     0       0
# UUID=7e3fc9ab-d385-4541-8f4b-629f04ebe7c8     /mnt/snapshots/data     btrfs   defaults,degraded,subvol=@snapshots     0       0

# /boot was on /dev/nvme0n1p2 during installation
UUID=6a07e2ea-9ab8-4180-a9fd-fd9e043ffa83       /boot                   ext2    defaults                                0       2

# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=93C2-6713                                  /boot/efi               vfat    umask=0077                              0       1
/dev/mapper/system-swap_1                       none                    swap    sw                                      0       0


Mount again reports the device itself as file system:
Code: Select all
# cat /proc/self/mountinfo | grep /dev/
23 22 0:20 / /dev/pts rw,nosuid,noexec,relatime shared:3 - devpts devpts rw,gid=5,mode=620,ptmxmode=000
25 0 0:22 /@root / rw,relatime shared:1 - btrfs /dev/mapper/system-root rw,ssd,space_cache,subvolid=266,subvol=/@root
27 22 0:25 / /dev/shm rw,nosuid,nodev shared:4 - tmpfs tmpfs rw
46 22 0:18 / /dev/mqueue rw,relatime shared:27 - mqueue mqueue rw
48 22 0:44 / /dev/hugepages rw,relatime shared:29 - hugetlbfs hugetlbfs rw,pagesize=2M
108 25 0:22 /@snapshots /mnt/snapshots/system rw,relatime shared:59 - btrfs /dev/mapper/system-root rw,ssd,space_cache,subvolid=258,subvol=/@snapshots
113 25 259:2 / /boot rw,relatime shared:61 - ext2 /dev/nvme0n1p2 rw
116 113 259:1 / /boot/efi rw,relatime shared:63 - vfat /dev/nvme0n1p1 rw,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro
119 25 0:48 /@snapshots /mnt/snapshots/data rw,relatime shared:65 - btrfs /dev/sda1 rw,degraded,space_cache,subvolid=256,subvol=/@snapshots


Disconnect /dev/sda
Code: Select all
Jan  1 14:20:12 suhren-sv2 kernel: [  482.120376] ata1: SATA link down (SStatus 0 SControl 300)
Jan  1 14:20:18 suhren-sv2 kernel: [  487.504870] ata1: SATA link down (SStatus 0 SControl 300)
Jan  1 14:20:23 suhren-sv2 kernel: [  492.880940] ata1: SATA link down (SStatus 0 SControl 300)
Jan  1 14:20:23 suhren-sv2 kernel: [  492.880951] ata1.00: disabled
Jan  1 14:20:23 suhren-sv2 kernel: [  492.880985] ata1.00: detaching (SCSI 0:0:0:0)
Jan  1 14:20:23 suhren-sv2 kernel: [  492.881693] sd 0:0:0:0: [sda] Stopping disk
Jan  1 14:20:23 suhren-sv2 kernel: [  492.881714] sd 0:0:0:0: [sda] Start/Stop Unit failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
Jan  1 14:20:23 suhren-sv2 systemd[1]: Stopped target Local File Systems.
Jan  1 14:20:23 suhren-sv2 systemd[1]: Unmounting /mnt/snapshots/data...
Jan  1 14:20:23 suhren-sv2 systemd[895]: mnt-snapshots-data.mount: Succeeded.
Jan  1 14:20:23 suhren-sv2 kernel: [  492.924536] BTRFS error (device sda1): bdev /dev/sda1 errs: wr 0, rd 1, flush 0, corrupt 0, gen 0
Jan  1 14:20:23 suhren-sv2 kernel: [  492.924539] BTRFS error (device sda1): bdev /dev/sda1 errs: wr 0, rd 2, flush 0, corrupt 0, gen 0
Jan  1 14:20:23 suhren-sv2 kernel: [  492.924544] BTRFS error (device sda1): bdev /dev/sda1 errs: wr 0, rd 3, flush 0, corrupt 0, gen 0
Jan  1 14:20:23 suhren-sv2 kernel: [  492.924588] BTRFS error (device sda1): bdev /dev/sda1 errs: wr 0, rd 4, flush 0, corrupt 0, gen 0
Jan  1 14:20:23 suhren-sv2 kernel: [  492.924593] BTRFS error (device sda1): bdev /dev/sda1 errs: wr 0, rd 5, flush 0, corrupt 0, gen 0
Jan  1 14:20:23 suhren-sv2 kernel: [  492.924601] BTRFS error (device sda1): bdev /dev/sda1 errs: wr 0, rd 6, flush 0, corrupt 0, gen 0
Jan  1 14:20:23 suhren-sv2 kernel: [  492.924602] BTRFS error (device sda1): bdev /dev/sda1 errs: wr 0, rd 7, flush 0, corrupt 0, gen 0
Jan  1 14:20:23 suhren-sv2 kernel: [  492.924605] BTRFS error (device sda1): bdev /dev/sda1 errs: wr 0, rd 8, flush 0, corrupt 0, gen 0
Jan  1 14:20:23 suhren-sv2 kernel: [  492.924608] BTRFS error (device sda1): bdev /dev/sda1 errs: wr 0, rd 9, flush 0, corrupt 0, gen 0
Jan  1 14:20:23 suhren-sv2 kernel: [  492.924613] BTRFS error (device sda1): bdev /dev/sda1 errs: wr 0, rd 10, flush 0, corrupt 0, gen 0
Jan  1 14:20:24 suhren-sv2 kernel: [  494.025952] BTRFS warning (device sda1): lost page write due to IO error on /dev/sda1
Jan  1 14:20:24 suhren-sv2 kernel: [  494.025962] BTRFS warning (device sda1): lost page write due to IO error on /dev/sda1
Jan  1 14:20:24 suhren-sv2 kernel: [  494.025969] BTRFS warning (device sda1): lost page write due to IO error on /dev/sda1
Jan  1 14:20:24 suhren-sv2 kernel: [  494.026108] BTRFS error (device sda1): error writing primary super block to device 1
Jan  1 14:20:24 suhren-sv2 systemd[1]: mnt-snapshots-data.mount: Succeeded.
Jan  1 14:20:24 suhren-sv2 systemd[1]: Unmounted /mnt/snapshots/data.

Here /mnt/snapshots/data gets unmounted.

Disconnect /dev/sdc
Code: Select all
# tail -n 100 /var/log/syslog
Jan  1 14:09:14 suhren-sv2 kernel: [  266.234210] ata3: SATA link down (SStatus 0 SControl 300)
Jan  1 14:09:20 suhren-sv2 kernel: [  271.794813] ata3: SATA link down (SStatus 0 SControl 300)
Jan  1 14:09:25 suhren-sv2 kernel: [  277.170836] ata3: SATA link down (SStatus 0 SControl 300)
Jan  1 14:09:25 suhren-sv2 kernel: [  277.170861] ata3.00: disabled
Jan  1 14:09:25 suhren-sv2 kernel: [  277.170900] ata3.00: detaching (SCSI 2:0:0:0)
Jan  1 14:09:25 suhren-sv2 kernel: [  277.171539] sd 2:0:0:0: [sdc] Synchronizing SCSI cache
Jan  1 14:09:25 suhren-sv2 kernel: [  277.171571] sd 2:0:0:0: [sdc] Synchronize Cache(10) failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
Jan  1 14:09:25 suhren-sv2 kernel: [  277.171573] sd 2:0:0:0: [sdc] Stopping disk
Jan  1 14:09:25 suhren-sv2 kernel: [  277.171578] sd 2:0:0:0: [sdc] Start/Stop Unit failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
Jan  1 14:10:39 suhren-sv2 kernel: [  350.600411] BTRFS error (device sda1): bdev /dev/sdc1 errs: wr 1, rd 0, flush 0, corrupt 0, gen 0
Jan  1 14:10:39 suhren-sv2 kernel: [  350.600502] BTRFS error (device sda1): bdev /dev/sdc1 errs: wr 2, rd 0, flush 0, corrupt 0, gen 0
Jan  1 14:10:39 suhren-sv2 kernel: [  350.600575] BTRFS error (device sda1): bdev /dev/sdc1 errs: wr 3, rd 0, flush 0, corrupt 0, gen 0
Jan  1 14:10:39 suhren-sv2 kernel: [  350.600658] BTRFS error (device sda1): bdev /dev/sdc1 errs: wr 4, rd 0, flush 0, corrupt 0, gen 0
Jan  1 14:10:39 suhren-sv2 kernel: [  350.610032] BTRFS error (device sda1): bdev /dev/sdc1 errs: wr 4, rd 0, flush 1, corrupt 0, gen 0
Jan  1 14:10:39 suhren-sv2 kernel: [  350.610219] BTRFS warning (device sda1): lost page write due to IO error on /dev/sdc1
Jan  1 14:10:39 suhren-sv2 kernel: [  350.610222] BTRFS error (device sda1): bdev /dev/sdc1 errs: wr 5, rd 0, flush 1, corrupt 0, gen 0
Jan  1 14:10:39 suhren-sv2 kernel: [  350.610290] BTRFS warning (device sda1): lost page write due to IO error on /dev/sdc1
Jan  1 14:10:39 suhren-sv2 kernel: [  350.610292] BTRFS error (device sda1): bdev /dev/sdc1 errs: wr 6, rd 0, flush 1, corrupt 0, gen 0
Jan  1 14:10:39 suhren-sv2 kernel: [  350.610357] BTRFS warning (device sda1): lost page write due to IO error on /dev/sdc1
Jan  1 14:10:39 suhren-sv2 kernel: [  350.610359] BTRFS error (device sda1): bdev /dev/sdc1 errs: wr 7, rd 0, flush 1, corrupt 0, gen 0
Jan  1 14:10:39 suhren-sv2 kernel: [  350.645655] BTRFS error (device sda1): error writing primary super block to device 3

Here /mnt/snapshots/data stays mounted.

I didn't find a topic like this here in the forum, mentioned on https://wiki.debian.org/Btrfs, https://btrfs.wiki.kernel.org/index.php ... le_Devices, https://btrfs.wiki.kernel.org/index.php/Gotchas or via Google.

Sorry for the long post, but I hope every necessary information is included. Thanks in advance for any help with this!
Vanadar
 
Posts: 1
Joined: 2021-01-01 13:09

Return to General Questions

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable