Results 1 to 9 of 9
Thread: free up KVM storage pool
-
02-11-2012, 02:35 PM #1WHT Addict
- Join Date
- May 2011
- Posts
- 168
free up KVM storage pool
Hi.
I wanted to install a VPS through KVM and assigned 400gb storage to it.
During setting up, my kid unplugged server's power. I boot up again and try to re-create but i've got "there is no enough space in storage pool"
When i checked /lib/var/lib/libvirt/images there was a img file for 400gb i delete it but error persist.
Output of virsh-list and virsh list --all return empty
Id Name State
--------------------------------------
How can i recover 400gb back?
-
02-11-2012, 07:19 PM #2Junior Guru
- Join Date
- Jun 2011
- Location
- London, UK.
- Posts
- 196
Can you not just re format and start all over again?
-
02-11-2012, 07:24 PM #3Web Hosting Master
- Join Date
- Jul 2007
- Location
- Virginia
- Posts
- 1,314
Run
Code:df -h
~ @PreetamJinka
-
02-11-2012, 08:10 PM #4Junior Guru
- Join Date
- Feb 2011
- Location
- Kasultanan Ngayogyakarta
- Posts
- 249
if it's on LVM partition, just remove it with lvremove command.
-
02-12-2012, 03:19 AM #5Web Hosting Evangelist
- Join Date
- Dec 2009
- Location
- Milan, IT
- Posts
- 478
If you run vgs and lvs commands on console what the output is?
Prometeus.com & iperweb.com Hosting Solutions since 1997
We are LIR (RIPE NCC member) and do BGP with ASN 34971 Multiple gigabit/s network capacity
iwStack.com IaaS Cloud services
-
02-12-2012, 03:43 AM #6WHT Addict
- Join Date
- May 2011
- Posts
- 168
@ville: I can format disk but formating is easy and lazy way. I want to learn how to solve problems.
@bitcable: output of df -h command as follow
Code:[root@v1 ~]#df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/volGroup00-LogVol00 441G 277G 142G 67% / /dev/sda1 99M 20M 75M 21% /boot tmpfs 3.9G 0 3.9G 0% /dev/shm
Code:[root@v1 ~]#lvremove Please enter one or more logical volume paths
Code:[root@v1 ~]#vgs VG #PV #LV #SN Attr VSize VFree VolGroup00 1 2 0 wz--n- 464.62G 32.00M [root@v1 ~]#lvs LV VG Attr LSize Origin Snap% Move Log Copy% Convert LogVol00 VolGroup00 -wi-ao 454.84G LogVol01 VolGroup00 -wi-ao 9.75G
PS: I really appreciate for anyone who tried help.
-
02-12-2012, 05:42 AM #7Web Hosting Master
- Join Date
- Mar 2005
- Location
- Ten1/0/2
- Posts
- 2,529
You cannot simply remove the logical volume as you have allocated the whole disk to a single volume - that would delete everything. Well, at least you did the right thing and installed a /boot partition directly on the disk.
It might be better to format and start again, this time, lay out your disk a little better - and don't just put everything in a single Logical Volume.
I never build a system that has a single volume - it is inviting disaster.
Here is how I choose to build OpenVZ nodes -
Code:[root@node12 boot]# vgs VG #PV #LV #SN Attr VSize VFree VG00 1 8 0 wz--n- 931.41g 500.75g
* 1 PV is a 1 Hardware Raid 1 array in this case
Code:[root@node12 boot]# lvs LV VG Attr LSize Origin Snap% Move Log Copy% Convert LogVol00 VG00 -wi-ao 7.81g LogVol01 VG00 -wi-ao 5.86g LogVol02 VG00 -wi-ao 9.77g LogVol03 VG00 -wi-ao 1.95g LogVol04 VG00 -wi-ao 48.83g LogVol05 VG00 -wi-ao 14.65g LogVol06 VG00 -wi-ao 97.66g LogVol07 VG00 -wi-ao 244.14g
Not 1, but 7 different LV's, logically separating the OS into several filesystems.
Code:[root@node12 boot]# df Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/VG00-LogVol01 6047492 464052 5276240 9% / tmpfs 1956124 0 1956124 0% /dev/shm /dev/mapper/VG00-LogVol07 251981556 55867244 183314312 24% /backup /dev/sda1 99150 56591 37439 61% /boot /dev/mapper/VG00-LogVol04 50395844 184136 47651708 1% /home /dev/mapper/VG00-LogVol03 2015824 35824 1877600 2% /tmp /dev/mapper/VG00-LogVol05 15118728 829448 13521280 6% /usr /dev/mapper/VG00-LogVol02 10079084 253512 9313572 3% /var /dev/mapper/VG00-LogVol06 100791728 6415596 89256132 7% /vz
Best part is that if I need a bit more space in any of these filesystems, it only takes a few seconds to allocate more where it is required out of the 431Gig that I have not yet used.
OK, so you have booted up the server, removed the 400G file. What else have you done?
I would do another reboot and check again after taking a drastic action of deleting a file that was potentially still in use.CPanel Shared and Reseller Hosting, OpenVZ VPS Hosting. West Coast (LA) Servers and Nodes
Running Linux since 1.0.8 Kernel!
Providing Internet Services since 1995 and Hosting Since 2004
-
02-12-2012, 06:01 AM #8WHT Addict
- Join Date
- May 2011
- Posts
- 168
Dear RRWH
I want to install cPanel in this server and it will be the only One VPS in it.
Installing WHM in dedicated server cost me $400 USD but same WHM on VPS will cost me half of it.
So, i need Host OS about 10 or 15 GB and rest of HDD assign to single VPS.
If i delete 400G file as you said i am pretty sure Server won't boot up. It seems i have no option but re-formating it but i want to solve this problem with less pain.
-
02-12-2012, 06:13 AM #9Web Hosting Evangelist
- Join Date
- Dec 2009
- Location
- Milan, IT
- Posts
- 478
If you don't want to reformat you have two paths:
1) use file based disks instead of lvm partition for your vps
2) shrink the volume (but this require a bit of experience as it can lead to a total mess if you don't know what are you doing)Prometeus.com & iperweb.com Hosting Solutions since 1997
We are LIR (RIPE NCC member) and do BGP with ASN 34971 Multiple gigabit/s network capacity
iwStack.com IaaS Cloud services
Similar Threads
-
storage servers with bandwidth pool
By tomazo in forum Dedicated ServerReplies: 8Last Post: 01-24-2012, 12:54 PM -
[Special: Storage] Xeon E5645 | 48 TB HDD | RAID6 | 2 Gbps unm. | 32 GB DDR3 | KVM
By T-N-Media in forum Dedicated Hosting OffersReplies: 0Last Post: 10-13-2011, 08:40 AM -
[Special: Storage] Xeon | 56 TB HDD | RAID6 | 2 Gbps unm. | 16GB DDR3 | KVM | 819.99€
By T-N-Media in forum Dedicated Hosting OffersReplies: 1Last Post: 10-07-2011, 06:05 AM -
[Canada] - KVM VPS from $19.55/m (COUPONS) - Free Backup - IPv6 Ready - VNC KVM
By PerfoHost in forum VPS Hosting OffersReplies: 0Last Post: 03-11-2010, 04:41 PM -
Make your own VPS(s)- Resource Pool of 2048MB RAM, 200GB Storage & 2TB BW - $99/mo
By DatabaseByDesignLLC in forum VPS Hosting OffersReplies: 3Last Post: 06-01-2009, 09:18 AM