[SOLVED] remove lv data

Arinmal

Member
Feb 14, 2020
7
1
8
44
Hello everyone,

so I had an m.2 drive with root and lv data on it. once I ran out of space I put a 1tb ssd in my server and added the ssd as my data drive. all my vm's and ct's are transferred over and working fine. I went into datacenter storage and removed the old data lvm not realizing that only removed it from the ui.

lvdisplay shows the partition as data in group pve. but I cant remove it. lvremove just says volume group data cant be found. I don't want to remove the group pve since it was root and all the other things.

sda is the drive but data and root just show up as sda3 so I can't remove that.

I want to remove the old data and resize root to use all the space.

what am I doing wrong??
 
Thanks for the reply!
this is what im getting.

sda3 data 148.36gb is what I want to remove, dataone is the new 1tb ssd that all the vms and cts were moved to.


lsblk:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 43.9M 1 loop /snap/certbot/2772
loop1 7:1 0 43.9M 1 loop /snap/certbot/2836
loop2 7:2 0 116.8M 1 loop /snap/core/14784
loop3 7:3 0 63.3M 1 loop /snap/core20/1828
loop4 7:4 0 63.3M 1 loop /snap/core20/1822
sda 8:0 0 232.9G 0 disk
├─sda1 8:1 0 1007K 0 part
├─sda2 8:2 0 512M 0 part /boot/efi
└─sda3 8:3 0 232.4G 0 part
├─pve-swap 253:2 0 7G 0 lvm [SWAP]
├─pve-root 253:3 0 74G 0 lvm /
├─pve-data_tmeta 253:4 0 1.5G 0 lvm
│ └─pve-data-tpool 253:6 0 148.4G 0 lvm
│ └─pve-data 253:7 0 148.4G 1 lvm
└─pve-data_tdata 253:5 0 148.4G 0 lvm
└─pve-data-tpool 253:6 0 148.4G 0 lvm
└─pve-data 253:7 0 148.4G 1 lvm
sdb 8:16 0 14.6T 0 disk
├─sdb1 8:17 0 2G 0 part
└─sdb2 8:18 0 14.6T 0 part
sdc 8:32 0 931.5G 0 disk
├─dataone-dataone_tmeta 253:0 0 9.3G 0 lvm
│ └─dataone-dataone-tpool 253:8 0 912.8G 0 lvm
│ ├─dataone-dataone 253:9 0 912.8G 1 lvm
│ ├─dataone-vm--101--disk--0 253:10 0 8G 0 lvm
│ ├─dataone-vm--103--disk--0 253:11 0 16G 0 lvm
│ ├─dataone-vm--104--disk--0 253:12 0 32G 0 lvm
│ ├─dataone-vm--106--disk--0 253:13 0 32G 0 lvm
│ ├─dataone-vm--102--disk--0 253:14 0 32G 0 lvm
│ ├─dataone-vm--100--disk--0 253:15 0 8G 0 lvm
│ ├─dataone-vm--105--disk--0 253:16 0 4M 0 lvm
│ └─dataone-vm--105--disk--1 253:17 0 32G 0 lvm
└─dataone-dataone_tdata 253:1 0 912.8G 0 lvm
└─dataone-dataone-tpool 253:8 0 912.8G 0 lvm
├─dataone-dataone 253:9 0 912.8G 1 lvm
├─dataone-vm--101--disk--0 253:10 0 8G 0 lvm
├─dataone-vm--103--disk--0 253:11 0 16G 0 lvm
├─dataone-vm--104--disk--0 253:12 0 32G 0 lvm
├─dataone-vm--106--disk--0 253:13 0 32G 0 lvm
├─dataone-vm--102--disk--0 253:14 0 32G 0 lvm
├─dataone-vm--100--disk--0 253:15 0 8G 0 lvm
├─dataone-vm--105--disk--0 253:16 0 4M 0 lvm
└─dataone-vm--105--disk--1 253:17 0 32G 0 lvm
sdd 8:48 0 14.6T 0 disk
├─sdd1 8:49 0 2G 0 part
└─sdd2 8:50 0 14.6T 0 part
sr0 11:0 1 1024M 0 rom

