0

I'm trying to read (not write) the content of a HFS+ drive based on this post. It is automatically displayed in the file manager, but I'm unable to explore the drive. There is conflicting information as to whether it's mounted or not.

I have another problem that hinders my ability to experiment: eject is not responding, so what I do is unplug/replug the USB connector. But then it is not listed by lsblk and shows as 'No media' in gnome-disk-utility. The only way to get it mounted again, that I've been able to come up with, is to reboot. That is obviously tedious, so what could I do instead?

Just after reboot:

$ lsblk
NAME                MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                   8:0    0 298.1G  0 disk  
├─sda1                8:1    0   512M  0 part  /boot/efi
├─sda2                8:2    0     1K  0 part  
├─sda5                8:5    0   731M  0 part  /boot
└─sda6                8:6    0 296.9G  0 part  
  └─sda6_crypt      253:0    0 296.9G  0 crypt 
    ├─vgmint-root   253:1    0 295.9G  0 lvm   /
    └─vgmint-swap_1 253:2    0   976M  0 lvm   [SWAP]
sdb                   8:16   0 232.9G  0 disk  
├─sdb1                8:17   0   200M  0 part  
├─sdb2                8:18   0 232.1G  0 part  
└─sdb3                8:19   0 619.9M  0 part  

enter image description here enter image description here

After disconnect/connect

$ lsblk
NAME                MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                   8:0    0 298.1G  0 disk  
├─sda1                8:1    0   512M  0 part  /boot/efi
├─sda2                8:2    0     1K  0 part  
├─sda5                8:5    0   731M  0 part  /boot
└─sda6                8:6    0 296.9G  0 part  
  └─sda6_crypt      253:0    0 296.9G  0 crypt 
    ├─vgmint-root   253:1    0 295.9G  0 lvm   /
    └─vgmint-swap_1 253:2    0   976M  0 lvm   [SWAP]

enter image description here

Other

I think El Capitan was the last OS on the Mac with which this drive was formatted so I think this rules out APFS.

$ apt list -a hfsprogs
Listing... Done
hfsprogs/focal,now 332.25-11build1 amd64 [installed]

This command hangs indefinitely:

$ sudo fsck.hfsplus -f /dev/sdb
[sudo] password:  
** /dev/sdb

