Skip to contentSkip to conversation

Cannot mount hm-smr drive with btrfs

DISCUSSION Aleksey Utkin 3 participants 3 messages Jul 30, 2021 – Aug 9, 2021 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Hello.

I had a problem with the mounting of the BTRFS file system.

Test case description:

1. Operation: Creating btrfs: sudo mkfs.btrfs -O zoned -d single -m single -f /dev/sdb
Result: The file system was created successfully

2. Operation: Mount new btrfs: sudo mount /dev/sdb /mnt/sdb
Result: Mounted successfully

3. Operation: Filling a file system data system (copy using MC)
Result: Filling a file system data has passed successfully, the data has passed integrity control

4. Operation: Umount file system: sudo umount /mnt/sdb/
Result: Umounted successfully

5. Operation: Mount btrfs: sudo mount /dev/sdb /mnt/sdb
Result: Mounted successfully

6. Operation: rebooted the host with mounted file system BTRFS
Result: Reboot successfully

7. Operation: Checking the btrfs file system: sudo btrfs check /dev/sdb
Result: successfully, console output:
Opening filesystem to check...
Checking filesystem on /dev/sdb
UUID: 4312bf2a-376d-4a44-a69a-6bb112b124f6
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space cache
[4/7] checking fs roots
[5/7] checking only csums items (without verifying data) [6/7] checking root refs
[7/7] checking quota groups skipped (not enabled on this FS) found 17978056441856 bytes used, no error found
total csum bytes: 17534343280
total tree bytes: 22888923136
total fs tree bytes: 2191491072
total extent tree bytes: 2166554624
btree space waste bytes: 990047274
file data blocks allocated: 17955167518720
 referenced 17955167518720

8. Operation: Attempt to mount 1: sudo mount /dev/sdb /mnt/sdb
Result: Mounted unsuccessful,
Console output: mount: /mnt/sdb: wrong fs type, bad option, bad superblock on /dev/sdb, missing codepage or helper program, or other error.

9. Operation: Attempt to mount 2: sudo mount -t btrfs /dev/sdb /mnt/sdb
Result: unsuccessful, no messages, the HDD activity LED is glow, the console frozen, ^C does not interrupt the mount operation, the sudo reboot is not performed, the restart of Alt+PRTSCR+B is performed.

Version of the kernel:

$ uname -a
Linux x79zd3 5.14.0-051400rc2-generic #202107182230 SMP Sun Jul 18 22:34:12 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ btrfs --version
btrfs-progs v5.13
from https://github.com/kdave/btrfs-progs
$ btrfs fi show
nothing output
$ btrfs fi df /mnt/sdb
ERROR: not a btrfs filesystem: /mnt/sdb

Device:

$ sudo smartctl -i /dev/sdb
smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.14.0-051400rc2-generic] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     ST18000NM009J-2UW101
Serial Number:    ZL2BH53L
LU WWN Device Id: 5 000c50 0c812bf64
Firmware Version: SE01
User Capacity:    18 000 207 937 536 bytes [18,0 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        Not in smartctl database [for details use: -P showall] ATA Version is:   ACS-4 (minor revision not indicated)
SATA Version is:  SATA 3.3, 6.0 Gb/s (current: 3.0 Gb/s) Local Time is:    Fri Jul 30 14:47:33 2021 MSK
SMART support is: Available - device has SMART capability. SMART support is: Enabled

# nc cwillu.com 10101 < /dev/kmsg
after operations 6,7,8,9 - http://cwillu.com:8080/128.0.141.47/2
$ sudo dmesg | nc termbin.com 9999
https://termbin.com/6g54

Best regards,
Aleksey Utkin

#1 lore raw
Quoted 58 lines · Aleksey Utkin

Hello.

I had a problem with the mounting of the BTRFS file system.

Test case description:

1. Operation: Creating btrfs: sudo mkfs.btrfs -O zoned -d single -m single -f /dev/sdb
Result: The file system was created successfully

2. Operation: Mount new btrfs: sudo mount /dev/sdb /mnt/sdb
Result: Mounted successfully

3. Operation: Filling a file system data system (copy using MC)
Result: Filling a file system data has passed successfully, the data has passed integrity control

4. Operation: Umount file system: sudo umount /mnt/sdb/
Result: Umounted successfully

5. Operation: Mount btrfs: sudo mount /dev/sdb /mnt/sdb
Result: Mounted successfully

6. Operation: rebooted the host with mounted file system BTRFS
Result: Reboot successfully

7. Operation: Checking the btrfs file system: sudo btrfs check /dev/sdb
Result: successfully, console output:
Opening filesystem to check...
Checking filesystem on /dev/sdb
UUID: 4312bf2a-376d-4a44-a69a-6bb112b124f6
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space cache
[4/7] checking fs roots
[5/7] checking only csums items (without verifying data) [6/7] checking root refs
[7/7] checking quota groups skipped (not enabled on this FS) found 17978056441856 bytes used, no error found
total csum bytes: 17534343280
total tree bytes: 22888923136
total fs tree bytes: 2191491072
total extent tree bytes: 2166554624
btree space waste bytes: 990047274
file data blocks allocated: 17955167518720
 referenced 17955167518720

8. Operation: Attempt to mount 1: sudo mount /dev/sdb /mnt/sdb
Result: Mounted unsuccessful,
Console output: mount: /mnt/sdb: wrong fs type, bad option, bad superblock on /dev/sdb, missing codepage or helper program, or other error.

9. Operation: Attempt to mount 2: sudo mount -t btrfs /dev/sdb /mnt/sdb
Result: unsuccessful, no messages, the HDD activity LED is glow, the console frozen, ^C does not interrupt the mount operation, the sudo reboot is not performed, the restart of Alt+PRTSCR+B is performed.

Quoted 8 lines

Version of the kernel:

$ uname -a
Linux x79zd3 5.14.0-051400rc2-generic #202107182230 SMP Sun Jul 18 
22:34:12 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ btrfs --version
btrfs-progs v5.13
from https://github.com/kdave/btrfs-progs

Did you also install the latest libblkid from util-linux tree ? There are modifications to it for zoned btrfs to find the super block. These modifications are not yet in any tagged version of libblkid but they are in the master branch of the util-linux tree upstream.

Quoted 42 lines
$ btrfs fi show
nothing output
$ btrfs fi df /mnt/sdb
ERROR: not a btrfs filesystem: /mnt/sdb

Device:

$ sudo smartctl -i /dev/sdb
smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.14.0-051400rc2-generic] 
(local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     ST18000NM009J-2UW101
Serial Number:    ZL2BH53L
LU WWN Device Id: 5 000c50 0c812bf64
Firmware Version: SE01
User Capacity:    18 000 207 937 536 bytes [18,0 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        Not in smartctl database [for details use: -P showall] ATA Version is:   ACS-4 (minor revision not indicated)
SATA Version is:  SATA 3.3, 6.0 Gb/s (current: 3.0 Gb/s) Local Time is:    Fri Jul 30 14:47:33 2021 MSK
SMART support is: Available - device has SMART capability. SMART support is: Enabled

# nc cwillu.com 10101 < /dev/kmsg
after operations 6,7,8,9 - http://cwillu.com:8080/128.0.141.47/2
$ sudo dmesg | nc termbin.com 9999
https://termbin.com/6g54

Best regards,
Aleksey Utkin

Signature · 2 lines
Damien Le Moal
Western Digital Research
#2 lore raw
In reply to Aleksey Utkin

Sorry for replying so late, the mail must have slipped through the cracks while I was on vacation.

Quoted 4 lines · Aleksey Utkin

8. Operation: Attempt to mount 1: sudo mount /dev/sdb /mnt/sdb
Result: Mounted unsuccessful,
Console output: mount: /mnt/sdb: wrong fs type, bad option, bad superblock on /dev/sdb, missing codepage or helper program, or other error.

This sounds like an old libblkid.

Quoted 4 lines

9. Operation: Attempt to mount 2: sudo mount -t btrfs /dev/sdb /mnt/sdb
Result: unsuccessful, no messages, the HDD activity LED is glow, the console frozen, ^C does not interrupt the mount operation, the sudo reboot is not performed, the restart of Alt+PRTSCR+B is performed.

This OTOH should have worked. But looking at the dmesg output from [1] it looks like it did work:

[ 1054.626456] Btrfs loaded, crc32c=crc32c-intel, zoned=yes
[ 1054.705975] BTRFS: device fsid 4312bf2a-376d-4a44-a69a-6bb112b124f6 devid 1 transid 4672 /dev/sdb scanned by mount (1926)
[ 1054.855944] BTRFS info (device sdb): has skinny extents
[ 1055.315175] BTRFS info (device sdb): host-managed zoned block device /dev/sdb, 67056 zones of 268435456 bytes
[ 1057.219336] BTRFS info (device sdb): zoned mode enabled with zone size 268435456

So I'm not really sure what happened here.

[1] https://termbin.com/6g54