[SOLVED] How to use a new logical volume for VM / Container backup

bond347

Member
Oct 21, 2022
64
0
6
Hi All,

I have created 2 logical volumes (data and backup) from the pve2 volume group.
I converted the data lv to a thin pool and on proxmox mgmt gui add it as storage called local-lvm. This local-lvm content type was disk and container image.

Question is, how could i create storage on proxmox mgmt gui for backup lv and mark the content type for backup, iso, etc.?

Hope someone can help me out.

root# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 3.5T 0 disk
├─pve2-backup 253:0 0 500G 0 lvm
├─pve2-data_tmeta 253:1 0 15.8G 0 lvm
│ └─pve2-data 253:5 0 2.5T 0 lvm
└─pve2-data_tdata 253:4 0 2.5T 0 lvm
└─pve2-data 253:5 0 2.5T 0 lvm
sdb 8:16 0 223.5G 0 disk
├─sdb1 8:17 0 1007K 0 part
├─sdb2 8:18 0 512M 0 part /boot/efi
└─sdb3 8:19 0 223G 0 part
├─pve-swap 253:2 0 8G 0 lvm [SWAP]
└─pve-root 253:3 0 198.8G 0 lvm /


root# pvs
PV VG Fmt Attr PSize PFree
/dev/sda pve2 lvm2 a-- 3.49t 484.12g
/dev/sdb3 pve lvm2 a-- 223.00g 16.25g



root# vgs
VG #PV #LV #SN Attr VSize VFree
pve 1 2 0 wz--n- 223.00g 16.25g
pve2 1 2 0 wz--n- 3.49t 484.12g



root# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root pve -wi-ao---- 198.75g
swap pve -wi-ao---- 8.00g
backup pve2 -wi-a----- 500.00g
data pve2 twi-a-tz-- 2.50t 0.00 0.17
 
Hi All,

I have created 2 logical volumes (data and backup) from the pve2 volume group.
I converted the data lv to a thin pool and on proxmox mgmt gui add it as storage called local-lvm. This local-lvm content type was disk and container image.

Question is, how could i create storage on proxmox mgmt gui for backup lv and mark the content type for backup, iso, etc.?

Hope someone can help me out.

root# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 3.5T 0 disk
├─pve2-backup 253:0 0 500G 0 lvm
├─pve2-data_tmeta 253:1 0 15.8G 0 lvm
│ └─pve2-data 253:5 0 2.5T 0 lvm
└─pve2-data_tdata 253:4 0 2.5T 0 lvm
└─pve2-data 253:5 0 2.5T 0 lvm
sdb 8:16 0 223.5G 0 disk
├─sdb1 8:17 0 1007K 0 part
├─sdb2 8:18 0 512M 0 part /boot/efi
└─sdb3 8:19 0 223G 0 part
├─pve-swap 253:2 0 8G 0 lvm [SWAP]
└─pve-root 253:3 0 198.8G 0 lvm /


root# pvs
PV VG Fmt Attr PSize PFree
/dev/sda pve2 lvm2 a-- 3.49t 484.12g
/dev/sdb3 pve lvm2 a-- 223.00g 16.25g



root# vgs
VG #PV #LV #SN Attr VSize VFree
pve 1 2 0 wz--n- 223.00g 16.25g
pve2 1 2 0 wz--n- 3.49t 484.12g



root# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root pve -wi-ao---- 198.75g
swap pve -wi-ao---- 8.00g
backup pve2 -wi-a----- 500.00g
data pve2 twi-a-tz-- 2.50t 0.00 0.17
Hi, in order to store files such as isos or backups you will have to create a filesystem, meaning a directory based storage on top of your LVM.
 
  • Like
Reactions: bond347
Hi, in order to store files such as isos or backups you will have to create a filesystem, meaning a directory based storage on top of your LVM.
Hi Chris,

Thanks for your reply.
I'm still new to Proxmox and Linux. Hope you don't mind guiding me. Do the following steps are correct? and please add should i missed the filesystem check or other steps.

1. # mkfs.ext4 /dev/pve2/backup
2. # mkdir /mnt/pve2backup
3. # mount -t ext4 /dev/pve2/backup /mnt/pve2backup/
4. Create Directory-based storage from proxmox mgmt gui
 
Hi Chris,

Thanks for your reply.
I'm still new to Proxmox and Linux. Hope you don't mind guiding me. Do the following steps are correct? and please add should i missed the filesystem check or other steps.

1. # mkfs.ext4 /dev/pve2/backup
2. # mkdir /mnt/pve2backup
3. # mount -t ext4 /dev/pve2/backup /mnt/pve2backup/
4. Create Directory-based storage from proxmox mgmt gui
Hi,
yes these steps are right... The only further step to consider is to add a fstab entry for the filesystem to be mounted on boot, otherwise you will have to do this manually every time you reboot
 
  • Like
Reactions: bond347

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!