LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-21-2005, 01:16 PM   #1
ianv
Member
 
Registered: Dec 2002
Location: North West England
Distribution: fedora
Posts: 52

Rep: Reputation: 15
can't see free space after parted resize


Howdy,
I have "successfully" resized a root (primary) partition on a RHAS 2.1 server using a knoppix cd and the parted command. The partition was 120GB and is now about 20GB. The box boots ok but I can't see the 100GB or so of free space, with either parted <disk> print or sfdisk -l <disk>, that should have been left when the partition was shrunk down. The partition was at the end of the disk, resized partition seems fine - parted still reports total disksize as 138919.218 MB which is correct.

There are 3 primary partitions of type ext3 and one extended partition which contains 4 logicals all of which are swap.
parted was ver 1.6.4 from knoppix v3.6
partition was 18300.234 to 136919.218
is now 18300.234 to 38300.796

Can't copy & paste as machine is has no network access - grrr
Have googled at length to no avail
Can I do somethin manually with the partition table to declare it as free space?
Any help would be most welcome

many thanks
Ian
 
Old 04-21-2005, 01:49 PM   #2
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 48
Hmmm, maybe you should have split the partition not resized...

KC
 
Old 04-21-2005, 02:17 PM   #3
ianv
Member
 
Registered: Dec 2002
Location: North West England
Distribution: fedora
Posts: 52

Original Poster
Rep: Reputation: 15
Hmmm...
If I have 3 primary & one extended have I run out of available primary partitions?

I'll delete the extended as it only has SWAP in it anyway and see if it will let me make a new extended on the end of the disk

Can stuff "var" partition back into "root" if I have to

Might try and recreate patrition back to its original size

Is split done with parted or other tool - don't see it in parted docs ?
many thanks
Ian
 
Old 04-21-2005, 02:44 PM   #4
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 48
Have not used QTparted in awhile but I don't think you have run out of primary. limit 4
http://www.linux-sxs.org/housekeeping/partinfo.html

The 100gigs are there. you probably just did not allocate it anywhere. you'll probably have to destroy that 20gig partition to get it back though. Also why so many SWAP partitions?

KC
 
Old 04-21-2005, 03:00 PM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678
This may be a dumb question, but have you powered down after resizing the partition. The computer itself may need to rerun the post phase after resizing or creating a new partition.
 
Old 04-22-2005, 02:09 AM   #6
ianv
Member
 
Registered: Dec 2002
Location: North West England
Distribution: fedora
Posts: 52

Original Poster
Rep: Reputation: 15
Thanks for your suggestions -
I am now thinking that it is the no of primaries/extended after all. I have p1 p2 p3 and p4 where p2 is my extended partition. Thanks for the link KC, apparently the extended counts as a primary which in my case adds up to 4. The extended partition p2 (containing 4 logicals) is sandwiched between p1 and p3 with no room to grow.

I think that ill do away with the extended as it only has 4x2GB swap in it (not my design - am trying to put right a "less than optimally" configured system). This should allow me to create another extended on the end of the disk (fingers crossed) and get some use out of the remaining disk.

Will report back on how it goes
Thanks again
Ian
 
Old 04-22-2005, 04:47 AM   #7
ianv
Member
 
Registered: Dec 2002
Location: North West England
Distribution: fedora
Posts: 52

Original Poster
Rep: Reputation: 15
Howdy,
Ran a newer version of sfdisk from the knoppix cd and space on end of disk showed up as unusable.
Deleted the extended partition with its 4 logical and the 100Gb became usable free space.

(All below done as root user - "su -" at terminal prompt in knoppix)

Used cfdisk to recreate 4 swap's & create 3 new linux partitions - all logical within the new extended.
Used mkswap on the 4 swaps
# mkswap <device>
Used mkfs.ext3 on the 3 linux part's
#mkfs.ext3 <device>
labelled the partitions with e2label
# e2label <device> <label>
edited /myroot/etc/fstab to show new partitions
# mkdir /myhome /myusr /mytmp # to use as tmp mountpoints in knoppix
mounted new parts as /myhome, /myusr , /mytmp

used -
# cd /myroot/<dest> ; find . -print | cpio -pudmv /my<dest>

to copy contents of <dest> dir
but this seems to have dropped some symlinks :-( (*** anybody else seen this ?*** )
so will have to try again with
# cp -ar /myroot/dest /mydest

changed /myroot/usr to /myroot/old_usr
and created a new empty mountpoint of /myroot/usr for next time it boots so that it has somewhere to mount /usr

System still booted with symlinks missing but fonts were not found in X startup - so X server died
did a
#du -sk on old dir and new dir and there were a few bytes missing - hmmmm how annoying

Hope this helps someone in the future
Ta
Ian
 
Old 04-22-2005, 07:17 AM   #8
ianv
Member
 
Registered: Dec 2002
Location: North West England
Distribution: fedora
Posts: 52

Original Poster
Rep: Reputation: 15
Howdy,
re-copied contents of usr, tmp & home again
used cp -a
result - X server still didn't start up
wasn't down to missing links

was more like wrong permissions (wasn't world writable) on /tmp
so xfs server wouldn't start
so X server wouldn'y start

doh ! - that just cost me an hour!!!

Working now - only another 2 systems to convert :-( then I can go home

thanks for words of wisdom
Ian
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Free Space not being used, resize resierfs partition? gbkyle Linux - General 1 03-07-2005 04:06 AM
Not enough free space on hard drive with 50g of free space??? auoq SUSE / openSUSE 5 10-13-2004 08:21 PM
Resize Partition with parted jdmml Linux - Hardware 0 07-08-2004 08:43 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
parted fails to resize dnla Linux - General 0 11-16-2003 07:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration