Adding Hard Disk in PVE

nemo123

New Member
Oct 21, 2021
4
0
1
I have PVE 6.4.8 and tried via GUI to normal "add" a hard disk to a machine
1655739155697.png


It is not shown with the command:
df -h
1655738703800.png


but with this command I can see some disk in sdb in this case:
lsblk
1655738721718.png


Do I need to format/resize something or mount anything in that VM

Is my root "/" partition wrong configured maybe ?
 
Last edited:
Think of it as if you are adding a new physical disk to a physical computer. Yes - you need to partition, format and mount it. You could also be using volume manager, such as LVM and then then the steps are a little different. This is not PVE specific but basic Linux management. There are many articles online on how to present new disk to your application.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
  • Like
Reactions: nemo123
Think of it as if you are adding a new physical disk to a physical computer. Yes - you need to partition, format and mount it. You could also be using volume manager, such as LVM and then then the steps are a little different. This is not PVE specific but basic Linux management. There are many articles online on how to present new disk to your application.


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

Thank you very much for your reply.
Thta´s what I was thinking about too.

The main point is to extend a partition or add a new one and write on it.

What I did was:
1. Create a new GPT type partition for the new device sdb1 with the command fdisk
2. Format that new partition with mkfs.ext4
3. Mounted it
4. Inserted it to /etc/fstab/ to auto load the mount point
1656084805867.png
1656084788995.png

So now I have the device and a partition, but I am not able to write over the "/" root partition.
The case is when this "/" root partition gets full, I need another device to store my data automatically.
I filled up the sda1 partition by just inserting some files so that at the end I have no space left in sda1.
# failed: No space left on device
I thought it should be automatically fill up /dev/sdb1 but that was not the case.
Next I changed the mount point of /dev/sdb1 from /mnt/device1 to "/" root, but this was not solving the problem.

My researches brought me to make LVM but it gets more complicated.
https://numpangcopas.com/configure-lvm/


Is there a better/faster way to extend or resice partition/device?
 
Your research led you to the right place. To solve your particular challenge (more space for existing filesystem) you have two options:
1) extend the underlying root LVM
- delete the new mountpoint
- delete the partition
- use LVM guides to extend the LVM for root filesystem
2) Determine what eats your space, ie /var/database is taking 90% of your space (cd /;du -h -x -d1 .)
- mount the new disk to /var/data
- move the data from /var/dabatase to /var/data
- unmount both
- mount new disk to /var/data, update fstab

Note, these are very high level and by no means a full step-by-step. Many things can go wrong...


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

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!