create disk image containing lvm-thin on nfs share

HolgerZ

New Member
Jun 27, 2023
9
0
1
Hi, I'm new to linux and proxmox and made a mistake when installing proxmox. I have used the automatic setup, used 100GB as local and the rest of the 4TB disk as local-lvm, which was far too much. Now I want to shrink local-lvm to 900GB and want to use 3TB as Backup storage.

Sadly it seems simply shrinking local-lvm isn't an option, so I thought about using a disk-image on a nfs share as temporary local-lvm, delete the local local-lvm and recreate it with the correct size.

My main Problem is, that I'm about 800km away and help at the location apart from switching on devices is not available

Is the idea a possibility and maybe you have some hints how to do it

Thnx
 
Why not:
a) Create an LVM slice from existing LVM pool (lvm-local)
b) Format this new logical volume with your favorite filesystem
c) Add it to /etc/fstab and mount
d) Use it for any purpose you want

P.S. "local-lvm" carries a specific meaning in the context of PVE and in general. It refers to LVM software suite that is used in conjunction with raw block storage. Your NFS is file storage. You could create a file on NFS storage, then attach it as a loop device and place LVM on it, but it doesnt seem necessary or practical to go to those lengths.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Thanks for your reply, but I don't understand anything o_O

The link you provided seems to delete all data on local-lvm - my point to do this is to keep the data in local-lvm up and running while shrinking local-lvm.

I have no idea of what you mean with the loop device :eek:

If it doesn't seem necessary or practical, what would the practical alternative be?
 
The link you provided seems to delete all data on local-lvm - my point to do this is to keep the data in local-lvm up and running while shrinking local-lvm.
The link leads you to a general guide on using LVM, that you should try to understand before running any commands. Executing wrong command can lead to data loss.

Specifically the link was constructed to highlight point (3):
Code:
[LIST=1]
[*]Create the logical volume from the volume group you have created. The following command creates the logical volume new_logical_volume from the volume group new_vol_group. This example creates a logical volume that uses 2 gigabytes of the volume group.


# lvcreate -L 2G -n new_logical_volume new_vol_group
  Logical volume "new_logical_volume" created
[/LIST]

I have no idea of what you mean with the loop device
https://askubuntu.com/questions/483009/mounting-disk-image-in-raw-format

If it doesn't seem necessary or practical, what would the practical alternative be?
The process I described in steps a-d is the practical alternative based on the set of facts and wants that you presented.



Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Thank you

I think I understand the loop device already

reading further documentation now ;)
 
If you have NFS storage available, why do you want to over-complicate it with loop devices and lvm?
Why not just designate NFS as "disk image" storage and migrate your VM disks there as "raw" or "qcow" format? Then re-configure your local-lvm as needed.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
If you have NFS storage available, why do you want to over-complicate it with loop devices and lvm?
Why not just designate NFS as "disk image" storage and migrate your VM disks there as "raw" or "qcow" format? Then re-configure your local-lvm as needed.
Is it really that easy? I thought the lvm is needed...

Thanks, that's the hint I needed, great :cool:
 

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!