New additional hard drive

Kynao

Member
Dec 21, 2010
48
2
6
Hi,

I use Proxmox since release 1.3 where vm are installed on a main sata harddrive.
Today i added a second sata harddrive i would like to use as a backup for the vm.
So i added a preformated ext3 drive but proxmox does not sse it, how can i do to male it usable to Proxmox ?
 
first, upgrade your system. 1.3 is very outdated.

to your question:
just mount your drive somewhere (add it to /etc/fstab via the console) and then use the gui to add this dir as backup storage.
 
lol, i'm not in 1.3, i'm in 1.7, i simply use proxmox since 1.3.
Yes, i'am searching how to mount it :)
 
Ok, so i know nothing about linux so my steps are risky :))
First i use fdisk -l to see where is my second harddrive :)
Then did a mkfs.ext3 -j /dev/sdb, apparently proxmox still works so my vm are not deleted.

I wait for the end to try a mount /dev/sdb /etc/fstab if that makes any sense :)

Edit : That didn't work, i have mount point /etc/fstab is not a directory, you meant i have to create the directory ?
 
Last edited:
Ok, so i know nothing about linux so my steps are risky :))
First i use fdisk -l to see where is my second harddrive :)
Then did a mkfs.ext3 -j /dev/sdb, apparently proxmox still works so my vm are not deleted.

I wait for the end to try a mount /dev/sdb /etc/fstab if that makes any sense :)

Edit : That didn't work, i have mount point /etc/fstab is not a directory, you meant i have to create the directory ?
Hi,
what do you want to do with the second disk? If you want to use space for kvm-guest, you can install a separate lvm on the disk. If you simple want to expand your /var/lib/vz you can easily use the second disk for that (also lvm).
For a filesystem you should use a partition-table: create a partition - then you have sdb1:
fdisk /dev/sdb
mkfs.ext3 /dev/sdb1
mkdir /data
mount /dev/sdb1 /data

to make the mount "rebootable" you must use an entry in /etc/fstab.
take a look with "cat /etc/fstab"

Udo
 
Proxmox propose to define backup jobs, so i simply would like to use the second drive for that purpose.
 
How do you do this?
Hi,
asuming that your second disk is sdb, create an partition (type 8e) o the disk
Code:
fdisk /dev/sdb
see "man fdisk" and "man lvm"
create a physical volume:
Code:
pvcreate /dev/sdb1
look before for space:
Code:
vgdisplay pve
extend the volumegroup:
Code:
vgextend pve /dev/sdb1
and look with vgdisplay again.

Udo
 
Last edited:
Thanks for the great info! So should the pve storage group be added to the storage in the web interface? What is the difference of using pve vs the directory that the system created by default set up?
 
and drive is not important ? i can do mkdir /data from anywhere ?
Drive???
proxmox runs on linux not windows!
On *nix the root is / - all things are below the root. during boot was a filesystem mounted on / - this is in case of pve the logical volume pve-root.

With "mkdir /data" (which is only an example btw.) you only create an empty directory with the name data on the filesystem directly under / - not more and not less.

Perhaps you should buy an linux-beginners book?

Udo
 
Thanks for the informations Udo
Of course i need to read Linux books, and also so many books on so many subjects
but that would be overkill just to install a second hard drive on a proxmox system,
one day i will do overkill my pleasure, in the meantime, i continue to improve my developer skills.
Thanks again
 
Hi,
asuming that your second disk is sdb, create an partition (type 8e) o the disk
Code:
fdisk /dev/sdb
see "man fdisk" and "man lvm"
create a physical volume:
Code:
pvcreate /dev/sdb1
look before for space:
Code:
vgdisplay pve
extend the volumegroup:
Code:
vgextend pve /dev/sdb1
and look with vgdisplay again.

Udo

I have done all that, it works great, see below:

proxmox:~# vgdisplay pve
--- Volume group ---
VG Name pve
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 6
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 2
Act PV 2
VG Size 931.02 GB
PE Size 4.00 MB
Total PE 238340
Alloc PE / Size 237317 / 927.02 GB
Free PE / Size 1023 / 4.00 GB
VG UUID JsejWr-qd1N-kH2J-gPnb-0jMO-XfBc-kt7faI

proxmox:~#

OK, but when I look at the website for proxmox, I cannot see the extra storage anywhere:

iarrdown.png
Storage List

Storage NameTypeEnabledActiveSharedUsed (GB)Capacity (GB)
tarrdown.png
localDirectoryYesYesNo13.29355.59
3.74%​

What am I doing wrong here?
 
I have done all that, it works great, see below:



OK, but when I look at the website for proxmox, I cannot see the extra storage anywhere:



What am I doing wrong here?
Hi,
because you don't defined an extra storage. You only expand an exsisting storage.

Your vg show only 4GB free (min. space required for backup (snapshot)) - so I assume you have allready expand your logical viólume (pve-data)?
What show following commands
Code:
pvs
vgs
lvs
Udo
 
proxmox:~# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 pve lvm2 a- 465.26G 4.00G
/dev/sdb1 pve lvm2 a- 465.76G 0
proxmox:~# vgs
VG #PV #LV #SN Attr VSize VFree
pve 2 3 0 wz--n- 931.02G 4.00G
proxmox:~# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
data pve -wi-ao 827.02G
root pve -wi-ao 96.00G
swap pve -wi-ao 4.00G
proxmox:~#
 
proxmox:~# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 pve lvm2 a- 465.26G 4.00G
/dev/sdb1 pve lvm2 a- 465.76G 0
proxmox:~# vgs
VG #PV #LV #SN Attr VSize VFree
pve 2 3 0 wz--n- 931.02G 4.00G
proxmox:~# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
data pve -wi-ao 827.02G
root pve -wi-ao 96.00G
swap pve -wi-ao 4.00G
proxmox:~#
Arghh,
there was an misunderstanding on my side. You don't want to see an extra storage but more space!

I assume you forgot to extend your filesystem on the pve-data volume.
Use simply
Code:
df -h /var/lib/vz
resize2fs /dev/mapper/pve-data
df -h /var/lib/vz
Udo
 
That worked ... it was teh resize2fs c0mmand, I new I was forgeting to do something! (I have shrunken vmware HD's this way ... so I knew roughly what to do with proxmox) but of course I forgot the resize ... thanks a ton man.

proxmox:~# resize2fs /dev/mapper/pve-data
resize2fs 1.41.3 (12-Oct-2008)
Filesystem at /dev/mapper/pve-data is mounted on /var/lib/vz; on-line resizing required
old desc_blocks = 23, new_desc_blocks = 52
Performing an on-line resize of /dev/mapper/pve-data to 216798208 (4k) blocks.
The filesystem on /dev/mapper/pve-data is now 216798208 blocks long.


proxmox:~# df -h /var/lib/vz
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/pve-data 815G 14G 801G 2% /var/lib/vz
proxmox:~#
 

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!