[SOLVED] Change Partitioning after fresh install

Belfaigore

New Member
Jan 3, 2024
3
0
1
Hi everyone,

I just make a fresh install of Proxmox from Proxmox 8.1 ISO during installation I setup disk as below :

partition_after_fresh_install.png

But this partitioning doesn't suit me; I'd like to implement the one below :

partition_wanted.png

Can I do it after installation throw Proxmox ISO, or do I have to install Proxmox from Debian (during Debian installation, I can use the partion tools) ?
I try to rename LV and VG ( and update Grub paths) ; but I observe, linux initialisation is more slower (from 5s to more than 30s) do you know if some other path need to be updated ?

I try (with GParted) to reduced EFI System wich is in FAT32, but GParted want to convert to FAT16 (FAT32 don't allow partition less than 1Go ?) ; do you know if ther any issu doing this ?

I try to use Proxmox administration interface to setup LVM / LVM-Thin but I can't select drive ; dropdown list is always empty.

I would like to store my CTs an VMs as LV inside lv_vm instead of files into /var/lib/vz.

Thank you for your help, please execuze my syntax, I'm french user.
 
Last edited:
Ok so I spend all the day but I finaly found all what I want :

A] Renaming volume
Bash:
# Act as root
su -

# 1. Disable SWAP
swapoff

# 2. Rename Logical Volume
lvrename /dev/pve/swap /dev/pve/lv_swap
lvrename /dev/pve/root /dev/pve/lv_pve
lvrename /dev/pve/data /dev/pve/lv_vz

# 3. Rename Volum Group
vgrename /dev/pve /dev/vg_nvme

#4. Edit GRUB configuration file (update new path)
nano /boot/grub/grub.cfg
#   -> replace `pve-root` by `vg_nvme-lv_pve`

#5. Edit Filesystem table (update new path)
nano /etc/fstab
#   -> replace `/dev/pve/root` by /dev/vg_nvme/lv_pve
#   -> replace `/dev/pve/swap` by /dev/vg_nvme/lv_swap

#6. Enable Swap (recreate mapping)
mkswap /dev/vg_nvme/lv_swap
swapon /dev/vg_nvme/lv_swap

#7. All done, you can restart
reboot

## Check
lsblk

B] Rearrange volumes
Bash:
# 1. Because LVM-Thin cannot be resize (not yet) we gonna remove `lv_vz` and recreate it
lvremove /dev/vg_nvme/lv_vz
# We recreate LVM-ThinPool of 350GB with 4GB for metadata (~10%) (we win freespace)
lvcreate -L 300G --thinpool lv_vz --poolmetadatasize 3G vg_nvme

# 2. Create `lv_source` to /var/lib/vz/source
lvcreate -L 20G -n lv_source vg_nvme
mkfs -t ext4 /dev/vg_nvme/lv_source
mkdir /var/lib/vz/source
echo "/dev/vg_nvme/lv_source /var/lib/vz/source ext4 defaults 0 2" >> /etc/fstab
systemctl daemon-reload
mount /var/lib/vz/source

# 3. Create `lv_backup` to /var/lib/vz/backup (it's a backup volume, no execution, etc...)
lvcreate -L 100G -n lv_backup vg_nvme
mkfs -t ext4 /dev/vg_nvme/lv_backup
mkdir /var/lib/vz/backup
echo "echo "/dev/vg_nvme/lv_backup /var/lib/vz/backup ext4 nodev,noexec,nosuid 0 2" >> /etc/fstab
systemctl daemon-reload
mount /var/lib/vz/backup

C] Rearrange/Create storage via Proxmox administration interface and associate content with storage :
- Create storage local-backup, of type Directory, pointed on /var/lib/vz/backup, with content VZDump backup file
- Create storage local-source, of type Directory, pointed on /var/lib/vz/source, with content ISO image, Container template
- Create storage local-vz, of type Thin, pointed on lv_vz, with content Disk Image, Container
- Edit storage local, remove all content (already manage by the other storage), only leave Snippet

partition_proxmox_finaly.png
 

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!