제휴되지 않은 Ubuntu 환경에서 기존 Iomega NAS 드라이브를 설치할 때 문제가 발생함

제휴되지 않은 Ubuntu 환경에서 기존 Iomega NAS 드라이브를 설치할 때 문제가 발생함

저는 StackExchange Unix & Linux 커뮤니티 보드에 먼저 글을 올렸습니다. 제가 찾고 있던 유형의 답변이 가장 적합한 곳인 것 같았기 때문입니다. 누군가가 나를 올바른 방향으로 가리킬 수 있기를 바랍니다.

지난 이틀 동안 Iomega HMNHD CE의 기존 드라이브에 액세스하려고 했습니다(여기 참조:http://iomega.nas-central.org/wiki/Category:Home_Media_CE), 내가 아는 한 드라이브는 MD를 사용하여 "raid" 구성을 생성합니다(복구 가이드에 제공된 부팅 로그에 따라). 또한 원본 해커 가이드(http://iomega.nas-central.org/wiki/Root_access_enabling_(Home_Media_CE)), 이전 PC에서 작동하던 기능이 더 이상 같은 방식으로 작동하지 않습니다. 저는 현재 이 작업을 수행하기 위해 최신 Ubuntu를 사용하고 있습니다. 나는 아마도 처음에는 Debian lenny와 같은 것을 사용할 것입니다.

물리적 하드 드라이브가 완벽하게 작동하고 있습니다. 더 중요한 것은 제가 매우 녹슬었고 제가 가지고 있던 UNIX/Linux 기술이 저를 버린 것처럼 보였습니다.

참고: 드라이브를 "복구"하려는 것이 아니라 USB를 통해 연결된 드라이브가 있는 PC를 사용하여 드라이브의 데이터 파티션에 액세스하려고 합니다. 드라이브가 작동하고 올바르게 연결되어 있습니다. 문제는 장치/파티션/볼륨을 마운트해야 하는 방식입니다.

문제는 드라이브는 보이지만 파티션을 마운트할 수 없다는 점입니다. 이 단계에서는 관심이 없습니다. 특히 첫 번째 파티션(sdc1)에는 두 개의 볼륨, 부팅 장치에 대한 initramfs 이미지, 일련의 중첩된 애플리케이션 및 시스템 관련 볼륨이 포함되어 있으므로 대부분의 경우 나쁜 일이 발생하거나 원하는 경우 원본 "펌웨어" 이미지에서 데이터를 다시 만들 수 있습니다. 그러나 두 번째 파티션(sdc2)에는 모든 SMB 공유가 있는 데이터 볼륨이 포함되어 있습니다. 제가 검색하려고 하는 것이 바로 이 데이터입니다.

이 콘텐츠는 받은 제안을 반영하기 위해 수정 및 구성되었습니다.

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"

위의 모든 명령과 출력을 시도했지만 지금까지 작동시키기 위해 누락된 것이 무엇인지 이해할 수 없습니다.

참고: NAS의 드라이브는 "그냥 작동"하지만 NAS에서는 첫 번째 파티션(SDC1)만 사용되고 두 번째 파티션(SDC2)은 사용할 수 없습니다. 공유가 불가능합니다.

관련 정보