Access LVM

dataMajorLabel

New Member
Feb 2, 2022
1
0
1
32
Hi,

How do i mount lvm disk used by VM on host machine, so i can copy files?

The VM (Xpenology) is broken and I can't boot on it anymore. I had 2 4TB disk in RAID 1 mounted on it and I want to get back my data but I can't mount the LVM.

(I'm only interested in Disk_1 and Disk_2)

Here are some info:

Code:
root@pr0xm0x:~# lvs
  LV            VG     Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  vm-100-disk-0 Disk_1 -wi-a-----    3.55t
  vm-100-disk-0 Disk_2 -wi-a-----    3.55t
  data          pve    twi-aotz-- <181.69g             66.51  3.92
  root          pve    -wi-ao----   69.50g
  swap          pve    -wi-ao----    8.00g
  vm-100-disk-0 pve    Vwi-a-tz--   16.00g data        12.24
  vm-100-disk-1 pve    Vwi-a-tz--   52.00m data        57.21
  vm-103-disk-1 pve    Vwi-a-tz--    6.00g data        27.56
  vm-200-disk-0 pve    Vwi-a-tz--  120.00g data        97.66
  vm-200-disk-1 pve    Vwi-a-tz--  100.00g data        0.00

Code:
root@pr0xm0x:~# parted /dev/Disk_1/vm-100-disk-0 print
Model: Linux device-mapper (linear) (dm)
Disk /dev/dm-0: 3908GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system     Name  Flags
 1      1049kB  2551MB  2550MB  ext4                  raid
 2      2551MB  4699MB  2147MB  linux-swap(v1)        raid
 3      4832MB  3908GB  3903GB                        raid

Code:
root@pr0xm0x:~# lsblk
NAME                          MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                             8:0    0 279.4G  0 disk
├─sda1                          8:1    0  1007K  0 part
├─sda2                          8:2    0   512M  0 part
└─sda3                          8:3    0 278.9G  0 part
  ├─pve-swap                  253:2    0     8G  0 lvm  [SWAP]
  ├─pve-root                  253:3    0  69.5G  0 lvm  /
  ├─pve-data_tmeta            253:4    0   1.9G  0 lvm
  │ └─pve-data-tpool          253:6    0 181.7G  0 lvm
  │   ├─pve-data              253:7    0 181.7G  0 lvm
  │   ├─pve-vm--200--disk--0  253:8    0   120G  0 lvm
  │   ├─pve-vm--100--disk--0  253:9    0    16G  0 lvm
  │   ├─pve-vm--100--disk--1  253:10   0    52M  0 lvm
  │   ├─pve-vm--200--disk--1  253:11   0   100G  0 lvm
  │   └─pve-vm--103--disk--1  253:12   0     6G  0 lvm
  └─pve-data_tdata            253:5    0 181.7G  0 lvm
    └─pve-data-tpool          253:6    0 181.7G  0 lvm
      ├─pve-data              253:7    0 181.7G  0 lvm
      ├─pve-vm--200--disk--0  253:8    0   120G  0 lvm
      ├─pve-vm--100--disk--0  253:9    0    16G  0 lvm
      ├─pve-vm--100--disk--1  253:10   0    52M  0 lvm
      ├─pve-vm--200--disk--1  253:11   0   100G  0 lvm
      └─pve-vm--103--disk--1  253:12   0     6G  0 lvm
sdb                             8:16   0   3.7T  0 disk
└─Disk_2-vm--100--disk--0     253:1    0   3.6T  0 lvm
sdc                             8:32   0   3.7T  0 disk
└─Disk_1-vm--100--disk--0     253:0    0   3.6T  0 lvm
  ├─Disk_1-vm--100--disk--0p1 253:13   0   2.4G  0 part
  ├─Disk_1-vm--100--disk--0p2 253:14   0     2G  0 part
  └─Disk_1-vm--100--disk--0p3 253:15   0   3.6T  0 part
sdd                             8:48   0   3.7T  0 disk
sde                             8:64   0   1.8T  0 disk
└─sde1                          8:65   0   1.8T  0 part
sdf                             8:80   1  14.4G  0 disk
├─sdf1                          8:81   1   2.9G  0 part
├─sdf2                          8:82   1   3.9M  0 part
└─sdf3                          8:83   1  11.6G  0 part
sr0                            11:0    1  1024M  0 rom

Code:
root@pr0xm0x:~# lvdisplay
  --- Logical volume ---
  LV Path                /dev/Disk_1/vm-100-disk-0
  LV Name                vm-100-disk-0
  VG Name                Disk_1
  LV UUID                Hek0vC-VCjH-9BhS-i1Va-5X3d-0mzC-FK3bbM
  LV Write Access        read/write
  LV Creation host, time pr0xm0x, 2020-01-23 08:50:40 +0100
  LV Status              available
  # open                 3
  LV Size                3.55 TiB
  Current LE             931840
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

  --- Logical volume ---
  LV Path                /dev/Disk_2/vm-100-disk-0
  LV Name                vm-100-disk-0
  VG Name                Disk_2
  LV UUID                M6dzfZ-6wXt-dyvI-pSL8-3hky-aROy-JfWZUC
  LV Write Access        read/write
  LV Creation host, time pr0xm0x, 2020-01-23 08:50:55 +0100
  LV Status              available
  # open                 0
  LV Size                3.55 TiB
  Current LE             931840
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1

  --- Logical volume ---
  LV Path                /dev/pve/swap
  LV Name                swap
  VG Name                pve
  LV UUID                JogsLv-1xic-2cK2-rBRX-EHt5-buYg-pcrWJM
  LV Write Access        read/write
  LV Creation host, time proxmox, 2019-12-07 11:10:23 +0100
  LV Status              available
  # open                 2
  LV Size                8.00 GiB
  Current LE             2048
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2

  --- Logical volume ---
  LV Path                /dev/pve/root
  LV Name                root
  VG Name                pve
  LV UUID                Ukw2fX-Dcf1-RueD-mx6e-spEw-GdrV-fvxnjB
  LV Write Access        read/write
  LV Creation host, time proxmox, 2019-12-07 11:10:23 +0100
  LV Status              available
  # open                 1
  LV Size                69.50 GiB
  Current LE             17792
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:3

  --- Logical volume ---
  LV Name                data
  VG Name                pve
  LV UUID                LZmHdO-0rZX-XfGy-6fRz-j9bm-VmJz-yS2CQd
  LV Write Access        read/write
  LV Creation host, time proxmox, 2019-12-07 11:10:24 +0100
  LV Pool metadata       data_tmeta
  LV Pool data           data_tdata
  LV Status              available
  # open                 6
  LV Size                <181.69 GiB
  Allocated pool data    66.51%
  Allocated metadata     3.92%
  Current LE             46512
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:6

  --- Logical volume ---
  LV Path                /dev/pve/vm-200-disk-0
  LV Name                vm-200-disk-0
  VG Name                pve
  LV UUID                vRF4uB-WzMy-B2Nm-LDcy-T8BN-ghjF-PqPVKS
  LV Write Access        read/write
  LV Creation host, time pr0xm0x, 2019-12-17 11:03:55 +0100
  LV Pool name           data
  LV Status              available
  # open                 0
  LV Size                120.00 GiB
  Mapped size            97.66%
  Current LE             30720
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:8

  --- Logical volume ---
  LV Path                /dev/pve/vm-100-disk-0
  LV Name                vm-100-disk-0
  VG Name                pve
  LV UUID                3yGcBF-rhHJ-EMhC-Ft8o-okne-YdVg-ll3D4f
  LV Write Access        read/write
  LV Creation host, time pr0xm0x, 2020-01-23 08:40:48 +0100
  LV Pool name           data
  LV Status              available
  # open                 0
  LV Size                16.00 GiB
  Mapped size            12.24%
  Current LE             4096
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:9

  --- Logical volume ---
  LV Path                /dev/pve/vm-100-disk-1
  LV Name                vm-100-disk-1
  VG Name                pve
  LV UUID                3YV9J4-mLv3-yHg3-Sv2f-kklP-cvPt-1H5Zc0
  LV Write Access        read/write
  LV Creation host, time pr0xm0x, 2020-01-23 08:48:19 +0100
  LV Pool name           data
  LV Status              available
  # open                 0
  LV Size                52.00 MiB
  Mapped size            57.21%
  Current LE             13
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:10

  --- Logical volume ---
  LV Path                /dev/pve/vm-200-disk-1
  LV Name                vm-200-disk-1
  VG Name                pve
  LV UUID                3TWqbr-RO52-chRo-ubLf-zzzx-4QGg-Z21cuq
  LV Write Access        read/write
  LV Creation host, time pr0xm0x, 2020-02-01 13:59:13 +0100
  LV Pool name           data
  LV Status              available
  # open                 0
  LV Size                100.00 GiB
  Mapped size            0.00%
  Current LE             25600
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:11

  --- Logical volume ---
  LV Path                /dev/pve/vm-103-disk-1
  LV Name                vm-103-disk-1
  VG Name                pve
  LV UUID                4e22Xm-P40c-NaxA-TttF-5eBQ-F3CR-IcK2DP
  LV Write Access        read/write
  LV Creation host, time pr0xm0x, 2022-01-30 16:47:57 +0100
  LV Pool name           data
  LV Status              available
  # open                 0
  LV Size                6.00 GiB
  Mapped size            27.56%
  Current LE             1536
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:12

And here is the result of mount:
Code:
root@pr0xm0x:~# mount /dev/Disk_1/vm-100-disk-0 /mnt/Disk_1/
mount: /mnt/Disk_1: wrong fs type, bad option, bad superblock on /dev/mapper/Disk_1-vm--100--disk--0, missing codepage or helper program, or other error.
 
Hey,

Hum ... You can try like this ... Or restart your VM on LiveOS, and mount your RAID1 into your VM.

Idk how you wanna proceed, but i think the repair of your Xpenology (idk this) can be one of your goals ?

Bests regards
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!