LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   can't see free space after parted resize (https://www.linuxquestions.org/questions/linux-general-1/cant-see-free-space-after-parted-resize-315765/)

ianv 04-21-2005 01:16 PM

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

kencaz 04-21-2005 01:49 PM

Hmmm, maybe you should have split the partition not resized...

KC

ianv 04-21-2005 02:17 PM

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

kencaz 04-21-2005 02:44 PM

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

jschiwal 04-21-2005 03:00 PM

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.

ianv 04-22-2005 02:09 AM

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

ianv 04-22-2005 04:47 AM

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

ianv 04-22-2005 07:17 AM

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


All times are GMT -5. The time now is 10:29 PM.