The officially official Devuan Forum!

You are not logged in.

#1 2025-01-11 10:55:07

stevend
Member
Registered: 2024-12-22
Posts: 9  

[SOLVED] Mounting HDD in a USB cradle

I have a new installation of Daedalus, I'm trying to recover data from a HDD from my old mini-PC that cannot power up.

I've removed the drive and plugged it into a USB cradle. When I power it up, nothing mounts.

tail /var/log/user.log shows me this:

2025-01-11T21:46:23.282635+11:00 sharon mtp-probe: checking bus 2, device 5: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-4"
2025-01-11T21:46:23.283430+11:00 sharon mtp-probe: bus: 2, device: 5 was not an MTP device
2025-01-11T21:46:23.306007+11:00 sharon mtp-probe: checking bus 2, device 5: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-4"
2025-01-11T21:46:23.306936+11:00 sharon mtp-probe: bus: 2, device: 5 was not an MTP device

This HDD should be ext4 file system, holding /home from my older system. (The rest of the file system was on a SSD, I don't care about the data on that.)

What is my next step?

Thanks in advance.

Offline

#2 2025-01-11 11:34:07

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,292  

Re: [SOLVED] Mounting HDD in a USB cradle

What do you get from lsblk ?

Offline

#3 2025-01-11 11:56:42

stevend
Member
Registered: 2024-12-22
Posts: 9  

Re: [SOLVED] Mounting HDD in a USB cradle

root@sharon:/home/steve# lsblk # before plugging in disk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0   3.6T  0 disk 
├─sda1        8:1    0   128M  0 part 
└─sda2        8:2    0   3.6T  0 part /media/steve/TOSHIBA EXT
nvme0n1     259:0    0 119.2G  0 disk 
├─nvme0n1p1 259:1    0   512M  0 part /boot/efi
├─nvme0n1p2 259:2    0 117.8G  0 part /
└─nvme0n1p3 259:3    0   977M  0 part [SWAP]

root@sharon:/home/steve# lsblk # after
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0   3.6T  0 disk 
├─sda1        8:1    0   128M  0 part 
└─sda2        8:2    0   3.6T  0 part /media/steve/TOSHIBA EXT
sdb           8:16   0   1.8T  0 disk 
└─sdb1        8:17   0 222.4G  0 part 
nvme0n1     259:0    0 119.2G  0 disk 
├─nvme0n1p1 259:1    0   512M  0 part /boot/efi
├─nvme0n1p2 259:2    0 117.8G  0 part /
└─nvme0n1p3 259:3    0   977M  0 part [SWAP]

This is what I see in /var/log/syslog:

2025-01-11T22:52:16.794139+11:00 sharon kernel: [1039270.581855] usb 2-4: new SuperSpeed USB device number 6 using xhci_hcd
2025-01-11T22:52:16.813978+11:00 sharon kernel: [1039270.603369] usb 2-4: New USB device found, idVendor=152d, idProduct=0578, bcdDevice= 1.00
2025-01-11T22:52:16.814013+11:00 sharon kernel: [1039270.603389] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
2025-01-11T22:52:16.814016+11:00 sharon kernel: [1039270.603396] usb 2-4: Product: External Disk 3.0
2025-01-11T22:52:16.814018+11:00 sharon kernel: [1039270.603401] usb 2-4: Manufacturer: JMicron
2025-01-11T22:52:16.814019+11:00 sharon kernel: [1039270.603405] usb 2-4: SerialNumber: 784158818BA3
2025-01-11T22:52:16.820710+11:00 sharon mtp-probe: checking bus 2, device 6: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-4"
2025-01-11T22:52:16.821016+11:00 sharon mtp-probe: bus: 2, device: 6 was not an MTP device
2025-01-11T22:52:16.822292+11:00 sharon kernel: [1039270.610067] scsi host2: uas
2025-01-11T22:52:16.822305+11:00 sharon kernel: [1039270.610555] scsi 2:0:0:0: Direct-Access     WDC WD20 SPZX-75UA7T0     8102 PQ: 0 ANSI: 6
2025-01-11T22:52:16.822377+11:00 sharon dbus-daemon[1848]: [session uid=1000 pid=1846] Activating service name='org.xfce.Xfconf' requested by ':1.12' (uid=1000 pid=1928 comm="Thunar --daemon")
2025-01-11T22:52:16.825931+11:00 sharon kernel: [1039270.614653] sd 2:0:0:0: Attached scsi generic sg1 type 0
2025-01-11T22:52:16.827799+11:00 sharon mtp-probe: checking bus 2, device 6: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-4"
2025-01-11T22:52:16.828106+11:00 sharon mtp-probe: bus: 2, device: 6 was not an MTP device
2025-01-11T22:52:16.835423+11:00 sharon dbus-daemon[1848]: [session uid=1000 pid=1846] Successfully activated service 'org.xfce.Xfconf'
2025-01-11T22:52:20.198047+11:00 sharon kernel: [1039273.985911] sd 2:0:0:0: [sdb] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
2025-01-11T22:52:20.198088+11:00 sharon kernel: [1039273.985928] sd 2:0:0:0: [sdb] 4096-byte physical blocks
2025-01-11T22:52:20.198091+11:00 sharon kernel: [1039273.986161] sd 2:0:0:0: [sdb] Write Protect is off
2025-01-11T22:52:20.198093+11:00 sharon kernel: [1039273.986168] sd 2:0:0:0: [sdb] Mode Sense: 53 00 00 08
2025-01-11T22:52:20.198094+11:00 sharon kernel: [1039273.986552] sd 2:0:0:0: [sdb] Disabling FUA
2025-01-11T22:52:20.198096+11:00 sharon kernel: [1039273.986558] sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
2025-01-11T22:52:20.245963+11:00 sharon kernel: [1039274.033897] sd 2:0:0:0: [sdb] Preferred minimum I/O size 4096 bytes
2025-01-11T22:52:20.245998+11:00 sharon kernel: [1039274.033915] sd 2:0:0:0: [sdb] Optimal transfer size 33553920 bytes not a multiple of preferred minimum block size (4096 bytes)
2025-01-11T22:52:20.269963+11:00 sharon kernel: [1039274.059022]  sdb: sdb1
2025-01-11T22:52:20.269985+11:00 sharon kernel: [1039274.059221] sd 2:0:0:0: [sdb] Attached SCSI disk

Offline

#4 2025-01-11 12:33:27

PedroReina
Member
From: Madrid, Spain
Registered: 2019-01-13
Posts: 275  
Website

Re: [SOLVED] Mounting HDD in a USB cradle

Your USB-connected disk is recognized as /dev/sdb1. So, you can mount it typing this order as root: mount /dev/sdb1 /mnt. After that, you can access to its content through the /mnt/ directory. When finished, type as root umount /mnt, wait a bit for the prompt and unplug.

Offline

#5 2025-01-11 15:38:28

stevend
Member
Registered: 2024-12-22
Posts: 9  

Re: [SOLVED] Mounting HDD in a USB cradle

PedroReina wrote:

you can mount it typing this order as root: mount /dev/sdb1 /mnt.

Nothing is ever that easy smile

root@sharon:/home/steve# mount /dev/sdb1 /mnt
mount: /mnt: unknown filesystem type 'linux_raid_member'.
       dmesg(1) may have more information after failed mount system call.

I looked at dmesg and this seems to be the only relevant information:

[1051665.382026] usb 2-4: new SuperSpeed USB device number 7 using xhci_hcd
[1051665.403592] usb 2-4: New USB device found, idVendor=152d, idProduct=0578, bcdDevice= 1.00
[1051665.403612] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[1051665.403619] usb 2-4: Product: External Disk 3.0
[1051665.403624] usb 2-4: Manufacturer: JMicron
[1051665.403628] usb 2-4: SerialNumber: 784158818BA3
[1051665.409940] scsi host2: uas
[1051665.410807] scsi 2:0:0:0: Direct-Access     WDC WD20 SPZX-75UA7T0     8102 PQ: 0 ANSI: 6
[1051665.413999] sd 2:0:0:0: Attached scsi generic sg1 type 0
[1051668.840568] sd 2:0:0:0: [sdb] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[1051668.840586] sd 2:0:0:0: [sdb] 4096-byte physical blocks
[1051668.840830] sd 2:0:0:0: [sdb] Write Protect is off
[1051668.840844] sd 2:0:0:0: [sdb] Mode Sense: 53 00 00 08
[1051668.841211] sd 2:0:0:0: [sdb] Disabling FUA
[1051668.841220] sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[1051668.885980] sd 2:0:0:0: [sdb] Preferred minimum I/O size 4096 bytes
[1051668.885995] sd 2:0:0:0: [sdb] Optimal transfer size 33553920 bytes not a multiple of preferred minimum block size (4096 bytes)
[1051668.902926]  sdb: sdb1
[1051668.903172] sd 2:0:0:0: [sdb] Attached SCSI disk

Offline

#6 2025-01-11 15:42:06

stevend
Member
Registered: 2024-12-22
Posts: 9  

Re: [SOLVED] Mounting HDD in a USB cradle

I installed the mdadm package and tried this:

root@sharon:/home/steve# /sbin/mdadm --assemble --run /dev/md0 /dev/sdb1
mdadm: /dev/md0 has been started with 1 drive (out of 2).
root@sharon:/home/steve# mount /dev/md0 /mnt
mount: /mnt: unknown filesystem type 'LVM2_member'.
       dmesg(1) may have more information after failed mount system call.

dmesg says this:

[1052642.242707] device-mapper: core: CONFIG_IMA_DISABLE_HTABLE is disabled. Duplicate IMA measurements will not be recorded in the IMA log.
[1052642.242744] device-mapper: uevent: version 1.0.3
[1052642.242823] device-mapper: ioctl: 4.47.0-ioctl (2022-07-28) initialised: dm-devel@redhat.com
[1052705.382556] md: md0 stopped.
[1052705.401450] md/raid1:md0: active with 1 out of 2 mirrors
[1052705.886437] md0: detected capacity change from 0 to 466087936

Running lsblk shows this entry (plus the usual ones seen earlier):

sdb           8:16   0   1.8T  0 disk  
└─sdb1        8:17   0 222.4G  0 part  
  └─md0       9:0    0 222.2G  0 raid1 

So now I'm out of ideas.

Last edited by stevend (2025-01-11 15:48:53)

Offline

#7 2025-01-11 15:46:15

RedGreen925
Member
Registered: 2024-12-07
Posts: 46  

Re: [SOLVED] Mounting HDD in a USB cradle

Nothing is ever that easy

It seems to think it is a member of a raid array, is/was it? Try mount -t ext4 /dev/sdb1 /mnt to tell it the filesystem to use when mounting the device partition and the output of the fdisk -l /dev/sdb would be nice to see as well if it continues to insist it cannot mount it.

Edit: Apparently answered my raid question while posting my reply, you need all of the devices in an array present to be able to use it, I think anyways never used it in my life so cannot be certain.

Last edited by RedGreen925 (2025-01-11 15:49:15)

Offline

#8 2025-01-11 16:38:37

stevend
Member
Registered: 2024-12-22
Posts: 9  

Re: [SOLVED] Mounting HDD in a USB cradle

RedGreen925 wrote:

It seems to think it is a member of a raid array, is/was it?

Yes. Furthermore, it was managed by LVM.

Brave search suggests an AI-generated answer that I don't trust but I've used it as a guide to explore further:

https://search.brave.com/search?q=unkno … 56039f2451

I've gone ahead and installed lvm and got this far:

root@sharon:/home/steve# /sbin/lvdisplay
  --- Logical volume ---
  LV Path                /dev/fedora/root
  LV Name                root
  VG Name                fedora
  LV UUID                GDRkyj-RUSf-92N9-lhMX-Kld6-656Y-A66U61
  LV Write Access        read/write
  LV Creation host, time localhost, 2021-10-05 01:43:11 +1100
  LV Status              NOT available
  LV Size                50.00 GiB
  Current LE             12800
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
   
  --- Logical volume ---
  LV Path                /dev/fedora/home
  LV Name                home
  VG Name                fedora
  LV UUID                zwag1C-ZZnW-Pmm8-wjae-EZPM-80E7-ko2M3w
  LV Write Access        read/write
  LV Creation host, time localhost, 2021-10-05 01:43:17 +1100
  LV Status              NOT available
  LV Size                164.41 GiB
  Current LE             42090
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
   
  --- Logical volume ---
  LV Path                /dev/fedora/swap
  LV Name                swap
  VG Name                fedora
  LV UUID                NGBkoh-d12e-JsFz-Gl4V-hHYO-spE2-9RGGup
  LV Write Access        read/write
  LV Creation host, time localhost, 2021-10-05 01:43:34 +1100
  LV Status              NOT available
  LV Size                7.83 GiB
  Current LE             2005
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto

I only care about the  "/dev/fedora/home" volume.

root@sharon:/home/steve# /sbin/vgs
  VG     #PV #LV #SN Attr   VSize    VFree
  fedora   1   3   0 wz--n- <222.25g    0 

root@sharon:/home/steve# /sbin/lvs
  LV   VG     Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  home fedora -wi------- 164.41g                                                    
  root fedora -wi-------  50.00g                                                    
  swap fedora -wi-------   7.83g                                                    

root@sharon:/home/steve# mount /dev/mapper/fedora-home /mnt 
mount: /mnt: special device /dev/mapper/fedora-home does not exist.
       dmesg(1) may have more information after failed mount system call.

So now I'm stuck again.

Offline

#9 2025-01-11 17:30:51

RedGreen925
Member
Registered: 2024-12-07
Posts: 46  

Re: [SOLVED] Mounting HDD in a USB cradle

So now I'm stuck again.

And I would think you will be until you have all drives in the array available to re-assemble and mount it. Try it doing that I think you will get much farther along on your recovery efforts.

Offline

#10 2025-01-11 17:48:08

PedroReina
Member
From: Madrid, Spain
Registered: 2019-01-13
Posts: 275  
Website

Re: [SOLVED] Mounting HDD in a USB cradle

LVM is out of my knowledge. Maybe this link could help:
https://superuser.com/questions/116617/ … lvm-volume

Last edited by PedroReina (2025-01-11 18:05:13)

Offline

#11 2025-01-11 18:11:35

greenjeans
Member
Registered: 2017-04-07
Posts: 701  
Website

Re: [SOLVED] Mounting HDD in a USB cradle

Just a question as i'm not familiar with that stuff either, but your command mount /dev/mapper/fedora-home /mnt

Shouldn't that be mount /dev/fedora/home /mnt ?

Possibly some useful info : https://askubuntu.com/questions/217571/ … om-gparted


https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded 12/24!
Vuu-do GNU/Linux, minimal Devuan-based openbox systems to build on, maximal versions if you prefer your linux fully-loaded.
New Devuan-mate-mini isos too!
Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#12 2025-01-11 21:06:11

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,292  

Re: [SOLVED] Mounting HDD in a USB cradle

I think you need to "activate the volume group" first; doing so will set up the dm objects for the lvms, and the /dev/mapper (symbolic) links for them, to let you mount them "by name". I believe it'd be something like:

(bogus advice removed) 

EDIT: check the man pages; I don't use lvm regularly (being happy enough without that confusion layer) so may well be wrong on the detail.
EDIT2: I blanked my bogus advice --- see @rolfie's post.

Offline

#13 2025-01-11 21:13:28

rolfie
Member
Registered: 2017-11-25
Posts: 1,203  

Re: [SOLVED] Mounting HDD in a USB cradle

vgchange -a y will do the job. Quote the output here please.

Last edited by rolfie (2025-01-11 21:13:56)

Offline

#14 2025-01-12 06:29:03

stargate-sg1-cheyenne-mtn
Member
Registered: 2023-11-27
Posts: 267  

Re: [SOLVED] Mounting HDD in a USB cradle

shouldn't the thread title be less misleading? how about "Can I recover data from a raid member?" also, why no mention of important information like "raid array" and "managed by lvm" in the original post?


Be Excellent to each other and Party On!
https://www.youtube.com/watch?v=rph_1DODXDU
https://en.wikipedia.org/wiki/Bill_%26_Ted%27s_Excellent_Adventure
Do unto others as you would have them do instantaneously back to you!

Offline

#15 2025-01-12 13:15:55

stevend
Member
Registered: 2024-12-22
Posts: 9  

Re: [SOLVED] Mounting HDD in a USB cradle

rolfie wrote:

vgchange -a y will do the job. Quote the output here please.

Thanks, will do.

I'm now working in an area well out of my comfort zone, so before I do that I'm making an exact copy of the drive using dd in case of accidents. (I know, I should have done this earlier, mea culpa. But better late than never.) Looks like it will take another 15 hours.

I should be able to get back to this about this time tomorrow.

stargate-sg1-cheyenne-mtn wrote:

why no mention of important information like "raid array" and "managed by lvm" in the original post?

Fair question.

Because I had set that drive up years ago and had completely forgotten how it was configured until I started seeing the output of commands. I had completely forgotten about using LVM using I saw the error message unknown filesystem type 'LVM2_member'. It was just a check box in an installer something like five years ago, and then never thought about since. (Until now.)

Don't let my ability to run lsblk on the command line fool you, I am very much a novice who knows just enough to get into trouble but not enough to get out of it again without help hmm

(If I had known LVM is so ... complicated ... I would never have used it in the first place, but I used to work with a rockstar techie who told me "Always use LVM because it is totally awesome.")

Offline

#16 2025-01-12 14:17:45

rolfie
Member
Registered: 2017-11-25
Posts: 1,203  

Re: [SOLVED] Mounting HDD in a USB cradle

Yes, LVM is an additional layer. But as it looks like you have not really seen any issues for many years with it, so what? Ok it has its own terms you need to get used to like physical volume, volume group, logical volume, etc. Can be learned, there is a LVM HowTo in the internet. Just look for it. BTW: I am using LVM for many many years by now, no real issues with it.

Offline

#17 Yesterday 08:07:34

stargate-sg1-cheyenne-mtn
Member
Registered: 2023-11-27
Posts: 267  

Re: [SOLVED] Mounting HDD in a USB cradle

mostly for the convenience of future thread visitors, since DD was mentioned:

https://en.wikipedia.org/wiki/Ddrescue

also please visit the other projects as well for additional food for thought:

https://en.wikipedia.org/wiki/Ddrescue#Unrelated_recovery_tools

sometimes i remember to remember to marvel at each and every successful storage media activation(but oh how the expletives flow when they don't...sigh)

Last edited by stargate-sg1-cheyenne-mtn (Yesterday 08:12:53)


Be Excellent to each other and Party On!
https://www.youtube.com/watch?v=rph_1DODXDU
https://en.wikipedia.org/wiki/Bill_%26_Ted%27s_Excellent_Adventure
Do unto others as you would have them do instantaneously back to you!

Offline

#18 Yesterday 22:01:02

stevend
Member
Registered: 2024-12-22
Posts: 9  

Re: [SOLVED] Mounting HDD in a USB cradle

TL;DR: you guys are fantastic! It's working now, thanks for the help.

rolfie wrote:

Yes, LVM is an additional layer. But as it looks like you have not really seen any issues for many years with it, so what?

I have no problem with LVM for those who need it or gain some advantage from it, and I'm not saying that it is "bad". I'm fully aware that the sys admins I used to work with love it for good reason. But in five years I never once needed any of its features, but I'm now paying the cost of that extra complexity. That's all I'm saying.

Moving along, I have made a copy of the HDD, changed the Array UUID so I can use the copy rather than the original, and got to this point:

root@sharon:~# /sbin/mdadm --assemble --run /dev/md1 --update=uuid --uuid=c4ca5085:e2e52c3d:0527066c:5e438460 /dev/sda1
mdadm: /dev/md1 has been started with 1 drive (out of 2).

root@sharon:~# vgchange -a y
  3 logical volume(s) in volume group "fedora" now active

root@sharon:~# vgscan
  Found volume group "fedora" using metadata type lvm2

root@sharon:~# mount /dev/mapper/fedora-home /mnt

And now I can access the files! Thank you all again for your help!

(Dances the Dance Of Joy.)

Offline

Board footer