Results 1 to 6 of 6
Hi all.
I am pretty new to Linux and I have run out of space on one of my partitions it seems. I am running on a Virtual Machine. So ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-26-2012 #1Just Joined!
- Join Date
- Jul 2012
- Posts
- 3
Extend volume for partition
Hi all.
I am pretty new to Linux and I have run out of space on one of my partitions it seems. I am running on a Virtual Machine. So what can I do to increase the volume on the root partition or to give me more space that I can work with (should I have a /usr partition?).
Code:TDExpress14.0_Sles10:~ # cat /etc/*-release LSB_VERSION="core-2.0-noarch:core-3.0-noarch:core-2.0-x86_64:core-3.0-x86_64" SUSE Linux Enterprise Server 10 (x86_64) VERSION = 10 PATCHLEVEL = 3 TDExpress14.0_Sles10:~ # df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda2 9076396 8574624 40708 100% / udev 944244 132 944112 1% /dev /dev/sda5 2016016 342792 1570812 18% /var /dev/sda7 37293996 4167992 31231544 12% /var/opt/teradata /dev/sda3 9076396 231700 8383632 3% /data
Last edited by ronstoppable; 07-26-2012 at 04:09 PM.
- 07-26-2012 #2Linux Newbie
- Join Date
- Jan 2012
- Location
- Ohio
- Posts
- 175
This is how I have done it in the past. There are other ways to do it, but I had the most success with this one especially with the / partition since it is always mounted
**Note: you may need to shut the VM down to be able to expand the size of the drive**
1. Go to the VM and change the hard drive to the size you need
2. Reboot the machine with a Live CD
3. Open the Disk utility and create a partition in the free space
4. Determine the name of the newly created partition from the Disk Utility
5. Get the name of the volume group
a. vgdisplay
6. Join the newly created partition to the volume group
a. vgextend volume_group_name /dev/sda3 - note this is the name you gathered from Disk Utility
7. Extend the logical volume
a. Lvextend -L{size volume will be} /dev/volume_group_name/logical_volume_name
b. E2fsck -f /dev/volume_group_name/logical_volume_name
c. Resize2fs /dev/volume_group_name/logical_volume_name
Another good walkthrough is this:
Extending partitions on Linux VMware virtual machines | TechRepublic
- 07-27-2012 #3Just Joined!
- Join Date
- Jul 2012
- Posts
- 3
Thanks for the post.
The step that I am stuck at is:
I dont have any CD. I downloaded the VM from the internet so I have no Linux install CD's or boot CD's.2. Reboot the machine with a Live CD
Also I tried following the guide on the link
I am getting13.Type n to add a new partition
This might be okay. Maybe I added the extra volume before when I was playing around. So I continued with the guide. But when I get to this step:Code:Command (m for help): n No free sectors available
I cant find the name of the volume group that I want to extend.22.Now you’ll add the physical volume to the existing volume group using the vgextend command. First type df -h to find the name of the volume group. In Figure C, the name of the volume group is vg_root. Now type vgextend [volume group] /dev/sdaX. (ex: vgextend vg_root /dev/sda4)
Maybe this will give more info that might help.
Code:TDExpress14.0_Sles10:~ # fdisk -l Disk /dev/sda: 78.3 GB, 78383153152 bytes 255 heads, 63 sectors/track, 9529 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 1 6 48163+ 12 Compaq diagnostics /dev/sda2 * 7 1154 9221310 83 Linux /dev/sda3 1155 2302 9221310 83 Linux /dev/sda4 2303 9529 58050877+ 5 Extended /dev/sda5 2303 2557 2048256 83 Linux /dev/sda6 2558 2812 2048256 8e Linux LVM /dev/sda7 2813 7529 37889271 83 Linux /dev/sda8 7530 9529 16064968+ 82 Linux swap / Solaris Disk /dev/sdb: 4294 MB, 4294967296 bytes 255 heads, 63 sectors/track, 522 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 261 2096451 da Non-FS data Disk /dev/sdc: 4294 MB, 4294967296 bytes 255 heads, 63 sectors/track, 522 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdc1 1 261 2096451 da Non-FS data TDExpress14.0_Sles10:~ # vgdisplay No volume groups found TDExpress14.0_Sles10:~ # lvdisplay No volume groups found
- 07-27-2012 #4Linux Newbie
- Join Date
- Jan 2012
- Location
- Ohio
- Posts
- 175
It looks like you added a second hard drive in the VM. If you are new to Linux, this will be easier to do from a live CD using GParted. I would download an ISO of Ubuntu, then in your VMWare settings for the machine, go to CD/DVD drive and select datastore ISO file and click browse to find it. Once you have ubuntu running on a live CD install GParted and that will help you with a graphical interface to show you what it you partition table is.
cd-dvd_settings_vmware.jpg
- 07-27-2012 #5Just Joined!
- Join Date
- Jul 2012
- Posts
- 3
Thanks. I will try that on Monday. Have a nice weekend!
- 07-27-2012 #6Linux Newbie
- Join Date
- Jan 2012
- Location
- Ohio
- Posts
- 175
Let me know if you need help


1Likes
Reply With Quote