pvs:
PV VG Fmt Attr PSize PFree
/dev/sda3 pve lvm2 a-- 232.38g 0
/dev/sdc dataone lvm2 a-- 931.51g 120.00m

vgs:
VG #PV #LV #SN Attr VSize VFree
dataone 1 9 0 wz--n- 931.51g 120.00m
pve 1 3 0 wz--n- 232.38g 0

lvs:
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
dataone dataone twi-aotz-- 912.76g 5.08 0.36
vm-100-disk-0 dataone Vwi-aotz-- 8.00g dataone 55.78
vm-101-disk-0 dataone Vwi-aotz-- 8.00g dataone 72.06
vm-102-disk-0 dataone Vwi-aotz-- 32.00g dataone 12.14
vm-103-disk-0 dataone Vwi-aotz-- 16.00g dataone 35.19
vm-104-disk-0 dataone Vwi-aotz-- 32.00g dataone 27.42
vm-105-disk-0 dataone Vwi-aotz-- 4.00m dataone 0.00
vm-105-disk-1 dataone Vwi-aotz-- 32.00g dataone 32.34
vm-106-disk-0 dataone Vwi-a-tz-- 32.00g dataone 23.39
data pve twi-aotz-- <148.36g 0.42 1.08
root pve -wi-ao---- <74.00g
swap pve -wi-ao---- 7.00g

cat /etc/pve/storage.cfg:

dir: local
path /var/lib/vz
content iso,vztmpl,backup
prune-backups keep-last=5
shared 0

dir: TrueNAS
path /mnt/share/Server
content rootdir,backup,snippets,vztmpl,images,iso
prune-backups keep-all=1
shared 1

lvmthin: dataone
thinpool dataone
vgname dataone
content images,rootdir
nodes pve
 
One missing piece - is the exact command you are trying to run and the exact error message you are getting back.
Are you using correct arguments when trying to remove the volume? Take a look at one of many tutorials online, ie:
https://www.thegeekdiary.com/lvremove-command-examples-in-linux/
note the path provided:
Code:
lvremove vg0/myvol

P.S. I should have been clearer - use the CODE tags, they make the posts more readable.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Code:
root@pve:~# lvdisplay
  --- Logical volume ---
  LV Name                dataone
  VG Name                dataone
  LV UUID                1ocuzG-H10F-zXn2-Pdoo-gwcv-Rrdt-XStuc8
  LV Write Access        read/write (activated read only)
  LV Creation host, time pve, 2023-03-15 15:46:02 -0400
  LV Pool metadata       dataone_tmeta
  LV Pool data           dataone_tdata
  LV Status              available
  # open                 0
  LV Size                912.76 GiB
  Allocated pool data    5.08%
  Allocated metadata     0.36%
  Current LE             233667
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:9
 
  --- Logical volume ---
  LV Path                /dev/dataone/vm-101-disk-0
  LV Name                vm-101-disk-0
  VG Name                dataone
  LV UUID                w2M1Ec-7X6z-AslM-5ygO-mSJ1-5YdP-8TESwo
  LV Write Access        read/write
  LV Creation host, time pve, 2023-03-15 15:49:45 -0400
  LV Pool name           dataone
  LV Status              available
  # open                 1
  LV Size                8.00 GiB
  Mapped size            71.99%
  Current LE             2048
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:10
 
  --- Logical volume ---
  LV Path                /dev/dataone/vm-103-disk-0
  LV Name                vm-103-disk-0
  VG Name                dataone
  LV UUID                xfvMSi-e3Xk-TMI3-f74Q-Ohbj-Z3nl-DjWSW3
  LV Write Access        read/write
  LV Creation host, time pve, 2023-03-15 15:50:41 -0400
  LV Pool name           dataone
  LV Status              available
  # open                 1
  LV Size                16.00 GiB
  Mapped size            35.19%
  Current LE             4096
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:11
 
  --- Logical volume ---
  LV Path                /dev/dataone/vm-104-disk-0
  LV Name                vm-104-disk-0
  VG Name                dataone
  LV UUID                HV1FYd-exVr-sykx-MGia-jA5S-p8at-6NP8Oa
  LV Write Access        read/write
  LV Creation host, time pve, 2023-03-15 15:52:14 -0400
  LV Pool name           dataone
  LV Status              available
  # open                 1
  LV Size                32.00 GiB
  Mapped size            27.42%
  Current LE             8192
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:12
 
  --- Logical volume ---
  LV Path                /dev/dataone/vm-106-disk-0
  LV Name                vm-106-disk-0
  VG Name                dataone
  LV UUID                f5R1v3-ms90-Ttvd-8NrH-p7lb-3iXF-LbOsCN
  LV Write Access        read/write
  LV Creation host, time pve, 2023-03-15 15:56:08 -0400
  LV Pool name           dataone
  LV Status              available
  # open                 0
  LV Size                32.00 GiB
  Mapped size            23.39%
  Current LE             8192
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:13
 
  --- Logical volume ---
  LV Path                /dev/dataone/vm-102-disk-0
  LV Name                vm-102-disk-0
  VG Name                dataone
  LV UUID                bN7ctw-7ucJ-u9eb-OViS-ARv0-4Sq5-QpKUIy
  LV Write Access        read/write
  LV Creation host, time pve, 2023-03-15 16:11:34 -0400
  LV Pool name           dataone
  LV Status              available
  # open                 1
  LV Size                32.00 GiB
  Mapped size            12.14%
  Current LE             8192
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:14
 
  --- Logical volume ---
  LV Path                /dev/dataone/vm-100-disk-0
  LV Name                vm-100-disk-0
  VG Name                dataone
  LV UUID                NWsOiq-ZxzT-1W8O-dcgw-FgUl-lJzD-uZd15s
  LV Write Access        read/write
  LV Creation host, time pve, 2023-03-15 16:48:47 -0400
  LV Pool name           dataone
  LV Status              available
  # open                 1
  LV Size                8.00 GiB
  Mapped size            55.78%
  Current LE             2048
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:15
 
  --- Logical volume ---
  LV Path                /dev/dataone/vm-105-disk-0
  LV Name                vm-105-disk-0
  VG Name                dataone
  LV UUID                11VomA-tYsF-ZCIm-qHBY-6O5C-McWc-1EUhoc
  LV Write Access        read/write
  LV Creation host, time pve, 2023-03-15 17:17:18 -0400
  LV Pool name           dataone
  LV Status              available
  # open                 1
  LV Size                4.00 MiB
  Mapped size            0.00%
  Current LE             1
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:16
 
  --- Logical volume ---
  LV Path                /dev/dataone/vm-105-disk-1
  LV Name                vm-105-disk-1
  VG Name                dataone
  LV UUID                Zp6cfJ-gJd7-NP33-si9D-NRof-YXH4-AMEV5h
  LV Write Access        read/write
  LV Creation host, time pve, 2023-03-15 17:17:18 -0400
  LV Pool name           dataone
  LV Status              available
  # open                 1
  LV Size                32.00 GiB
  Mapped size            32.34%
  Current LE             8192
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:17
 
  --- Logical volume ---
  LV Path                /dev/pve/swap
  LV Name                swap
  VG Name                pve
  LV UUID                1m0vY0-QOJk-s9rB-NFJI-8n3L-NdXi-P7fzXt
  LV Write Access        read/write
  LV Creation host, time proxmox, 2021-04-22 14:06:04 -0400
  LV Status              available
  # open                 2
  LV Size                7.00 GiB
  Current LE             1792
  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                0mSIzt-6ZZH-aELS-YSvL-yP24-b7Tf-uklSDA
  LV Write Access        read/write
  LV Creation host, time proxmox, 2021-04-22 14:06:04 -0400
  LV Status              available
  # open                 1
  LV Size                <74.00 GiB
  Current LE             18943
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:3
 
  --- Logical volume ---
  LV Name                data
  VG Name                pve
  LV UUID                2Ezxbu-qx8G-b2b3-3Vdf-nlZv-vy2v-muG76a
  LV Write Access        read/write (activated read only)
  LV Creation host, time proxmox, 2021-04-22 14:06:04 -0400
  LV Pool metadata       data_tmeta
  LV Pool data           data_tdata
  LV Status              available
  # open                 0
  LV Size                <148.36 GiB
  Allocated pool data    0.42%
  Allocated metadata     1.08%
  Current LE             37979
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:7
 
