Add additional disks to Proxmox 4.4

Radu

Member
Jan 17, 2020
1
0
6
41
Hi everyone,

A new client of ours has a Proxmox 4.4 server and he is running out of space and i am a complete beginner to it.

I can see he has 3 disks: sda/sdb/sdc

Now by searching around i found a few commands on how to get the current settings

root@VPS1:~# pvs
PV VG Fmt Attr PSize PFree
/dev/sda3 pve lvm2 a-- 953.00g 0


root@VPS1:~# vgs
VG #PV #LV #SN Attr VSize VFree
pve 1 3 0 wz--n- 953.00g 0

root@VPS1:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
data pve -wi-ao---- 849.00g
root pve -wi-ao---- 96.00g
swap pve -wi-ao---- 8.00g


root@VPS1:~# pvdisplay
--- Physical volume ---
PV Name /dev/sda3
VG Name pve
PV Size 953.00 GiB / not usable 1.98 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 243967
Free PE 0
Allocated PE 243967
PV UUID xubVk2-Xl0E-oA9K-RVBs-rQlC-rhpb-vvOs5k


root@VPS1:~# lvdisplay
--- Logical volume ---
LV Path /dev/pve/swap
LV Name swap
VG Name pve
LV UUID YBsZGn-9tT5-S5jP-wfay-1WFn-k6kp-38VNGm
LV Write Access read/write
LV Creation host, time proxmox, 2019-12-10 11:37:14 -0500
LV Status available
# open 2
LV Size 8.00 GiB
Current LE 2048
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 251:1

--- Logical volume ---
LV Path /dev/pve/root
LV Name root
VG Name pve
LV UUID vLedN4-c8QH-so8C-jkGO-a4K0-jrUI-f7ERd0
LV Write Access read/write
LV Creation host, time proxmox, 2019-12-10 11:37:14 -0500
LV Status available
# open 1
LV Size 96.00 GiB
Current LE 24576
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 251:0

--- Logical volume ---
LV Path /dev/pve/data
LV Name data
VG Name pve
LV UUID B73ftd-aM04-rGT6-zAnE-J4Wk-YBlt-fwQi0Y
LV Write Access read/write
LV Creation host, time VPS1, 2019-12-11 10:56:27 -0500
LV Status available
# open 1
LV Size 849.00 GiB
Current LE 217343
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 251:2


root@VPS1:~# cat /etc/fstab
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/pve/root / ext4 errors=remount-ro 0 1
/dev/pve/data /var/lib/vz ext4 defaults 0 1
/dev/pve/swap none swap sw 0 0
proc /proc proc defaults 0 0
From what i can see the two big disks are not in use at all

This is currently the storage config

root@VPS1:~# cat /etc/pve/storage.cfg
dir: local
path /var/lib/vz
maxfiles 0
content images,rootdir,iso,vztmpl
shared 0


Can someone tell me how i could add these two disks into Proxmox as separate storage?

I want one to be used for images just like "local" and the second disk to be used for local backups.

Is it better to use dir/LVM/LVM-thin?


I need some help with someone who could guide me on how to add these disks without damagin/breaking the existing "local" directory mostly since the images do not currently have a backup

I also found this link:
https://www.hostfav.com/blog/index.php/2017/02/01/add-a-new-physical-hard-drive-to-proxmox-ve-4x-5x/

but it is only working for drives smaller than 2 TB and i am not sure if i add the LVM and select disk image, will it break the "local" dir or not?

Please advise

Thank you
 

Attachments

  • disks.PNG
    disks.PNG
    16.6 KB · Views: 4
Last edited:
If you want to use the two disks seperately, there is no risk to your existing 'local' storage. Just format them as a new LVM disk and mount it, like on regular debian. Then, add a 'directory' type storage (or use the LVM volume group directly as type 'LVM' storage, but if you want to copy your existing 'local' storage configuration, use 'directory') with the path pointing to wherever you mounted the LVM volume.

You can also forgo LVM entirely and just format your drives as bog-standard ext4 and mount that via '/etc/fstab' (and then add it as a 'directory' storage), for ultimate simplicity (without any of the features of LVM of course).

Another option would be to add your new drives to your LVM pool (read up on pvcreate/vgextend/lvextend/resize2fs). This would essentially turn your three drives into one single 'big drive' in software, where you could store backups, image, and everything else directly onto your 'local' storage. Keep in mind though, that LVM in that case has no consistency guarantees (unlike RAID or ZFS for example), i.e. if one platter fails, all of your data might become inaccessible.

I suggest you read through our documentation on the topic to get a proper understanding of how PVE handles storage :)
 

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!