$ dmesg
[  853.373536] usb 3-2.2: New USB device found, idVendor=174c, idProduct=225c, bcdDevice= 0.01
[  853.373542] usb 3-2.2: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[  853.373546] usb 3-2.2: Product: AS2235
[  853.373549] usb 3-2.2: Manufacturer: ASMedia
[  853.373553] usb 3-2.2: SerialNumber: 00000000000000000000
[  853.452921] usb-storage 3-2.2:1.0: USB Mass Storage device detected
[  853.453556] scsi host6: usb-storage 3-2.2:1.0
[  853.453728] usbcore: registered new interface driver usb-storage
[  853.475165] usbcore: registered new interface driver uas
[  854.465134] scsi 6:0:0:0: Direct-Access     ASMT     2235             0    PQ: 0 ANSI: 6
[  854.466208] sd 6:0:0:0: Attached scsi generic sg1 type 0
[  854.467472] sd 6:0:0:0: [sdb] 488397168 512-byte logical blocks: (250 GB/233 GiB)
[  854.468359] sd 6:0:0:0: [sdb] Write Protect is off
[  854.468368] sd 6:0:0:0: [sdb] Mode Sense: 43 00 00 00
[  854.468938] sd 6:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[  854.529233]  sdb: sdb1 sdb2 sdb3
[  854.559294] sd 6:0:0:0: [sdb] Attached SCSI disk
[  898.271130] usb 3-2.2: reset high-speed USB device number 4 using xhci_hcd
[ 1052.032857] sd 6:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 1052.032865] sd 6:0:0:0: [sdb] tag#0 Sense Key : Not Ready [current] 
[ 1052.032870] sd 6:0:0:0: [sdb] tag#0 Add. Sense: Logical unit is in process of becoming ready
[ 1052.032876] sd 6:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 00 06 40 2a 00 00 01 00
[ 1052.032884] blk_update_request: I/O error, dev sdb, sector 409642 op 0x0:(READ) flags 0x800 phys_seg 1 prio class 0
[ 1052.032964] hfsplus: unable to find HFS+ superblock
[ 1314.406829] sd 6:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 1314.406838] sd 6:0:0:0: [sdb] tag#0 Sense Key : Not Ready [current] 
[ 1314.406843] sd 6:0:0:0: [sdb] tag#0 Add. Sense: Logical unit is in process of becoming ready
[ 1314.406850] sd 6:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 00 06 40 2a 00 00 01 00
[ 1314.406858] blk_update_request: I/O error, dev sdb, sector 409642 op 0x0:(READ) flags 0x800 phys_seg 1 prio class 0
[ 1314.406934] hfsplus: unable to find HFS+ superblock
[ 1524.675415] sd 6:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 1524.675418] sd 6:0:0:0: [sdb] tag#0 Sense Key : Not Ready [current] 
[ 1524.675420] sd 6:0:0:0: [sdb] tag#0 Add. Sense: Logical unit is in process of becoming ready
[ 1524.675422] sd 6:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 00 06 40 2a 00 00 01 00
[ 1524.675425] blk_update_request: I/O error, dev sdb, sector 409642 op 0x0:(READ) flags 0x800 phys_seg 1 prio class 0
[ 1524.675442] hfsplus: unable to find HFS+ superblock
[ 6405.037621] INFO: task pool-udisksd:6187 blocked for more than 120 seconds.
$ sudo smartctl -a -s on --tolerance=verypermissive /dev/sdc
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-122-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

Read Device Identity failed: scsi error device will be ready soon

=== START OF INFORMATION SECTION === Device Model: [No Information Found] Serial Number: [No Information Found] Firmware Version: [No Information Found] Device is: Not in smartctl database [for details use: -P showall] ATA Version is: [No Information Found] Local Time is: Wed Jul 13 19:38:05 2022 EDT SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 82-83 don't show if SMART supported. SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 85-87 don't show if SMART is enabled. Checking to be sure by trying SMART RETURN STATUS command. SMART support is: Unknown - Try option -s with argument 'on' to enable it. === START OF ENABLE/DISABLE COMMANDS SECTION === SMART Enable failed: scsi error device will be ready soon

Read SMART Data failed: scsi error device will be ready soon

=== START OF READ SMART DATA SECTION === SMART Status command failed: scsi error device will be ready soon SMART overall-health self-assessment test result: UNKNOWN! SMART Status, Attributes and Thresholds cannot be read.

Read SMART Error Log failed: scsi error device will be ready soon

Read SMART Self-test Log failed: scsi error device will be ready soon

Selective Self-tests/Logging not supported

