I have a 2 TB external hard drive that I recently formatted with UFS. It worked fine for a while, but today when I plugged in, I couldn't read it anymore. It showed up in Caja as an external drive named after a GUID, but when I click on it it says: "Unable to mount 7c...-...-...-... Mount: failed with mount: /dev/da0p1: Operation not permitted"
If I try to list out the contents from a terminal, this is what I get:
ls -la /media
total 10
drwxr-xr-x 3 root wheel 3 Apr 13 23:27 ./
drwxr-xr-x 22 root wheel 27 Apr 14 00:38 ../
drwxrwxr-x 2 root wheel 2 Apr 13 23:27 da0p1/
ls -la /media/da0p1
total 1
drwxrwxr-x 2 root wheel 2 Apr 13 23:27 ./
drwxr-xr-x 3 root wheel 3 Apr 13 23:27 ../
It looks empty. Then I try to mount it from the command line with sudo:
sudo mount /dev/da0p1 /mnt
mount: /dev/da0p1: Operation not permitted
Then I try to unmount it:
sudo umount /dev/da0p1
umount: /dev/da0p1: unknown file system
sudo umount /media/da0p1
umount: /media/da0p1: not a file system root directory
I tried fsck as well, but it just hangs, or at least I didn't wait for longer than a few minutes and I saw no indication that there was any progress happening:
sudo fsck /dev/da0p1
** /dev/da0p1
** Last Mounted on /media/da0p1
** Phase 1 - Check Blocks and Sizes
The external hard drive's lamp is continuously blinking, and it's making those characteristic quiet "spark noises" that you usually hear when it is actively being used. Ideally the lamp shouldn't be blinking and it shouldn't make spark noises.
Some other commands I tried to diagnose the problem:
camcontrol devlist
<Samsung SSD 860 EVO 500GB RVT04B6Q> at scbus0 target 0 lun 0 (pass0,ada0)
<HL-DT-ST DVD+-RW GS40N A100> at scbus1 target 0 lun 0 (pass1,cd0)
<AHCI SGPIO Enclosure 2.00 0001> at scbus4 target 0 lun 0 (ses0,pass2)
<Seagate Expansion HDD 1901> at scbus5 target 0 lun 0 (da0,pass3)
geom disk list
Geom name: ada0
Providers:
1. Name: ada0
Mediasize: 500107862016 (466G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r2w2e4
descr: Samsung SSD 860 EVO 500GB
lunid: 5002538e9017cc94
ident: S4XBNF0N175682N
rotationrate: 0
fwsectors: 63
fwheads: 16
Geom name: cd0
Providers:
1. Name: cd0
Mediasize: 0 (0B)
Sectorsize: 2048
Mode: r0w0e0
descr: HL-DT-ST DVD+-RW GS40N
ident: (null)
rotationrate: unknown
fwsectors: 0
fwheads: 0
Geom name: da0
Providers:
1. Name: da0
Mediasize: 2000398933504 (1.8T)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e1
descr: Seagate Expansion HDD
lunname: NACRZX2K
lunid: 3e4143525a58324b
ident: 00000000NACRZX2K
rotationrate: unknown
fwsectors: 63
fwheads: 255
gpart status
Name Status Components
ada0p1 OK ada0
ada0p2 OK ada0
ada0p3 OK ada0
da0p1 OK da0
gpart show -lp
=> 40 976773088 ada0 GPT (466G)
40 532480 ada0p1 (null) (260M)
532520 971325440 ada0p2 (null) (463G)
971857960 4904960 ada0p3 (null) (2.3G)
976762920 10208 - free - (5.0M)
=> 40 3907029088 da0 GPT (1.8T)
40 3907029088 da0p1 (null) (1.8T)
I'm confused because the OS can see the drive, it even knows that it has GPT and how big it is, but it can't read it. And yet, I can literally hear the hard drive's noises, so it must be doing something. When I read /var/log/messages
I can see that it sees the external drive being connected:
Apr 13 23:27:42 frantic-ghostbsd kernel: usb_msc_auto_quirk: UQ_MSC_NO_GETMAXLUN set for USB mass storage device Seagate Expansion HDD (0x0bc2:0x2036)
Apr 13 23:27:44 frantic-ghostbsd kernel: usb_msc_auto_quirk: UQ_MSC_NO_SYNC_CACHE set for USB mass storage device Seagate Expansion HDD (0x0bc2:0x2036)
Apr 13 23:27:44 frantic-ghostbsd kernel: usb_msc_auto_quirk: UQ_MSC_NO_PREVENT_ALLOW set for USB mass storage device Seagate Expansion HDD (0x0bc2:0x2036)
Apr 13 23:27:44 frantic-ghostbsd kernel: usb_msc_auto_quirk: UQ_MSC_NO_TEST_UNIT_READY set for USB mass storage device Seagate Expansion HDD (0x0bc2:0x2036)
Apr 13 23:27:44 frantic-ghostbsd kernel: usb_msc_auto_quirk: UQ_MSC_NO_START_STOP set for USB mass storage device Seagate Expansion HDD (0x0bc2:0x2036)
Apr 13 23:27:44 frantic-ghostbsd kernel: ugen0.7: <Seagate Expansion HDD> at usbus0
Apr 13 23:27:44 frantic-ghostbsd kernel: umass0 on uhub0
Apr 13 23:27:44 frantic-ghostbsd kernel: umass0: <Seagate Expansion HDD, class 0/0, rev 3.20/19.01, addr 10> on usbus0
Apr 13 23:27:44 frantic-ghostbsd kernel: umass0: SCSI over Bulk-Only; quirks = 0xc105
Apr 13 23:27:44 frantic-ghostbsd kernel: umass0:5:0: Attached to scbus5
Apr 13 23:27:45 frantic-ghostbsd kernel: da0 at umass-sim0 bus 0 scbus5 target 0 lun 0
Apr 13 23:27:45 frantic-ghostbsd kernel: da0: <Seagate Expansion HDD 1901> Fixed Direct Access SPC-4 SCSI device
Apr 13 23:27:45 frantic-ghostbsd kernel: da0: Serial Number 00000000NACRZX2K
Apr 13 23:27:45 frantic-ghostbsd kernel: da0: 400.000MB/s transfers
Apr 13 23:27:45 frantic-ghostbsd kernel: da0: 1907729MB (3907029167 512 byte sectors)
Apr 13 23:27:45 frantic-ghostbsd kernel: da0: quirks=0x2<NO_6_BYTE>
Then when I unplug it, it tries to find it at least a 1000 times:
Apr 13 23:39:29 frantic-ghostbsd kernel: ugen0.7: <Seagate Expansion HDD> at usbus0 (disconnected)
Apr 13 23:39:29 frantic-ghostbsd kernel: umass0: at uhub0, port 16, addr 10 (disconnected)
Apr 13 23:39:29 frantic-ghostbsd kernel: (da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 dd 85 f2 a8 00 00 40 00
Apr 13 23:39:29 frantic-ghostbsd kernel: (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
Apr 13 23:39:29 frantic-ghostbsd kernel: (da0:umass-sim0:0:0:0): Retrying command, 3 more tries remain
Apr 13 23:39:29 frantic-ghostbsd kernel: (da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 dd 85 f2 a8 00 00 40 00
Apr 13 23:39:29 frantic-ghostbsd kernel: (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
Apr 13 23:39:29 frantic-ghostbsd kernel: (da0:umass-sim0:0:0:0): Retrying command, 2 more tries remain
Apr 13 23:39:29 frantic-ghostbsd kernel: (da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 dd 85 f2 a8 00 00 40 00
Apr 13 23:39:29 frantic-ghostbsd kernel: (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
Apr 13 23:39:29 frantic-ghostbsd kernel: (da0:umass-sim0:0:0:0): Retrying command, 1 more tries remain
...
...
Apr 13 23:39:29 frantic-ghostbsd kernel: da0 at umass-sim0 bus 0 scbus5 target 0 lun 0
Apr 13 23:39:29 frantic-ghostbsd kernel: da0: <Seagate Expansion HDD 1901> s/n 00000000NACRZX2K detached
Apr 13 23:39:29 frantic-ghostbsd kernel: (da0:umass-sim0:0:0:0): Periph destroyed
Apr 13 23:39:29 frantic-ghostbsd kernel: umass0: detached
Apr 13 23:42:22 frantic-ghostbsd kernel: pid 83930 (fsck_ufs), jid 0, uid 0: exited on signal 11 (core dumped)
After I unplug the device, the CPU spins up like crazy. There are these suspicious processes in htop:

I have to manually kill the automount
process. Does somebody please have an idea why it's suddenly not working? It worked yesterday, and I didn't do anything to it. I have decades of my life on this hard drive, and I really don't want to lose it.
PS: When I plug the external hard drive into another machine that has FreeBSD on it, it can be mounted correctly and I can use it. So it seems that my current GhostBSD installation has something on it that causes the external drive no longer to be mountable on it.