Partitioning help: separate root and data volumes?

lxrootard

New Member
Oct 12, 2022
23
2
3
Hello
Pardon my dumb question, I'm a newbie with Proxmox and I haven't been able to find an answer on the forum:
How do I separate my root volume from the data one in which I'd like to store all content (VMs, dumps, iso...)?

I'm having the following issue at boot (see attached picture):
timeout waiting for device /dev/pve/data

I have defined and formatted a new data LV:
Code:
NAME               MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
nvme0n1            259:0    0 465.8G  0 disk
├─nvme0n1p1        259:1    0  1007K  0 part
├─nvme0n1p2        259:2    0   512M  0 part /boot/efi
└─nvme0n1p3        259:3    0 465.3G  0 part
  ├─pve-root       253:0    0    16G  0 lvm  /
  ├─pve-data_tmeta 253:1    0   4.3G  0 lvm
  │ └─pve-data     253:3    0 424.3G  0 lvm  /var/lib/vz
  └─pve-data_tdata 253:2    0 424.3G  0 lvm
    └─pve-data     253:3    0 424.3G  0 lvm  /var/lib/vz

and added an entry in /etc/fstab:
Code:
/dev/pve/root / ext4 errors=remount-ro 0 1
/dev/pve/data /var/lib/vz ext4 defaults 0 1
UUID=AC05-2B7C /boot/efi vfat defaults 0 1
proc /proc proc defaults 0 0

I can mount /dev/pve/data successfully manually but this does not happen at boot time
I suspect I must edit /etc/pve/storage.config, not sure how (I've tried suppressing the 2nd entry without success)?
Code:
dir: local
        path /var/lib/vz
        content iso,vztmpl,backup

#lvmthin: local-lvm
#       thinpool data
#       vgname pve
#       content rootdir,images

Thanks
 

Attachments

  • IMG_1354.jpg
    IMG_1354.jpg
    167.7 KB · Views: 3
Hi there
Nobody has replied.
How do I split root and data volumes under Proxmox?

From the official doc:
> Starting from version 4.2, the logical volume “data” is a LVM-thin pool, used to store block based guest images, and /var/lib/vz is simply a directory on the root file system

So I guess I can't mix images (block FS) with /var/lib/vz (files)? Should I create a separate vz volume to be mounted as /var/lib/vz?
 
Last edited:
Why disable the lvm-thin storage and try to mount the pve-data volume? Which doesn't contain a file system unless you formatted it.
The installer provides these defaults to have a thin provisioned LVM to store container and VM disk images directly in LVs.

If you do prefer your very custom disk layout, you might be faster installing a basic Debian and install Proxmox VE afterwards to convert it to a Proxmox VE server. The Debian installer lets you create very customized disks layouts, while the Proxmox VE installer is biased.
 
Why disable the lvm-thin storage and try to mount the pve-data volume? Which doesn't contain a file system unless you formatted it.
The installer provides these defaults to have a thin provisioned LVM to store container and VM disk images directly in LVs.

If you do prefer your very custom disk layout, you might be faster installing a basic Debian and install Proxmox VE afterwards to convert it to a Proxmox VE server. The Debian installer lets you create very customized disks layouts, while the Proxmox VE installer is biased.
hello @aaron

This was a mistake indeed. I've suppressed the comments and created a new vz LV since:
Code:
dir: local
        path /var/lib/vz
        content iso,vztmpl,backup

lvmthin: local-lvm
        thinpool data
        vgname pve

Code:
root@nuc> lsblk
NAME                 MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
nvme0n1              259:0    0 465.8G  0 disk
├─nvme0n1p1          259:1    0  1007K  0 part
├─nvme0n1p2          259:2    0   512M  0 part /boot/efi
└─nvme0n1p3          259:3    0 465.3G  0 part
  ├─pve-root         253:0    0    16G  0 lvm  /
  ├─pve-data_tmeta   253:1    0   4.3G  0 lvm
  │ └─pve-data-tpool 253:3    0 424.3G  0 lvm
  │   ├─pve-data     253:4    0 424.3G  1 lvm
  │   └─pve-vz       253:5    0    50G  0 lvm  /var/lib/vz
  └─pve-data_tdata   253:2    0 424.3G  0 lvm
    └─pve-data-tpool 253:3    0 424.3G  0 lvm
      ├─pve-data     253:4    0 424.3G  1 lvm
      └─pve-vz       253:5    0    50G  0 lvm  /var/lib/vz

However I couldn't restore my backup:
Code:
restore vma archive: zstd -q -d -c /var/lib/vz/dump/vzdump-qemu-100-2022_12_01-14_36_01.vma.zst | vma extract -v -r /var/tmp/vzdumptmp32185.fifo - /var/tmp/vzdumptmp32185
CFG: size: 546 name: qemu-server.conf
DEV: dev_id=1 size: 8589934592 devname: drive-scsi0
CTIME: Thu Dec  1 14:36:02 2022
error before or during data restore, some or all disks were not completely restored. VM 100 state is NOT cleaned up.
TASK ERROR: command 'set -o pipefail && zstd -q -d -c /var/lib/vz/dump/vzdump-qemu-100-2022_12_01-14_36_01.vma.zst | vma extract -v -r /var/tmp/vzdumptmp32185.fifo - /var/tmp/vzdumptmp32185' failed: Content type 'images' is not available on storage 'local'

It seems it's trying to restore it on local (eg the new vz directory), not on the local-lvm thin pool?
[EDIT] Solved, I've found out I did'nt select it in the restore menu
Thanks for your help
 
Last edited:
  • Like
Reactions: aaron

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!