Other Cannot remount external (USB) HDD

Hi.
I built a FreeBSD system and attached an external USB harddrive and put a bunch of data that I was working with onto it. I needed to re-purpose the system, so I disconnected the USB cable, installed another OS, and did what I needed to get done.
Now, I've reinstalled FreeBSD, and re-attached the USB drive. But, I've been completely unable to mount the drive again.
pkg update and pkg upgrade say I'm up to date.

# dmesg | grep USB gives:
usb_msc_auto_quirk: UQ_MSC_NO_TEST_UNIT_READY set for USB mass storage device UnionSine USB3.2 UnionSine USB3.2 (0x152d:0x0580)
usb_msc_auto_quirk: UQ_MSC_NO_START_STOP set for USB mass storage device UnionSine USB3.2 UnionSine USB3.2 (0x152d:0x0580)
ugen0.2: <UnionSine USB3.2 UnionSine USB3.2> at usbus0
umass0: <UnionSine USB3.2 UnionSine USB3.2, class 0/0, rev 3.20/1.03, addr 1> on usbus0
da0: < UnionSine USB3.2 0103> Fixed Direct Access SPC-4 SCSI device

$ sudo gpart list
Geom name: ada0
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 250069639
first: 40
entries: 128
scheme: GPT
Providers:
1. Name: ada0p1
Mediasize: 272629760 (260M)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 20480
Mode: r1w1e2
efimedia: HD(1,GPT,6bbb0490-8b05-11ef-8520-c8d3ff9a8934,0x28,0x82000)
rawuuid: 6bbb0490-8b05-11ef-8520-c8d3ff9a8934
rawtype: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
label: efiboot0
length: 272629760
offset: 20480
type: efi
index: 1
end: 532519
start: 40
2. Name: ada0p2
Mediasize: 524288 (512K)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 272650240
Mode: r0w0e0
efimedia: HD(2,GPT,6bea31ad-8b05-11ef-8520-c8d3ff9a8934,0x82028,0x400)
rawuuid: 6bea31ad-8b05-11ef-8520-c8d3ff9a8934
rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f
label: gptboot0
length: 524288
offset: 272650240
type: freebsd-boot
index: 2
end: 533543
start: 532520
3. Name: ada0p3
Mediasize: 2147483648 (2.0G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 273678336
Mode: r1w1e0
efimedia: HD(3,GPT,6c206937-8b05-11ef-8520-c8d3ff9a8934,0x82800,0x400000)
rawuuid: 6c206937-8b05-11ef-8520-c8d3ff9a8934
rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
label: swap0
length: 2147483648
offset: 273678336
type: freebsd-swap
index: 3
end: 4728831
start: 534528
4. Name: ada0p4
Mediasize: 125614161920 (117G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 2421161984
Mode: r1w1e1
efimedia: HD(4,GPT,6c2798a5-8b05-11ef-8520-c8d3ff9a8934,0x482800,0xe9f9800)
rawuuid: 6c2798a5-8b05-11ef-8520-c8d3ff9a8934
rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
label: zfs0
length: 125614161920
offset: 2421161984
type: freebsd-zfs
index: 4
end: 250068991
start: 4728832
Consumers:
1. Name: ada0
Mediasize: 128035676160 (119G)
Sectorsize: 512
Mode: r3w3e6

Geom name: da0
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 19532873694
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: da0p1
Mediasize: 134217728 (128M)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 1024
Mode: r0w0e0
efimedia: HD(1,GPT,9df4076b-7b86-4717-9306-12e71970504b,0x22,0x40000)
rawuuid: 9df4076b-7b86-4717-9306-12e71970504b
rawtype: e3c9e316-0b5c-4db8-817d-f92df00215ae
label: Microsoft reserved partition
length: 134217728
offset: 17408
type: ms-reserved
index: 1
end: 262177
start: 34
2. Name: da0p2
Mediasize: 10000695033856 (9.1T)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
efimedia: HD(2,GPT,a5b03aa9-e1b8-4bff-84ef-989d8864e539,0x40800,0x48c3bf000)
rawuuid: a5b03aa9-e1b8-4bff-84ef-989d8864e539
rawtype: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
label: Basic data partition
length: 10000695033856
offset: 135266304
type: ms-basic-data
index: 2
end: 19532871679
start: 264192
Consumers:
1. Name: da0
Mediasize: 10000831348736 (9.1T)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0

$ sudo camcontrol devlist
<SAMSUNG SSD SM841 2.5" 7mm 128GB DXM01D0Q> at scbus0 target 0 lun 0 (pass0,ada0)
< UnionSine USB3.2 0103> at scbus1 target 0 lun 0 (da0,pass1)

This was not a ZFS file system.

Anything else needed to help diagnose this issue?
Thanks in advance,
R
 
ada0 is probably your internal SSD and da0 your external USB.

da0p2 partition is ms-basic-data, so I think it can maybe fat32 or ntfs.
If is fat32:
# mount_msdosfs /dev/da0p2 /mnt

If is ntfs, install sysutils/fusefs-ntfs
after:
# ntfs-3g /dev/da0p2 /mnt
 
That's what I get for not making proper notes right away...
mount_msdosfs /dev/da0p2 /mnt gives an "invalid argument" error.
ntfs-3g /dev/da0p2 /mnt gives:
NTFS signature is missing.
Failed to mount '/dev/da0p2': Invalid argument
The device '/dev/da0p2' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
#

I'm worried something got corrupted while it was detached from the system.
R
 
/dev/da0p2: data

Doesn't tell one much, does it?
:/
Yeah, unfortunately it doesn't tell much. If you are sure that it was using NTFS, and you have Windows OS, it might has bitlocker encryption or "fast boot" setting (it's located in Windows's power plan settings) is open. "fast boot" setting may be making it unpossible to mount it on any other OS.
 
It was never on a Windoze system, so I doubt it had fast boot or bitlocker. I'm running testdisk on it right now to see what that finds. It's a 10TB drive, though, so it may take "a few minutes"...
R
 
gpart list is TMI.
How about gpart show -p

"NTFS signature not found" could be ugly.
Maybe not a basic NTFS volume. fusefs can only mount some types of NTFS not all. Right?
 
Well, it was mounted on this system before (admittedly, the OS was reinstalled from scratch after my other side-step was done). I never anticipated a problem, so I never documented how I mounted the drive before. ("That was easy; I won't have a problem doing that again later..." Famous last words!)
testdisk still running:
Disk /dev/da0 - 10000 GB / 9314 GiB - 19532873728 sectors
Analyse sector 116752384/19532873727: 00%
R
 
fusefs-exfat is already installed. fstyp isn't giving me anything, probably because testdisk is still running (it's at a whopping 6%). I want to let it get to 10% before I kill it. And I agree, it isn't looking hopeful. :(
What is the best FreeBSD way of getting an HDD hexdump?
R
 
So, testdisk ran to 15%, and didn't find anything. fstyp still gives "filesystem not recognized".
Code:
# hexdump -C /dev/da0 | head -26
00000000  33 c0 8e d0 bc 00 7c 8e  c0 8e d8 be 00 7c bf 00  |3.....|......|..|
00000010  06 b9 00 02 fc f3 a4 50  68 1c 06 cb fb b9 04 00  |.......Ph.......|
00000020  bd be 07 80 7e 00 00 7c  0b 0f 85 0e 01 83 c5 10  |....~..|........|
00000030  e2 f1 cd 18 88 56 00 55  c6 46 11 05 c6 46 10 00  |.....V.U.F...F..|
00000040  b4 41 bb aa 55 cd 13 5d  72 0f 81 fb 55 aa 75 09  |.A..U..]r...U.u.|
00000050  f7 c1 01 00 74 03 fe 46  10 66 60 80 7e 10 00 74  |....t..F.f`.~..t|
00000060  26 66 68 00 00 00 00 66  ff 76 08 68 00 00 68 00  |&fh....f.v.h..h.|
00000070  7c 68 01 00 68 10 00 b4  42 8a 56 00 8b f4 cd 13  ||h..h...B.V.....|
00000080  9f 83 c4 10 9e eb 14 b8  01 02 bb 00 7c 8a 56 00  |............|.V.|
00000090  8a 76 01 8a 4e 02 8a 6e  03 cd 13 66 61 73 1c fe  |.v..N..n...fas..|
000000a0  4e 11 75 0c 80 7e 00 80  0f 84 8a 00 b2 80 eb 84  |N.u..~..........|
000000b0  55 32 e4 8a 56 00 cd 13  5d eb 9e 81 3e fe 7d 55  |U2..V...]...>.}U|
000000c0  aa 75 6e ff 76 00 e8 8d  00 75 17 fa b0 d1 e6 64  |.un.v....u.....d|
000000d0  e8 83 00 b0 df e6 60 e8  7c 00 b0 ff e6 64 e8 75  |......`.|....d.u|
000000e0  00 fb b8 00 bb cd 1a 66  23 c0 75 3b 66 81 fb 54  |.......f#.u;f..T|
000000f0  43 50 41 75 32 81 f9 02  01 72 2c 66 68 07 bb 00  |CPAu2....r,fh...|
00000100  00 66 68 00 02 00 00 66  68 08 00 00 00 66 53 66  |.fh....fh....fSf|
00000110  53 66 55 66 68 00 00 00  00 66 68 00 7c 00 00 66  |SfUfh....fh.|..f|
00000120  61 68 00 00 07 cd 1a 5a  32 f6 ea 00 7c 00 00 cd  |ah.....Z2...|...|
00000130  18 a0 b7 07 eb 08 a0 b6  07 eb 03 a0 b5 07 32 e4  |..............2.|
00000140  05 00 07 8b f0 ac 3c 00  74 09 bb 07 00 b4 0e cd  |......<.t.......|
00000150  10 eb f2 f4 eb fd 2b c9  e4 64 eb 00 24 02 e0 f8  |......+..d..$...|
00000160  24 02 c3 49 6e 76 61 6c  69 64 20 70 61 72 74 69  |$..Invalid parti|
00000170  74 69 6f 6e 20 74 61 62  6c 65 00 45 72 72 6f 72  |tion table.Error|
00000180  20 6c 6f 61 64 69 6e 67  20 6f 70 65 72 61 74 69  | loading operati|
00000190  6e 67 20 73 79 73 74 65  6d 00 4d 69 73 73 69 6e  |ng system.Missin|
Code:
# hexdump -C /dev/da0p2 | head -26
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00001000  b9 14 00 00 00 66 b8 07  bb 00 00 66 ba 0a 00 00  |.....f.....f....|
00001010  00 66 33 f6 cd 1a 66 61  90 1f 07 c3 a0 f9 01 e9  |.f3...fa........|
00001020  4b f1 a0 fa 01 e9 45 f1  00 00 00 00 00 00 00 00  |K.....E.........|
00001030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00003fd0  00 00 00 00 00 00 00 00  11 7a 0c b1 7a da 10 02  |.........z..z...|
00003fe0  3f 2a 6e 7f 80 8f f4 97  fc ce aa 58 16 9f 90 af  |?*n........X....|
00003ff0  8b b4 6d ff 57 ea d1 cb  ab 5f 46 0d db 92 c6 6e  |..m.W...._F....n|
00004000  01 01 00 00 00 00 00 00  00 00 00 01 00 00 00 24  |...............$|
00004010  00 00 00 20 00 00 00 07  76 65 72 73 69 6f 6e 00  |... ....version.|
00004020  00 00 00 08 00 00 00 01  00 00 00 00 00 00 13 88  |................|
00004030  00 00 00 24 00 00 00 20  00 00 00 04 6e 61 6d 65  |...$... ....name|
00004040  00 00 00 09 00 00 00 01  00 00 00 05 53 74 6f 72  |............Stor|
00004050  65 00 00 00 00 00 00 24  00 00 00 20 00 00 00 05  |e......$... ....|
00004060  73 74 61 74 65 00 00 00  00 00 00 08 00 00 00 01  |state...........|
00004070  00 00 00 00 00 00 00 00  00 00 00 20 00 00 00 20  |........... ... |
00004080  00 00 00 03 74 78 67 00  00 00 00 08 00 00 00 01  |....txg.........|
00004090  00 00 00 00 00 07 a5 fe  00 00 00 28 00 00 00 28  |...........(...(|
000040a0  00 00 00 09 70 6f 6f 6c  5f 67 75 69 64 00 00 00  |....pool_guid...|
000040b0  00 00 00 08 00 00 00 01  89 ba 5a d3 10 b9 d8 50  |..........Z....P|
000040c0  00 00 00 24 00 00 00 20  00 00 00 06 65 72 72 61  |...$... ....erra|
000040d0  74 61 00 00 00 00 00 08  00 00 00 01 00 00 00 00  |ta..............|
000040e0  00 00 00 00 00 00 00 24  00 00 00 20 00 00 00 06  |.......$... ....|
000040f0  68 6f 73 74 69 64 00 00  00 00 00 08 00 00 00 01  |hostid..........|
The inclusion of "Store" in the second dump (of just the second partition) is interesting; that was the old mountpoint.
So, I may be SOL, and, starting tomorrow, have to reassemble the data from the NAS and backups, unless someone has another idea.
R
 
Last edited by a moderator:
I finally just newfs'd the drive, and I'll reassemble all of the data.
Thanks to those of you that helped; I'd like to know why the file system went bye-bye, but I guess I'll never know. Cosmic rays? Early onset bit rot?
R
 
This was not a ZFS file system.
I don't know:
label: zfs0
type: freebsd-zfs
Code:
00004010 00 00 00 20 00 00 00 07 76 65 72 73 69 6f 6e 00 |... ....version.|
00004020 00 00 00 08 00 00 00 01 00 00 00 00 00 00 13 88 |................|
00004030 00 00 00 24 00 00 00 20 00 00 00 04 6e 61 6d 65 |...$... ....name|
00004040 00 00 00 09 00 00 00 01 00 00 00 05 53 74 6f 72 |............Stor|
00004050 65 00 00 00 00 00 00 24 00 00 00 20 00 00 00 05 |e......$... ....|
00004060 73 74 61 74 65 00 00 00 00 00 00 08 00 00 00 01 |state...........|
00004070 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 20 |........... ... |
00004080 00 00 00 03 74 78 67 00 00 00 00 08 00 00 00 01 |....txg.........|
00004090 00 00 00 00 00 07 a5 fe 00 00 00 28 00 00 00 28 |...........(...(|
000040a0 00 00 00 09 70 6f 6f 6c 5f 67 75 69 64 00 00 00 |....pool_guid...|

To me these look like evidence of ZFS.
The GPT label is a hint, the data is is definitely from ZFS.
 
Back
Top