-   Linux - Newbie (
-   -   Help removing free space to create Raw free space (

nightmare55 02-09-2007 10:19 AM

Help removing free space to create Raw free space

I am using Fedora core 6.

I have dual booted this system and have WindowsXP on my 80GB IDE drive and i got FC6 on my 320GB Sata, now i have shrinked and resized my Logvol etc to 30GB, but the physical volume is still holding on to my 260GB (Unused Free Space), now i need to remove that so that it is raw space, because when i go into Partition Magic, it still see the Sata Drive as taking up all 320GB and does not see any free space.

Can anyone help me please


kilgoretrout 02-09-2007 12:25 PM

The best advice I can give you is do not use Partition Magic on any linux partition ever. It's just terrible in dealing with anything but windows partitions. For a free partitioning program, I'd recommend gparted:

Get the livecd version; it boots into a minimal linux distro and automatically launches gparted. Gparted is very similar to PM in appearance but it is probably one of the best, most up to date, free partitioning tools out there for dealing with linux partitions.

For pay, I'd go with Acronis disk Director. It's vastly superior to PM in dealing with linux partitions.

pixellany 02-09-2007 12:46 PM

In Linux, open a terminal and do "fdisk -l" as root. Post the results here.

nightmare55 02-09-2007 04:03 PM

[root@pegasus ~]# fdisk -l

Disk /dev/hda: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 3334 26780323+ 7 HPFS/NTFS
/dev/hda2 3335 9964 53255475 f W95 Ext'd (LBA)
/dev/hda5 3335 9964 53255443+ 7 HPFS/NTFS

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 38913 312464250 8e Linux LVM

i want to use the free space for windows xp

syg00 02-09-2007 04:15 PM

If you have (correctly) done all the LVM work, you simply need to resize sda2 appropriately.
From fdisk, delete that partition, then recreate it starting at the same position, and make it slightly larger than needed - just to be sure.
Make it too small, and (eventually) you'll have data and/or filesystem corruption.
The space at the end will then be available.

Deleting the partition (from fdisk) doesn't affect the data within.

saikee 02-09-2007 05:10 PM


Are you sure the method works for LVM? To start with it has a swap inside!

The damn thing isn't supported by Gparted and there may be one chance in hell Partition Magic can read with it.

I could be wrong but it may need to break up first to drop the LVM before the content can be resized.

syg00 02-09-2007 07:02 PM

From the OP I had presumed nightmare55 had done all the (LVM) hard work - hence the first sentence of my prior post (think of it as me covering myself).
This means pvresize (a works, and (b was used.

Am I sure ??? - no.
Would I have backups ??? - no need to answer.

nightmare55 02-10-2007 07:47 AM

Is there not a command which i can use to shrink my Physical drive, which would then leave a Raw unused space which Partition magic could see as free space , i tryed pvresize which did not work, is there another way

pixellany 02-10-2007 09:35 AM

There is some nomenclature being used here that is ambiguous. I don't know what you mean by "shrinking the physical drive"

To create unpartitioned space, you need to resize a partition

I do not know anything about LVM, so no help there. How about the chicken way out? Use GParted to delete everything on the 320GB drive and start over. Make a partition for Windows--maybe 10-15GB, then the partitions for Linux (10GB total including SWAP).....leave the rest of the disk unpartitioned. Then you have the options of adding more partitions as you need them.

EDIT: Adding partitions is a heck of a lot easier than resizing them!!!

syg00 02-10-2007 03:10 PM


Originally Posted by nightmare55
i tryed pvresize which did not work, is there another way

No command that I'm aware of.
If a re-install (of Fedora) isn't an option I'd be moving the data off to another disk, re-sizing your current partition, and moving everything back. I use 100Gig USB drives for this sort of thing.
No easy task with root (everything actually except boot I presume) in that pv.
LVM really appears to be designed for adding space (as in extra partitions) rather than reducing.
Like pixellany said, I always leave unallocated space on drives - even with LVM it makes sense to be able to just add appropriately sized partitions as needed.

If a re-install is an option,I'd be looking to restrain Fedora to less than the full disk. Don't know if anaconda will allow that, or if you need to pre-allocate partitions. Don't forget that small non-LVM one for /boot.

saikee 02-10-2007 03:39 PM

If the partition size is to be changed in future, either upward or downward, it may not be a bad idea to use a single partition for the installation.

For a start as /boot is the subdirectory to "/" Anaconda has no chance of selling LVM to you. That is what all of my Red Hat distros end up. Every one of them is in a standard device name call /dev/hdax.

The partition can be resized with a resizing software or without it.

I still do resizing with tar as it is more fun.

Say if I have a Linux in partition hda7 becoming too restricted in space I just create a bigger partition say hdc39, format it to Ext3, mount the new partition, change directory to the partition hda7 and move the whole distro across with one command, using the distro in hda7 or any other Linux including one from a Live CD

tar cf - . | (cd /mnt/hdc39; tar xf -)
If I want it boots at partition hdc39 I edit the boot loader file and fstab at the new location.

If I want it back to the original hda7 I delete the old partition, re-create one larger, and tar the partition back to hda7.

There is no way I can do it this way, taking between 10 to 15 minutes, with a LVM.

senthilds 10-01-2009 03:07 AM

to list out the partion "fdisk -l"

to create a partion "fdisk /dev/sda" ( if ur disk is sata hard disk)

to create a partion "fdisk /dev/hda" ( if ur disk is IDE hard disk)

All times are GMT -5. The time now is 01:14 AM.