root@pve:~# pvdisplay /dev/sda3
  --- Physical volume ---
  PV Name               /dev/sda3
  VG Name               pve
  PV Size               232.38 GiB / not usable 2.16 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              59490
  Free PE               0
  Allocated PE          59490
  PV UUID               Uf3ZSW-axMK-eqPN-Omtq-oxzG-TFNh-iuYKcj
 
root@pve:~# pvs
  PV         VG      Fmt  Attr PSize   PFree
  /dev/sda3  pve     lvm2 a--  232.38g      0
  /dev/sdc   dataone lvm2 a--  931.51g 120.00m
root@pve:~# vgs
  VG      #PV #LV #SN Attr   VSize   VFree
  dataone   1   9   0 wz--n- 931.51g 120.00m
  pve       1   3   0 wz--n- 232.38g      0
root@pve:~# lvs
  LV            VG      Attr       LSize    Pool    Origin Data%  Meta%  Move Log Cpy%Sync Convert
  dataone       dataone twi-aotz--  912.76g                5.08   0.36                          
  vm-100-disk-0 dataone Vwi-aotz--    8.00g dataone        55.78                                
  vm-101-disk-0 dataone Vwi-aotz--    8.00g dataone        72.04                                
  vm-102-disk-0 dataone Vwi-aotz--   32.00g dataone        12.13                                
  vm-103-disk-0 dataone Vwi-aotz--   16.00g dataone        35.19                                
  vm-104-disk-0 dataone Vwi-aotz--   32.00g dataone        27.42                                
  vm-105-disk-0 dataone Vwi-aotz--    4.00m dataone        0.00                                  
  vm-105-disk-1 dataone Vwi-aotz--   32.00g dataone        32.34                                
  vm-106-disk-0 dataone Vwi-a-tz--   32.00g dataone        23.39                                
  data          pve     twi-aotz-- <148.36g                0.42   1.08                          
  root          pve     -wi-ao----  <74.00g                                                      
  swap          pve     -wi-ao----    7.00g                                                      
root@pve:~# lsblk
NAME                           MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0                            7:0    0  43.9M  1 loop /snap/certbot/2772
loop1                            7:1    0  43.9M  1 loop /snap/certbot/2836
loop2                            7:2    0 116.8M  1 loop /snap/core/14784
loop3                            7:3    0  63.3M  1 loop /snap/core20/1828
loop4                            7:4    0  63.3M  1 loop /snap/core20/1822
sda                              8:0    0 232.9G  0 disk
├─sda1                           8:1    0  1007K  0 part
├─sda2                           8:2    0   512M  0 part /boot/efi
└─sda3                           8:3    0 232.4G  0 part
  ├─pve-swap                   253:2    0     7G  0 lvm  [SWAP]
  ├─pve-root                   253:3    0    74G  0 lvm  /
  ├─pve-data_tmeta             253:4    0   1.5G  0 lvm
  │ └─pve-data-tpool           253:6    0 148.4G  0 lvm
  │   └─pve-data               253:7    0 148.4G  1 lvm
  └─pve-data_tdata             253:5    0 148.4G  0 lvm
    └─pve-data-tpool           253:6    0 148.4G  0 lvm
      └─pve-data               253:7    0 148.4G  1 lvm
