You are not logged in.

#1 2022-01-15 17:23:59

Wpq
Member
Registered: 2022-01-15
Posts: 3

How to recreate a LV?

I used to have an Ubuntu system that I was not touching much - it was running docker that hosted all my services.
Today I broke it (a small thing) but realized that this is a bloated system and decided to jump to Arch.
So here I am, with a working system, my docker containers recovered (including Home Assistant, the lights work!) so first of all - THANK YOU for such a lean OS (I used to run gentoo some 20+ years ago, so I really liked th installation process).

I have however a problem: in addition to my /dev/sda disk (OS), I have four other disks with data. Two of these disks were in a LVM configuration and I do not know how to

- confirm which disks are part of the LVM
- how to bring them back together into one logical space that I would be able to mount

The disks seem to hold the right information about the existing VG and LG:

[root@srv ~]# vgscan
  Found volume group "data" using metadata type lvm2

[root@srv ~]# lvscan
  inactive          '/dev/data/data' [<8.19 TiB] inherit

[root@srv ~]# pvscan
  PV /dev/sdd1   VG data            lvm2 [<1.82 TiB / 0    free]
  PV /dev/sdb1   VG data            lvm2 [<1.82 TiB / 0    free]
  PV /dev/sdc    VG data            lvm2 [<3.64 TiB / 0    free]
  PV /dev/sde    VG data            lvm2 [931.51 GiB / 0    free]
  Total: 4 [<8.19 TiB] / in use: 4 [<8.19 TiB] / in no VG: 0 [0   ]


What are the steps I need to do in order to import this LV?

(I would be happy to add a section to https://wiki.archlinux.org/title/LVM#Troubleshooting if I successfully go through that process)

Last edited by Wpq (2022-01-15 17:41:46)

Offline

#2 2022-01-15 17:57:20

Wpq
Member
Registered: 2022-01-15
Posts: 3

Re: How to recreate a LV?

I think I managed to make it work

Importing the VG won't work (it was not exported), but activating it will:

[root@srv ~]# vgimport data
  Volume group "data" is not exported

[root@srv ~]# vgchange -ay data
  1 logical volume(s) in volume group "data" now active

[root@srv ~]# ls /dev/mapper
control  data-data

Finally I mounted the LV

[root@srv /]# mkdir /data
[root@srv /]# mount /dev/mapper/data-data /data

Last edited by Wpq (2022-01-15 18:04:09)

Offline

Board footer

Powered by FluxBB