Erwann
  • 125
  • Would be nice to understand better what that freezing means... you may see something in syslog. And for the reconnect, it is also strange,,, try partprobe it may detect the partitions on the USB drive. – redseven Jul 12 '22 at 18:48
  • @Nmath "Can you be more specific about why you cannot explore the file system? " Clicking on the drive does nothing. But to be sure, I need to be able to mount it again, and the point of this post is, I don't know how to do that without rebooting. – Erwann Jul 12 '22 at 18:55
  • @redseven "see something in syslog." could you be more specific? – Erwann Jul 12 '22 at 18:58
  • @Nmath just after a reboot, by connecting the drive, the file manager lists it under 'devices', together with two files (see screenshot). And that is consistent with what lsblk returns (see snippet) and what gnome-disk-utility displays. If I try to open the drive from the FM, no response. Mount? Error message (screenshot). – Erwann Jul 12 '22 at 19:55
  • I've been assuming that you've tried the answers on the question you linked here. Are you certain that you have the hfsprogs package installed? Did you run fsck on the disk as indicated in that answer? And are you certain that the file system is uncorrupted? What happens when you plug it into a Mac? Are you even sure that the file system is HFS+ and not another apple proprietary file system like APFS? – Nmath Jul 12 '22 at 20:08
  • @NMath, yes hfsprogs is installed. fsck.hfsplus is supposed to come after unmounting, but the drive is not responding: no open, no clean eject. I would I be certain it's not corrupted? It worked before I removed from the machine. El Capitan was the last OS. lsblk shows no mounting point. "What happens when you plug it into a Mac?" That's specified in the original post. – Erwann Jul 12 '22 at 21:14
  • I'm missing where you describe what happens when you try to use a Mac except what you just added explaining the last time you used it was on El Capitan. Has it been a long time since you last used it? Could the drive have been damaged between now and then? Unfortunately, Apple uses proprietary file systems that are notoriously and deliberately incompatible with other operating systems. APFS in particular is a major "PITA" to get properly mounted on other operating systems and essentially requires you to manually find the exact location of partitions down to the byte. – Nmath Jul 12 '22 at 21:41
  • @Erwann fsck.hfsplus checks the filesystem for errors and corruption. you don't need to have cleanly unmounted the filesystem in order to run it (in fact, usually you would run fsck.hfsplus because you didn't cleanly unmount it, like in this case - you've potentially pulled the drive out in the middle of it doing something). can you post the output of dmesg? if it's too long, which it probably will be, just post a solid chunk of the end of it. – strugee Jul 12 '22 at 21:42
  • @strugee I updated the initial post based on your comment. – Erwann Jul 12 '22 at 22:04
  • 2
    [ 1052.032884] blk_update_request: I/O error, dev sdb, sector 409642 op 0x0:(READ) flags 0x800 phys_seg 1 prio class 0 This looks like a HW problem to me. If you are lucky it's not the disk, but the USB connection. Try another USB port and/or another cable. – redseven Jul 13 '22 at 08:32
  • @redseven HW? In any case, thanks. This is for a repair shop to look into. – Erwann Jul 13 '22 at 09:18

2 Answers2

0

Try this:

Plug in the external HDD

Unmount the drive

Run:

 sudo apt update

sudo apt install hfsprogs

sudo fsck.hfsplus -f /dev/sdb2

Remount the drive

The drive is now read-write.

kyodake
  • 15,401
  • "Unmount the drive" I've already stated that although the drive does show in the file manager, just after reboot and until I disconnect the USB, all actions on it are non responding. That includes unmounting. Also, hfsprogs version is listed in my post. If I first unplug/plug the drive and exec. the third command, I get "Can't stat /dev/sdb2: No such file or directory". – Erwann Jul 13 '22 at 02:15
  • Have you tried partprobe after reconnecting? – redseven Jul 13 '22 at 08:30
  • @redseven partprobe hangs. Meanwhile the filemanager pops two windows: 1) Error when getting information for "/media/user/Macintosh HD/.file":Input/output error 2) Error opening "/media/user/Macintosh HD": Permission denied. – Erwann Jul 13 '22 at 09:50
0

As @redseven points out in the comments of the answer, here's the important bit of your dmesg output:

[ 7619.684210] blk_update_request: I/O error, dev sdb, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 7619.684222] Buffer I/O error on dev sdb, logical block 0, async page read

This likely indicates some sort of hardware failure. I would run a S.M.A.R.T. disk self-check on the drive. You can do this either with the smartctl command line utility (smartctl --help for the available options) or using a graphical utility. I recommend GSmartControl, but just because that's what I'm familiar with and it's pretty reasonable - if you find another tool you like better, feel free to use it.

I would first run a full offline check and check the overall health results. Then check for the attributes in this table, highlighted in red: https://en.wikipedia.org/wiki/S.M.A.R.T.#ATA_S.M.A.R.T._attributes

High levels of those values (as of July 2022) indicate impending drive failure.

strugee
  • 1,092