Return to Level1Techs.com

Adding a second HDD to Proxmox?


#1

I want to store surveillance footage on a separate HDD on Proxmox. There is surprisingly no straightforward/clean way of adding a second, third, etc drives to Proxmox and making them show up in the GUI.


#2

This really is an odd failing that has been around since Proxmox moved to their new interface. So here are three ways you can do this, all of which involve ssh'ing into your Proxmox box. Assuming /dev/sdb is your new disk.

If you want to use LVM.
ssh into your Proxmox box and do,

pvcreate /dev/sdb
vgcreate myvolgroup /dev/sdb

At this point you can go into the Proxmox GUI, Datacenter -> Storage -> Add: LVM, and you will see your volume group show up in the drop down menu.

If you want to use ZFS (my own personal recommendation).
ssh into your Proxmox box and do,

zpool create -f myzpool /dev/sdb

At this point you can go into the Proxmox GUI, Datacenter -> Storage -> Add: ZFS, and you will see your zpool in the ZFS Pool drop down menu.

If you want to just straight up use disk partitions 1995 style
ssh into your Proxmox box and do,

cfdisk /dev/sdb
Follow the instructions to use cfdisk to create a partition on /dev/sdb so you get /dev/sdb1. Make sure to write your changes!
mkfs.ext4 /dev/sdb1
mkdir /mnt/myseconddisk
ls -lah /dev/disk/by-uuid/
Locate sdb1's UUID and copy it
Edit /etc/fstab and add an entry similar to,
UUID=yourlonguuidhere /mnt/myseconddisk ext4 defaults 0 0
Write your changes to /etc/fstab and then,
mount -a

At this point /dev/sdb1 should be mounted to /mnt/myseconddisk, and will remount automatically on reboot. Now go into your Proxmox GUI, Datacenter -> Storage -> Add: Directory. You will want to put /mnt/myseconddisk into the Directory text box, and you will now be able to put the stuff you choose onto this disk.

Edits:
Jesus christ, I should take more time writing these posts. So many errars!!!


LVM Storage Data Drive Can't Be Seen
#3

Fantastic!

I'm actually stuck with ext4 since I'm short on ram. I will try this in a few weeks. it's a future project.


#4

Yeah, short on ram rules out ZFS. But if you're in full on learning mode, I'd highly recommend looking into LVM. I cannot tell you how many Linux admins I've worked with in recent memory who still stick to /dev/sdXY (where X is a letter and Y is a number) because they got burned by LVM once and were afraid to touch it ever again.

Edit:
Oh you said project, not learning. Nevermind. It's been a long day. :slight_smile:


#5

I always did it the 1995 way :stuck_out_tongue: nice to know the more modern way


#6

A post was split to a new topic: LVM Storage Data


#7

7 month necro. Necro was well structured to be own topic. Has been moved. This thread is locked.