Skip to content

Instantly share code, notes, and snippets.

@meena-erian
Created May 26, 2022 12:42
Show Gist options
  • Select an option

  • Save meena-erian/2c884e2517d15b441f2885f625462e78 to your computer and use it in GitHub Desktop.

Select an option

Save meena-erian/2c884e2517d15b441f2885f625462e78 to your computer and use it in GitHub Desktop.
How to create a new Ext4 partition and add it to proxmox to store any kind of resources on it
  1. Find the SCSI disk path under /dev ( sda, sdb, or sdc etc ..) (Lets assume it's sdb)
  2. Create a new partition that takes 100% of the available space parted -a opt /dev/sdb mkpart primary ext4 0% 100% Lets assume the newly created partition is sdb1
  3. Format the new partition. Lets say we will give it the label MyVolume mkfs.ext4 -L MyVolume /dev/sdb1
  4. Prepare a new mount point for the new partition mkdir -p /mnt/MyVolumeMount
  5. Add a new line to /etc/fstab to mount the new partition in the new mounting point LABEL=MyVolume /mnt/MyVolumeMount ext4 defaults 0 2
  6. Now that you have the new Ext4 partition mounted on the host linux OS, All you have to do is to add it in proxmox. You can either add it from the UI or from the terminal:
    • From the UI:
      • In the "Server View" on the left side, click on "Datacenter" >> "Storage" >> "Add" >> "Directory"
      • Assign an "ID" for the partition, And set the "Directory" as /mnt/MyVolumeMount, and under "Content" you can specify what resources can be stored on that volume. and in "Nodes" you should only specify the Node on which the volume is.
    • From the terminal:
      • pvesm help
@rubentme
Copy link

rubentme commented Oct 2, 2024

It's worked instruction for me.
But you fogot to add after point 4 mount /dev/sdb1 /mnt/MyVolumeMount.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment