2 hard drives

Tylrs

New Member
Apr 18, 2011
4
0
1
Can someone please walk me through how to enable two hard drives on the server. I have seen recent posts pertaining to this but there was not a definite solution. Can someone provide code and instructions to do this task?

Thanks!
 
you need to specify more detailed what you want to achieve, then someone can point you in the right direction.
 
Thanks for the reply tom.

I would like additional storage for virtual machines. I have two hard drives installed in the computer, and need to get the second one to show up as a storage device on the GUI side of things. I have tried a few things in previous posts about adding additional hard drives, but none of those things worked out for me. I would like step by step instructions on how to add the hard drive/mount it in the console and then how to add it to the GUI.

Thanks in advance.
 
Hello Tylrs,

First, show us the output of fdisk -l from your Proxmox server.
As usual, paste here too the result of pveversion -v

Can you tell exactly where the problem is?
 
Sorry, I am a complete noob to all of this. How can I output my fdisk -l and pveversion -v to you?
 
Figured it out.

Here is fdisk -l


proxmox:~# fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sda1 * 1 66 524288 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 66 9729 77623872 8e Linux LVM

Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd53698cb

Device Boot Start End Blocks Id System
/dev/sdb1 1 9730 78148608 7 HPFS/NTFS

Disk /dev/dm-0: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 19.8 GB, 19864223744 bytes
255 heads, 63 sectors/track, 2415 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table

Disk /dev/dm-2: 51.0 GB, 51036291072 bytes
255 heads, 63 sectors/track, 6204 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-2 doesn't contain a valid partition table


And pveversion -v


proxmox:~# pveversion -v
pve-manager: 1.8-15 (pve-manager/1.8/5754)
running kernel: 2.6.32-4-pve
proxmox-ve-2.6.32: 1.8-32
pve-kernel-2.6.32-4-pve: 2.6.32-32
qemu-server: 1.1-30
pve-firmware: 1.0-11
libpve-storage-perl: 1.0-16
vncterm: 0.9-2
vzctl: 3.0.24-1pve4
vzdump: 1.2-11
vzprocps: 2.0.11-1dso2
vzquota: 3.0.11-1
pve-qemu-kvm: 0.14.0-2
ksm-control-daemon: 1.0-5
proxmox:~#
 
you see that you have an LVM on /dev/sda2. THis is good for what you want to do.

fdisk /dev/sdb and select n for new partition, p for primary, partition #1, then press t to change the type, and hit L to list the types, one of the types will be Linux LVM. ender the 2 digit code for it
create the lvm on /dev/sdb1 with pvcreate /dev/sdb1
extend the lvm onto sdb1 with vgextend pve /dev/sdb1
now increase the size of the lvm with lvextend --size +10GB -n /dev/mapper/pve-data and keep repeating until you get an error about not enough blocks, then do it in 1GB increments until you can't extend anymore.
now you need to resize the ext3 filesystem with resize2fs /dev/mapper/pve-data

then do a df -h to see your new drive space.
 
or instead of running the lvextend over and over until your drive is full, you can see how much space is unallocated with pvscan.
 

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!