I'm posting on the StackExchange Unix&Linux community board first, as it seams to be the most likely place for the type of answers I'm looking for. I'm hoping that someone can point me in the right direction.
I have spent the last two days off and on trying to access an old drive from an Iomega HMNHD CE (see here: http://iomega.nas-central.org/wiki/Category:Home_Media_CE), and from what I can confirm from the drive uses MD to create its 'raid' configuration (as per the boot log provided in the restoration guide). Additionally, I've tried to follow instructions from the original hacking guide (http://iomega.nas-central.org/wiki/Root_access_enabling_(Home_Media_CE)), but what worked on my ancient PC way back when no longer works the same way. I'm now using a modern Ubuntu to try to do this. I would have originally been using probably something like Debian lenny.
The physical hard disk is in perfect working order. It is more that I'm extremely rusty and any unix/linux fu I had appears to have deserted me.
NOTE: I am not trying to 'restore' the drive, I am trying to gain access to the data partition on the drive using a PC to which the drive has been attached via USB. The drive is working and correctly attached, the issue is with whatever way the device/partitions/volumes need to be mounted.
The issue is that although I can get the drive to be seen, the partitions do not mount. I'm not interested at this stage particularly in the first partition (sdc1) as this contains two volumes, one is the initramfs image to boot the device, and a series of nested app and system related volumes - if worst came to worst and I wanted this data, it can be recreated from the original 'firmware' images. The second partition (sdc2) however contains the data volume, and it is there that all the SMB shares are located. It is this data I am trying to retrieve.
This has been revised and tidied up to reflect advice already received
root@LAPTOP-TIS9JBHH:~# hdparm -I /dev/sdc
/dev/sdc:
SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 07 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ATA device, with non-removable media
Standards:
Likely used: 1
Configuration:
Logical max current
cylinders 0 0
heads 0 0
sectors/track 0 0
--
Logical/Physical Sector size: 512 bytes
device size with M = 1024*1024: 0 MBytes
device size with M = 1000*1000: 0 MBytes
cache/buffer size = unknown
Capabilities:
IORDY not likely
Cannot perform double-word IO
R/W multiple sector transfer: not supported
DMA: not supported
PIO: pio0
root@LAPTOP-TIS9JBHH:~# mdadm --examine /dev/sdc
/dev/sdc:
MBR Magic : aa55
Partition[0] : 1953525167 sectors at 1 (type ee)
root@LAPTOP-TIS9JBHH:~# cat /proc/mdstat
Personalities : [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
unused devices: <none>
root@LAPTOP-TIS9JBHH:~# cat /proc/partitions
major minor #blocks name
1 0 65536 ram0
... SNIP ...
8 0 399176 sda
8 16 2097156 sdb
8 32 1953514584 sdc
8 33 20971520 sdc1
8 34 955758261 sdc2
252 0 20971520 dm-0
root@LAPTOP-TIS9JBHH:~# pvscan --cache
pvscan[394] PV /dev/sdc2 online.
root@LAPTOP-TIS9JBHH:~# vgscan --mknodes
Found volume group "46b8de_vg11" using metadata type lvm2
root@LAPTOP-TIS9JBHH:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
lv15807ccd 46b8de_vg11 -wi-a----- 911.48g
root@LAPTOP-TIS9JBHH:~# pvs
PV VG Fmt Attr PSize PFree
/dev/sdc2 46b8de_vg11 lvm2 a-- 911.48g 0
root@LAPTOP-TIS9JBHH:~# vgs
VG #PV #LV #SN Attr VSize VFree
46b8de_vg11 1 1 0 wz--n- 911.48g 0
root@LAPTOP-TIS9JBHH:~# vgchange -ay -vvv
... SEE COMMENTS FOR ADDITIONAL RESULTS ...
root@LAPTOP-TIS9JBHH:~# lvscan
ACTIVE '/dev/46b8de_vg11/lv15807ccd' [911.48 GiB] inherit
root@LAPTOP-TIS9JBHH:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 389.8M 1 disk
sdb 8:16 0 2G 0 disk [SWAP]
sdc 8:48 0 1.8T 0 disk
├─sdc1 8:49 0 20G 0 part
└─sdc2 8:50 0 911.5G 0 part
sdd 8:32 0 256G 0 disk
root@LAPTOP-TIS9JBHH:~# lvmdiskscan
... SNIP (RAM) ...
/dev/sda [ 389.82 MiB]
/dev/sdb [ 2.00 GiB]
/dev/sdc1 [ 20.00 GiB]
/dev/sdc2 [ 911.48 GiB] LVM physical volume
/dev/sdd [ 256.00 GiB]
3 disks
17 partitions
0 LVM physical volume whole disks
1 LVM physical volume
root@LAPTOP-TIS9JBHH:~# parted -l
Warning: Unable to open /dev/sda read-write (Read-only file system). /dev/sda has been opened read-only.
Model: Msft Virtual Disk (scsi)
Disk /dev/sda: 409MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 409MB 409MB ext2
Model: Msft Virtual Disk (scsi)
Disk /dev/sdb: 2147MB
Sector size (logical/physical): 512B/4096B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 2147MB 2147MB linux-swap(v1)
Model: ASMedia asm1153e (scsi)
Disk /dev/sdc: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 33.6MB 21.5GB 21.5GB primary raid
2 21.5GB 1000GB 979GB primary msftdata
Model: Msft Virtual Disk (scsi)
Disk /dev/sdd: 275GB
Sector size (logical/physical): 512B/4096B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 275GB 275GB ext4
root@LAPTOP-TIS9JBHH:~# more /etc/lvm/backup/46b8de_vg
# Generated by LVM2 version 2.03.07(2) (2019-11-30): Mon Jan 22 18:19:57 2024
contents = "Text Format Volume Group"
version = 1
description = "Created *after* executing 'vgs'"
creation_host = "LAPTOP-TIS9JBHH" # Linux LAPTOP-TIS9JBHH #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64
creation_time = 1705947597 # Mon Jan 22 18:19:57 2024
46b8de_vg {
id = "1ooII8-zoas-M8bF-BekN-h3qG-Vags-RYLTD5"
seqno = 2
format = "lvm2" # informational
status = ["RESIZEABLE", "READ", "WRITE"]
flags = []
extent_size = 8192 # 4 Megabytes
max_lv = 0
max_pv = 0
metadata_copies = 0
physical_volumes {
pv0 {
id = "2NlG4k-xIZl-NgIz-0glj-DMqD-IYVB-AuiwWF"
device = "/dev/mapper/sdc2" # Hint only
status = ["ALLOCATABLE"]
flags = []
dev_size = 1911516416 # 911.482 Gigabytes
pe_start = 384
pe_count = 233339 # 911.48 Gigabytes
}
}
logical_volumes {
lv15807ccd {
id = "m4WEST-MOJL-scOg-vlcG-s9uZ-nelQ-0oBvYd"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
segment_count = 1
segment1 {
start_extent = 0
extent_count = 233339 # 911.48 Gigabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv0", 0
]
}
}
}
}
root@LAPTOP-TIS9JBHH:~# ls /dev/
autofs fuse loop1 ptmx ram4 sdd tty11 tty23 tty35 tty47 tty59 urandom
block hvc0 loop2 ptp0 ram5 sg0 tty12 tty24 tty36 tty48 tty6 vcs
bsg hvc1 loop3 pts ram6 sg1 tty13 tty25 tty37 tty49 tty60 vcs1
btrfs-control hvc2 loop4 ram0 ram7 sg2 tty14 tty26 tty38 tty5 tty61 vcsa
bus hvc3 loop5 ram1 ram8 sg3 tty15 tty27 tty39 tty50 tty62 vcsa1
console hvc4 loop6 ram10 ram9 shm tty16 tty28 tty4 tty51 tty63 vcsu
cpu_dma_latency hvc5 loop7 ram11 random stderr tty17 tty29 tty40 tty52 tty7 vcsu1
cuse hvc6 mapper ram12 rtc0 stdin tty18 tty3 tty41 tty53 tty8 vfio
dm-0 hvc7 mem ram13 sda stdout tty19 tty30 tty42 tty54 tty9 vhost-net
dri kmsg net ram14 sdb tty tty2 tty31 tty43 tty55 ttyS0 vport0p0
dxg kvm null ram15 sdc tty0 tty20 tty32 tty44 tty56 ttyS1 vport0p1
fd loop-control nvram ram2 sdc1 tty1 tty21 tty33 tty45 tty57 ttyS2 vsock
full loop0 ppp ram3 sdc2 tty10 tty22 tty34 tty46 tty58 ttyS3 zero
root@LAPTOP-TIS9JBHH:~# ls -AlF /dev/mapper/
total 0
brw-rw---- 1 root disk 252, 0 Jan 24 20:56 46b8de_vg11-lv15807ccd
crw------- 1 root root 10, 236 Jan 24 18:50 control
root@LAPTOP-TIS9JBHH:~# mount -o loop,ro /dev/46b8de_vg11/lv15807ccd /mnt/46b8de_vg11/lv15807ccd
mount: /mnt/46b8de_vg11/lv15807ccd: failed to setup loop device for /dev/46b8de_vg11/lv15807ccd.
root@LAPTOP-TIS9JBHH:~# mount -o ro /dev/46b8de_vg11/lv15807ccd /mnt/46b8de_vg11/lv15807ccd
mount: /mnt/46b8de_vg11/lv15807ccd: special device /dev/46b8de_vg11/lv15807ccd does not exist.
root@LAPTOP-TIS9JBHH:~# mount -o loop,ro /dev/46b8de_vg11/lv15807ccd /mnt/46b8de_vg11/lv15807ccd
mount: /mnt/46b8de_vg11/lv15807ccd: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error.
root@LAPTOP-TIS9JBHH:~# mount -o ro /dev/46b8de_vg11/lv15807ccd /mnt/46b8de_vg11/lv15807ccd
mount: /mnt/46b8de_vg11/lv15807ccd: wrong fs type, bad option, bad superblock on /dev/mapper/46b8de_vg11-lv15807ccd, missing codepage or helper program, or other error.
root@LAPTOP-TIS9JBHH:~# mount /dev/sdc1 /mnt/hmnhd
mount: /mnt/hmnhd: unknown filesystem type 'linux_raid_member'.
root@LAPTOP-TIS9JBHH:~# mount /dev/sdc2 /mnt/hmnhd
mount: /mnt/hmnhd: unknown filesystem type 'LVM2_member'.
root@LAPTOP-TIS9JBHH:~# mount -t xfs /dev/sdc1 /mnt/hmnhd
mount: /mnt/hmnhd: wrong fs type, bad option, bad superblock on /dev/sdc1, missing codepage or helper program, or other error.
root@LAPTOP-TIS9JBHH:~# mount -t xfs /dev/sdc2 /mnt/hmnhd
mount: /mnt/hmnhd: wrong fs type, bad option, bad superblock on /dev/sdc2, missing codepage or helper program, or other error.
root@LAPTOP-TIS9JBHH:~# mount
/dev/sdd on / type ext4 (rw,relatime,discard,errors=remount-ro,data=ordered)
rootfs on /init type rootfs (ro,size=4040468k,nr_inodes=1010117)
none on /dev type devtmpfs (rw,nosuid,relatime,size=4040468k,nr_inodes=1010117,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,gid=5,mode=620,ptmxmode=000)
none on /dev/shm type tmpfs (rw,nosuid,nodev,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu type cgroup (rw,nosuid,nodev,noexec,relatime,cpu)
cgroup on /sys/fs/cgroup/cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_prio)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/misc type cgroup (rw,nosuid,nodev,noexec,relatime,misc)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
none on /run type tmpfs (rw,nosuid,nodev,mode=755)
none on /run/lock type tmpfs (rw,nosuid,nodev,noexec,noatime)
none on /run/shm type tmpfs (rw,nosuid,nodev,noatime)
none on /run/user type tmpfs (rw,nosuid,nodev,noexec,noatime,mode=755)
root@LAPTOP-TIS9JBHH:~# blkid
/dev/sda: TYPE="ext4"
/dev/sdb: UUID="75773f41-70f2-41ab-adcb-0fbb216bf538" TYPE="swap"
/dev/sdd: UUID="3255683f-53a2-4fdf-91cf-b4c1041e2a62" TYPE="ext4"
/dev/sdc1: UUID="141d2930-efdb-98ee-9e53-3554149220b4" TYPE="linux_raid_member" PARTLABEL="primary" PARTUUID="9a1654fb-a320-46de-9700-ee2ac28b8142"
/dev/sdc2: UUID="H1H4u5-Hj57-p0Ja-oHf3-FpNR-4K2e-eFUBfv" TYPE="LVM2_member" PARTLABEL="primary" PARTUUID="a2f682d1-de59-4b59-b328-3d24a6e5c450"
/dev/mapper/sdc1: UUID="141d2930-efdb-98ee-9e53-3554149220b4" TYPE="linux_raid_member" PARTLABEL="primary" PARTUUID="9a1654fb-a320-46de-9700-ee2ac28b8142"
/dev/mapper/sdc2: UUID="H1H4u5-Hj57-p0Ja-oHf3-FpNR-4K2e-eFUBfv" TYPE="LVM2_member" PARTLABEL="primary" PARTUUID="a2f682d1-de59-4b59-b328-3d24a6e5c450"
All the above commands and outputs have been tried but I have so far failed to understand what I'm missing in order to get this to work.
Note: the drive 'functions' in the NAS, but only the first partition (SDC1) is being utilised in the NAS, the second partition (SDC2) is the not available - no shares, etc.