Add secondary Space disk

Mickael Picasa

New Member
Aug 22, 2012
5
0
1
Paris, France
Hello all, i have a bad english but i try to speak with you for explain my problem


I have install promox in dedicated server 80 go ssd with proxmox 2.1, after the installation i have create 5 virtual machine


And after 1 week i have used all the space of my primary partition ssd 80 gb


I have buy additional disk 500 gb sata and i have contacted the support for the installation but the support don't know how to add additional disk with proxmox


I really need help for add a additional disk because i don't know how to do :S


Please don't share me a link, i have showed lot of thread and i have find nothing good.


I am available 24/24 7/7 i can send you my teamviewer id or other


Thanks a lot for anything help, love


First Mail of the support :


oot@proxmox:~# fdisk -lu


Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000


Disk /dev/sda doesn't contain a valid partition table


Second Mail of the support :


I have partitioned it.


Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x488f49dc


Device Boot Start End Blocks Id System
/dev/sda1 63 976768064 488384001 83 Linux


Last Mail of the support :


I already partitioned it, but I don't know how to use it for you system either.
 
First: I don't assume any responsibility for data loss or whatever if you follow my instructions, I could be wrong/have mistyped something
Second: is strange that your SECOND hard disk is /dev/sda and not /dev/sdb, but let's assume that is correct
What I would do for better performance is explained here:
http://pve.proxmox.com/wiki/Storage_Model#LVM_Groups_with_Local_Backing
(you should point your support to it)
So you should:
partition the hd setting the "type" flag to LVM (and not 83 linux as you did), i.e. tell them to remove the partition and re-create it, or set that flag with fdisk.
I, on a unpartitioned hd I would do:
Code:
# parted -a optimal /dev/sda
> mklabel msdos
> mkpart primary ext3 1 -1
> set 1 lvm on
> print
Model: Whatever :)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End    Size   Type     File system  Flags
 1      1049kB  500GB  500GB  primary               lvm
> quit
Then create the physical volume (pv):
Code:
# pvcreate /dev/sda1
  Physical volume "/dev/sda1" successfully created
Second, create a volume group (vg):
Code:
# vgcreate secondhd /dev/sda1
  Volume group "secondhd" successfully created
#
where "secondhd" is just a label of your choice.
And finally: Add the LVM Group to the storage list via the web interface (storage -> add -> LVM, enter a DIFFERENT label, like 'pve2' and select the "secondhd" volume group.
Then, when you are asked about storage for a new VM, you can select pve OR pve2.
This gives you a lvm based storage that does not produces VM files but logical volumes, faster for I/O but a bit more complex to manage from command line.

Instead of the above, different options are: enlarge your current "pve" volume group (you can't do "online", should boot with a live distro and do, too complicated to explain here), or just format /dev/sda1 as ext3 and edit fstab to mount somewhere (i.e. /mnt/second). Then from web interface, you can add that directory and flag it as images + containers. In this last case your VM will be stored as files, like the ones you have in pve right now.