[linux-lvm] Identifying Unused VG
Annamalai Gurusami
annamalai.gurusami at oracle.com
Thu Oct 15 10:02:45 UTC 2020
Hi All,
I am new user of LVM. At home, in a desktop machine, I installed Ubuntu
20.04 LTS and while doing so I opted for LVM. This desktop computer has
2 hard disks. I want to remove 1 hard disk and use it for another
computer. But I need to remove the hard disk without loss of data. The
problem now is that there are two VG listed, while I think it should be
only one. How to identify the unwanted VG? Maybe this is because of
multiple attempts at installation. Any help on this is much
appreciated.
Here are some of the output of the commands in that desktop:
root at desktop02:~# lsblk --scsi
NAME HCTL TYPE VENDOR MODEL REV TRAN
sda 2:0:0:0 disk ATA ST2000DM005-2CW102 0001 sata
sdb 8:0:0:0 disk ATA WDC_WD20EZAZ-00GGJB0 0A80 sata
root at desktop02:~# vgs
VG #PV #LV #SN Attr VSize VFree
vgubuntu 1 2 0 wz--n- <1.82t 0
vgubuntu 1 2 0 wz--n- <1.82t 0
root at desktop02:~# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 vgubuntu lvm2 a-- <1.82t 0
/dev/sdb5 vgubuntu lvm2 a-- <1.82t 0
root at desktop02:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root vgubuntu -wi-ao---- <1.82t
root vgubuntu -wi------- <1.82t
swap_1 vgubuntu -wi-ao---- 976.00m
swap_1 vgubuntu -wi------- 976.00m
root at desktop02:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 55M 1 loop /snap/core18/1880
loop1 7:1 0 251M 1 loop /snap/gimp/292
loop2 7:2 0 161.4M 1 loop /snap/gnome-3-28-1804/128
loop3 7:3 0 251M 1 loop /snap/gimp/297
loop4 7:4 0 162.9M 1 loop /snap/gnome-3-28-1804/145
loop5 7:5 0 55.3M 1 loop /snap/core18/1885
loop6 7:6 0 255.6M 1 loop /snap/gnome-3-34-1804/36
loop7 7:7 0 217.9M 1 loop /snap/gnome-3-34-1804/60
loop8 7:8 0 62.1M 1 loop /snap/gtk-common-themes/1506
loop9 7:9 0 138.4M 1 loop /snap/inkscape/7947
loop10 7:10 0 260.7M 1 loop /snap/kde-frameworks-5-core18/32
loop11 7:11 0 43.2M 1 loop /snap/snap-store/415
loop12 7:12 0 50.7M 1 loop /snap/snap-store/481
loop13 7:13 0 30.3M 1 loop /snap/snapd/9279
loop14 7:14 0 31M 1 loop /snap/snapd/9607
loop15 7:15 0 217.5M 1 loop /snap/supertux/229
loop16 7:16 0 290.4M 1 loop /snap/vlc/1700
sda 8:0 0 1.8T 0 disk
├─sda1 8:1 0 512M 0 part
└─sda2 8:2 0 1.8T 0 part
sdb 8:16 0 1.8T 0 disk
├─sdb1 8:17 0 512M 0 part /boot/efi
├─sdb2 8:18 0 1K 0 part
└─sdb5 8:21 0 1.8T 0 part
├─vgubuntu-root 253:0 0 1.8T 0 lvm /
└─vgubuntu-swap_1 253:1 0 976M 0 lvm [SWAP]
root at desktop02:~#
Since both the VG is named as "vgubuntu", I am wondering how to identify
the unused or unwanted VG. And I need to identify which hard disk (sda
or sdb) I can remove. And what I need to do before unplugging it.
I would appreciate if you people can point me in the right
direction. Thank you.
Rgds,
anna
--
mysql> help year data type;
Name: 'YEAR DATA TYPE'
Description:
YEAR[(4)]
A year in 4-digit format. MySQL displays YEAR values in YYYY format,
but permits assignment of values to YEAR columns using either strings
or numbers. Values display as 1901 to 2155, or 0000.
More information about the linux-lvm
mailing list