sdb                              8:16   0  14.6T  0 disk
├─sdb1                           8:17   0     2G  0 part
└─sdb2                           8:18   0  14.6T  0 part
sdc                              8:32   0 931.5G  0 disk
├─dataone-dataone_tmeta        253:0    0   9.3G  0 lvm
│ └─dataone-dataone-tpool      253:8    0 912.8G  0 lvm
│   ├─dataone-dataone          253:9    0 912.8G  1 lvm
│   ├─dataone-vm--101--disk--0 253:10   0     8G  0 lvm
│   ├─dataone-vm--103--disk--0 253:11   0    16G  0 lvm
│   ├─dataone-vm--104--disk--0 253:12   0    32G  0 lvm
│   ├─dataone-vm--106--disk--0 253:13   0    32G  0 lvm
│   ├─dataone-vm--102--disk--0 253:14   0    32G  0 lvm
│   ├─dataone-vm--100--disk--0 253:15   0     8G  0 lvm
│   ├─dataone-vm--105--disk--0 253:16   0     4M  0 lvm
│   └─dataone-vm--105--disk--1 253:17   0    32G  0 lvm
└─dataone-dataone_tdata        253:1    0 912.8G  0 lvm
  └─dataone-dataone-tpool      253:8    0 912.8G  0 lvm
    ├─dataone-dataone          253:9    0 912.8G  1 lvm
    ├─dataone-vm--101--disk--0 253:10   0     8G  0 lvm
    ├─dataone-vm--103--disk--0 253:11   0    16G  0 lvm
    ├─dataone-vm--104--disk--0 253:12   0    32G  0 lvm
    ├─dataone-vm--106--disk--0 253:13   0    32G  0 lvm
    ├─dataone-vm--102--disk--0 253:14   0    32G  0 lvm
    ├─dataone-vm--100--disk--0 253:15   0     8G  0 lvm
    ├─dataone-vm--105--disk--0 253:16   0     4M  0 lvm
    └─dataone-vm--105--disk--1 253:17   0    32G  0 lvm
sdd                              8:48   0  14.6T  0 disk
├─sdd1                           8:49   0     2G  0 part
└─sdd2                           8:50   0  14.6T  0 part
sr0                             11:0    1  1024M  0 rom
root@pve:~# pvs
  PV         VG      Fmt  Attr PSize   PFree
  /dev/sda3  pve     lvm2 a--  232.38g      0
  /dev/sdc   dataone lvm2 a--  931.51g 120.00m
root@pve:~# vgs
  VG      #PV #LV #SN Attr   VSize   VFree
  dataone   1   9   0 wz--n- 931.51g 120.00m
  pve       1   3   0 wz--n- 232.38g      0
root@pve:~# lvs
  LV            VG      Attr       LSize    Pool    Origin Data%  Meta%  Move Log Cpy%Sync Convert
  dataone       dataone twi-aotz--  912.76g                5.08   0.36                          
  vm-100-disk-0 dataone Vwi-aotz--    8.00g dataone        55.78                                
  vm-101-disk-0 dataone Vwi-aotz--    8.00g dataone        72.06                                
  vm-102-disk-0 dataone Vwi-aotz--   32.00g dataone        12.14                                
  vm-103-disk-0 dataone Vwi-aotz--   16.00g dataone        35.19                                
  vm-104-disk-0 dataone Vwi-aotz--   32.00g dataone        27.42                                
  vm-105-disk-0 dataone Vwi-aotz--    4.00m dataone        0.00                                  
  vm-105-disk-1 dataone Vwi-aotz--   32.00g dataone        32.34                                
  vm-106-disk-0 dataone Vwi-a-tz--   32.00g dataone        23.39                                
  data          pve     twi-aotz-- <148.36g                0.42   1.08                          
  root          pve     -wi-ao----  <74.00g                                                      
  swap          pve     -wi-ao----    7.00g                                                      
root@pve:~# cat /etc/pve/storage.cfg
dir: local
        path /var/lib/vz
        content iso,vztmpl,backup
        prune-backups keep-last=5
        shared 0

dir: TrueNAS
        path /mnt/share/Server
        content rootdir,backup,snippets,vztmpl,images,iso
        prune-backups keep-all=1
        shared 1

lvmthin: dataone
        thinpool dataone
        vgname dataone
        content images,rootdir
        nodes pve

I hope thats better, this is the command I used followed by the error
root@pve:~# lvremove data
Volume group "data" not found
Cannot process volume group data

root@pve:/dev/pve# ls
root swap

there is no data folder/partition
 
Last edited:
sorry I got it using an unmount command even though the mounted lvm didnt exist. tried it a few times with an error but it finally worked using an extra backslash.
101 stuff I'm sure. I feel stupid now :/
 
  • Like
Reactions: bbgeek17

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!