Not enough disk space error when adding a disk on an empty volume?

VirtualMan

New Member
Jan 25, 2012
15
0
1
I've moved a disk from the default location under /var/lib/vz/images to a new volume with plenty of space:
Code:
# df
<snip>
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/VMDATA-VMDATA
                     479417128   4867312 450196844   2% /mnt
I deleted the old disk entry from the VM in the Proxmox web GUI but I've found that I can't just point it at a current file (at least in 1.9). So I tried to create a new disk but got an error, executing the command via SSH I got:
Code:
# /usr/sbin/qm set 101 --ide0 VMDATA:32,format=raw
setting parameters failed - not enough free space (0 < 33554432)
What's going on here?
 
Last edited:
Either you mount a file system and use that as 'Directory' storage, or you use LVM storage. In that case you need free PEs inside the volume group.
 
Either you mount a file system and use that as 'Directory' storage, or you use LVM storage. In that case you need free PEs inside the volume group.

As you can see it's in LVM storage and I added it in the web GUI as LVM (not directory) but for some reason it shows it as being 100% full. Can you please explain what do you mean by 'free PEs inside the volume group.'? I 'm new to LVM and am only really using it because I understand that almost every backup solution works by taking LVM snapshots.

Update:
How can I reallocate the volume to be usable by Proxmox? I can copy files to it as root, is Proxmox running as another user?
 
Last edited:
As you can see it's in LVM storage and I added it in the web GUI as LVM (not directory) but for some reason it shows it as being 100% full.

The output of 'df' shows that you use the device otherwise (/dev/mapper/VMDATA-VMDATA is mounted on /mnt)? So the one who created and mounted that LV should unmount and remove it.

See: http://tldp.org/HOWTO/LVM-HOWTO/
 
The output of 'df' shows that you use the device otherwise (/dev/mapper/VMDATA-VMDATA is mounted on /mnt)? So the one who created and mounted that LV should unmount and remove it.

See: http://tldp.org/HOWTO/LVM-HOWTO/

Can you please be more specific on exactly what I need to do here? Unmounting it is easy enough but what exactly are you referring to when you say I should remove it? Do you mean that I should delete any paritions in the volume? :confused: Or are you referring to removing the volume group? I'm a bit confused here! I'm trying to read up on LVM but there's a lot to learn and I'm always busy with other things too, so any specific pointers you can give would be appreciated.
 
Last edited:
... and I'm always busy with other things too, ...
Hi,
not the best conditions...
Look with this commands and you will see (hopefully) where the space for what is used:
Code:
pvdisplay
vgdisplay
lvdisplay
First you see your partitions which are used for lvm, than the defines volume groups (look at Free) and the logical volumes.
To get space on a volumegroup, you can remove the lv which are on this vg (but the content is of course destroyed!!).
lvremove is the right command for this.

Udo
 
I've done some more reading up on LVM, as far as I can tell I've done everything right-any advice to help me get over this last hurdle anyone?

I tried starting from scratch by doing a pvremove. pvdisplay, lvdisplay, vgdisplay only showed what was created by Proxmox on the OS drive after that.
Then I deleted the existing partition (which had a Linux type) and replaced it with one with a Linux LVM type.
Created a new PV with: pvcreate -M2 /dev/sdb
Created a new VG with: vgcreate vg0 /dev/sdb --clustered n
Created a new LV with: lvcreate --name VMDATA --size 464G vg0
Formatted the filesystem with: mkfs.ext3 /dev/vg0/VMDATA
Added to /etc/fstab

I've added it as an LVM volume in the Proxmox web GUI again but it says it's 98% full.

# /usr/sbin/qm set 101 --ide0 VMDATA:8,format=raw
setting parameters failed - not enough free space (520192 < 8388608)
#

# pvdisplay
--- Physical volume ---
PV Name /dev/sdb
VG Name vg0
PV Size 464.50 GB / not usable 4.00 MB
Allocatable yes
PE Size (KByte) 4096
Total PE 118911
Free PE 127
Allocated PE 118784
PV UUID dEm3sI-54SM-ZJzr-fDzg-nQhk-6Zeq-VvL7HO
<snip>
#
# lvdisplay
--- Logical volume ---
LV Name /dev/vg0/VMDATA
VG Name vg0
LV UUID 8O8pJx-Jbmo-zk2C-CSMp-nbPK-jzFY-wHGYL2
LV Write Access read/write
LV Status available
# open 0
LV Size 464.00 GB
Current LE 118784
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:3
<snip>
#

# vgdisplay
--- Volume group ---
VG Name vg0
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 464.50 GB
PE Size 4.00 MB
Total PE 118911
Alloc PE / Size 118784 / 464.00 GB
Free PE / Size 127 / 508.00 MB
VG UUID LWedBs-KRPJ-Jpth-Sudl-pVhn-L7hJ-6lzGOJ
<snip>
#
Sorry for the long post, I couldn't see any way to attach the output of the commands
 
Then I deleted the existing partition (which had a Linux type) and replaced it with one with a Linux LVM type.
Created a new PV with: pvcreate -M2 /dev/sdb
Created a new VG with: vgcreate vg0 /dev/sdb --clustered n

That is all you need.

Created a new LV with: lvcreate --name VMDATA --size 464G vg0

You do not need that (this consumes all space)!
 
That is all you need.



You do not need that (this consumes all space)!

Ah, I thought I needed that, that must have been where I was going wrong! I removed the LVM from the Proxmox storage, did an lvremove and added it back in again, this time it displays as empty and I can select it under the create VM tab, though it took a minute to show up, thanks for your help :D
 

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!