Results 1 to 6 of 6
I am running Fedora 15 in a VirtualBox VM. I increased the size of the hard disc in the VM but the fedora OS is not recognizing the added space. ...
- 10-07-2011 #1Just Joined!
- Join Date
- Oct 2011
- Posts
- 3
Extending hard drive space
I am running Fedora 15 in a VirtualBox VM. I increased the size of the hard disc in the VM but the fedora OS is not recognizing the added space. how do i get fedora to recognize it? This is what fedora sees currently.
[profiles1 techservices]# [profiles1 techservices]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
10061944 9536968 5604 100% /
/dev/hda1 101086 19782 76085 21% /boot
-bash: [profiles1: command not found
tmpfs 513060 0 513060 0% /dev/shm
/dev/hdc 39800 39800 0 100% /media/VBOXADDITIONS_4.0.12_72916
[profiles1 techservices]# fdisk -l | grep Disk
Disk /dev/hda: 85.8 GB, 85899345920 bytes
[profiles1 techservices]# df -H
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
11G 9.8G 5.8M 100% /
/dev/hda1 104M 21M 78M 21% /boot
tmpfs 526M 0 526M 0% /dev/shm
/dev/hdc 41M 41M 0 100% /media/VBOXADDITIONS_4.0.12_72916
As you can see the "fdisk -l | grep Disk" command shows the 85GB but the df command does not.
Anyone know how to get this to work?
Rick
Jonathan,
I checked out the other site, what I did was expand my drive with <VBoxManage> <modifyhd> <resize> <filename> <new size>
Here is the fdisk -l,
[root@profiles1 /]# fdisk -l
Disk /dev/hda: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 1566 12474472+ 8e Linux LVM
I am not sure what you want me to use the code tags on. I tried to find an example but am not sure what exactly I should tag.
ThanksLast edited by trvlrs; 10-07-2011 at 06:44 PM. Reason: Adding more info
- 10-07-2011 #2
Can you post the full output of
and can you use the code tags so its easier to read the outputCode:fdisk -l

btw have you tried following info here
- 10-07-2011 #3Just Joined!
- Join Date
- Oct 2011
- Posts
- 3
Extending hard drive space
Jonathan,
Here is the fdisk -l,
[root@profiles1 /]# fdisk -l
Disk /dev/hda: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 1566 12474472+ 8e Linux LVM
I am nopt sure what you want me to use the code tags on. I tried to find an example but am not sure what exactly I should tag.
Thanks
- 10-07-2011 #4
you don't look to be using all cylinders ... I think with LVM you create a partition and add it to the logical volume example here
and to mark code highlight it and hit the # button on the forums toolbar
Ed: I don't use LVM so I can't walk you through the process anyway ... good luck
- 10-10-2011 #5Just Joined!
- Join Date
- Oct 2011
- Posts
- 3
This was the easiest fix out there.
Adding more disk space with LVM2
Posted in May 1st, 2009
by Dennis in System Administration
Tags: disk space, linux, lvm
I've always known that virtualizing things can make management of all types of resources easier. Recently, I had the most pleasant experience adding disk space to a virtual machine. Of course, if you use LVM, this can happen just as easily with real physical disks, but for me, I was able to do this without restarting my machine.
Issue: I'm out of disk space on my root partition.
Solution: The root partition is created on a logical volume with LVM2. Just add another disk, extend the volume group, and then extend the logical volume.
# Added new physical partition /dev/sda3
# create a physical volume out of it
> pvcreate /dev/sda3
# Now, add it to the volume group that my logical volume is on
> vgextend VolGroup00 /dev/sda3
# Now that the volume group has more disk space, the logical volume can grow
> lvextend -L+11G /dev/VolGroup00/LogVol00
# Ok, last of all, I want to filesystem to recognize that more space is available
> fsadm resize /dev/VolGroup00/LogVol00
# sweet, I have more space now
> df -h
All that was done without having to take the system off line. Linux makes life easy sometimes doesn't it!
- 10-13-2011 #6Just Joined!
- Join Date
- Oct 2011
- Posts
- 4
One of the experience of mine in expanding the hard drive space in VM machine under ESX4. When we increase a hard disk space in VM. It will get detected once we run the command that can be used to scan the scsi bus scan.
echo "- - -" > /sys/class/scsi_host/host#/scan
Once we get the original size in fdisk, n if we have lv, vg then we can directly extend, if we have a single partition, use fdisk command to delete that partition and do not save it create partition with same partition number with full size of the hard disk and then save the partition table. Now the new partition sizes are reflected in df. If we have multiple partitions this will work for the last partition itself.
--Nagasai


Reply With Quote
