문제가 있는(btrfs?) 디스크를 마운트하는 방법은 무엇입니까?

문제가 있는(btrfs?) 디스크를 마운트하는 방법은 무엇입니까?

오래된 하드 드라이브가 있는데 그 내용을 확인하고 싶습니다. 이전에는 BTRFS raid1 설정의 일부였지만 이제는 더 큰 드라이브로 교체되었을 수 있습니다.

USB 어댑터와 연결하면 다음과 같은 결과가 나타납니다.

usb 7-2: new high-speed USB device number 27 using xhci_hcd
usb 7-2: New USB device found, idVendor=13fd, idProduct=0840
usb 7-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 7-2: Product: External
usb 7-2: Manufacturer: Generic
usb 7-2: SerialNumber: 57442D5743414E5532323536
usb-storage 7-2:1.0: USB Mass Storage device detected
scsi host16: usb-storage 7-2:1.0
checking bus 7, device 27: "/sys/devices/pci0000:00/0000:00:15.2/0000:05:00.0/usb7/7-2"
bus: 7, device: 27 was not an MTP device
scsi 16:0:0:0: Direct-Access     Generic  External         1.14 PQ: 0 ANSI: 4
sd 16:0:0:0: Attached scsi generic sg5 type 0
sd 16:0:0:0: [sdf] 976773167 512-byte logical blocks: (500 GB/465 GiB)
sd 16:0:0:0: [sdf] Write Protect is off
sd 16:0:0:0: [sdf] Mode Sense: 23 00 00 00
sd 16:0:0:0: [sdf] No Caching mode page found
sd 16:0:0:0: [sdf] Assuming drive cache: write through
sd 16:0:0:0: [sdf] Attached SCSI disk

그리고

fdisk -l
Disk /dev/sdf: 465,8 GiB, 500107861504 bytes, 976773167 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

여태까지는 그런대로 잘됐다. 여기에 파티션이 없기 때문에 btrfs 습격의 일부라고 생각됩니다.

이제 문제가 시작됩니다.

# btrfs device scan
Scanning for Btrfs filesystems
ERROR: device scan failed '/dev/sdf' - Device or resource busy
ERROR: error -16 while registering

-16이 무엇을 의미하는지 이해하지 못합니다. Google이나 btrfs 소스 파일의 grep 모두 나에게 힌트를 주지 않았습니다.

설치해 봅시다:

# mount -o degraded /dev/sdf btrfs_test/
mount: /dev/sdf is already mounted or /tmp/btrfs_test busy

이상하네요 어디에 설치되어 있나요?

# mount | grep sdf
# lsof | grep sdf
# lsof | grep btrfs_test
# fuser -vm /dev/sdf
# grep /tmp/btrfs_test /proc/mounts
# findmnt | grep sdf
# ls -l /sys/block/sdf/holders/
total 0

어떤 명령에서도 출력이 없으며 ls의 개수는 0이 될 것으로 예상됩니다.

답변1

이 디스크는 실제로 원래 레이드의 일부였던 것으로 밝혀졌습니다.

아직 RAID의 일부인 다른 디스크가 마운트되어 있기 때문에 btrfs는 혼동을 느끼고 해당 RAID가 이미 마운트되어 있기 때문에 디스크가 이미 마운트되어 있다고 생각합니다.

관련 정보