LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-09-2007, 10:19 AM   #1
nightmare55
LQ Newbie
 
Registered: Jan 2007
Posts: 3

Rep: Reputation: 0
Unhappy Help removing free space to create Raw free space


Hi,

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

Thankyou
 
Old 02-09-2007, 12:25 PM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,309

Rep: Reputation: 139Reputation: 139
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:

http://gparted.sourceforge.net/

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.
 
Old 02-09-2007, 12:46 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
In Linux, open a terminal and do "fdisk -l" as root. Post the results here.
 
Old 02-09-2007, 04:03 PM   #4
nightmare55
LQ Newbie
 
Registered: Jan 2007
Posts: 3

Original Poster
Rep: Reputation: 0
[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
 
Old 02-09-2007, 04:15 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,222

Rep: Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019
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.
 
Old 02-09-2007, 05:10 PM   #6
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
syg00,

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.
 
Old 02-09-2007, 07:02 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,222

Rep: Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019
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.
 
Old 02-10-2007, 07:47 AM   #8
nightmare55
LQ Newbie
 
Registered: Jan 2007
Posts: 3

Original Poster
Rep: Reputation: 0
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
 
Old 02-10-2007, 09:35 AM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
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!!!

Last edited by pixellany; 02-10-2007 at 09:36 AM.
 
Old 02-10-2007, 03:10 PM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,222

Rep: Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019
Quote:
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.
 
Old 02-10-2007, 03:39 PM   #11
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
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
Code:
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.

Last edited by saikee; 02-10-2007 at 03:40 PM.
 
Old 10-01-2009, 03:07 AM   #12
senthilds
LQ Newbie
 
Registered: Feb 2009
Posts: 3

Rep: Reputation: 0
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)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
can't create partition on free space thyraios Linux - Newbie 17 02-15-2006 09:08 AM
My / is full. How to create 400MB free space without deletion .?? kadhiravan.r Linux - Newbie 7 12-08-2005 02:06 AM
Create new partition from existing free space distortedstar Linux - General 4 06-07-2005 09:47 PM
Not enough free space on hard drive with 50g of free space??? auoq Suse/Novell 5 10-13-2004 08:21 PM
Formating free space: WinXP pro and RH9 dualboot with free space on 3rd drive Vermicious Linux - General 2 03-22-2004 05:10 AM


All times are GMT -5. The time now is 10:23 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration