I have set up an HP Proline server with a 500GB drive with Centos 6.2 and Virtualmin 3.97.
Having restored a few servers from backups, I have noticed that I am nearly out of disk space. Virtualmin reports “Local disk space 49.69 GB total, 46.74 GB used”
I’m under the impression that there is only one drive and that drive is 500GB. Unless there’s another drive in there that was not mentioned in the server spec. Doubt that though - it’s one of those rackmounting Proline servers where all the drive bays are accessible from the front, and there’s certainly only one drive there, and it’s certainly 500GB.
Output of fdisk -l /dev/sda is :
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000bac0c
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 60802 487873536 8e Linux LVM
I can see from that output that it is recognising the 500GB drive. Do I have a partitioning issue, do you think?
Thanks very much Eric. From that link, I was able to expand my logical volume and then do an online update to the filesystem. I’ve added 200GB to the available space, thereby keeping 250GB in case I ever need it for something else.
And I learned a whole lot about VLM along the way.
For anyone finding this thread in the future, I first expanded the logical volume by:
lvextend -L+200G /dev/vg_vm1/lv_root
Which extends that logical volume by 200GB. Once that’s done, it’s also necessary to extend the associated filesystem to match. The ideal way to do this is to unmount the volume first, but of course if, as in my setup, your system is booted from that volume, that’s not an option, so you have to do an online update. This is done by running:
resize2fs -p /dev/mapper/vg_vm1-lv_root
(Or whatever the name of your filesystem is.)
This online update takes a while; adding 200GB to mine took about 20 mins.