Saturday, December 14, 2013

How to add extra local storage in Proxmox VE

Purpose:

Adding more local hard drives to Proxmox for storage purposes.





Used Software:

Proxmox VE 3.1

Necessary:

Extra added hard drives without partitions.

Installation:

SDA is the drive where the proxmox installation is running
SDB is the new drive that will be added to the proxmox.

- Open the Proxmox Shell

With fdisk you can find your drives that you want to add, if you are not sure what the device name is for your hard drive that you want to add. 

Type: fdisk -l


Find the "Disk" with no valid partition table. That will be probably your hard drive you want to add.

        "Disk /dev/sdb doesn't contain a valid partition table"

To make a partion on the new drive type the following:

T   - type cfdisk /dev/sdb

Choose the following options:

New - Primary - Specify size in MB
Write
Quit

Now a physical volume has to be created.

- type pvcreate /dev/sdb1

Create a volume group. The name "Data-Storage" is an example. You can name it anyway you want. Consider a logical name, because this is the name that will be used in the proxmox web interface:

Type: vgcreate Data-Storage /dev/sdb1

Add the storage in ProxMox

 
-       In the webinterface click on the directory Datacenter and then click
        on tab Storage.

-       Click AddLVM Group

o    Type an ID Name for example data-storage

o    Base Storage: Existing Volume Groups

o    Volume Group: Data-Storage

o    Enabled: Checked

o    Other options should be adjusted accordenly to what you want
      with it. 

Now the extra storage has been added in Proxmox and ready for use.
 

16 comments:

Gramz said...
This comment has been removed by the author.
V.Kamphuis said...

I'm glad this post helped you.

Unknown said...

Great!
Thanks for sharing, I was looking for this and i found it very clear, keep up the good work!

take care.

V.Kamphuis said...

Thanks for the positive feedback ;)

Unknown said...

Thanks!!! very clear and easy to understand.

V.Kamphuis said...

Thanks! :D

Unknown said...

Thanks, clear and concise.

Echarquero said...

Obrigado amigo, funciona perfeitamente. Deus te abençôe!

Satej Desai said...

Thanks for your work !!!!!, I tried it in Proxmox 4.2-2, and it worked like charm. Keep up your good work.

Unknown said...

Thanks. Very helpful.

Unknown said...

Thanks. Very helpful

Aloi95 said...

Thank you very much! extremely helpful.

Unknown said...

Great.
Thank you very much.

Unknown said...

What if the SDA that shows up is the drive I intended to install as a storage bin?

Aidemtek said...

Is there a way to add a drive without wiping it, I have a ntfs drive with all my plex media on it. I know ntfs is not the way to go i just need this to work for a litte bit before my new drives show up.

V.Kamphuis said...

Yes that should be possible, but like you already mentioned yourself not recommended in this case.

Install NTFS-3G
type: apt-get install ntfs-3g

Mount the drive:
locate the backup drive. In this case sdb (2.0TB - backup drive)
> fdisk -l

> mkdir /mnt/local-backup
> mount -t ntfs-3g /dev/sdb1 /mnt/local-backup

In the Proxmox GUI:
-> Datacenter -> Storage -> Add
-> Directory
> ID [backup-disk]
> Directory /mnt/local-backup
-> Content VZDump backup File
> Max Backups 1
-> Add

Keep in mind i did not test this.
I can not held responsible for any data-loss!

More info on the subject:
https://linuxconfig.org/how-to-mount-partition-with-ntfs-file-system-and-read-write-access

Good Luck!