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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-21-2005, 01:16 PM
|
#1
|
Member
Registered: Dec 2002
Location: North West England
Distribution: fedora
Posts: 52
Rep:
|
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
|
|
|
04-21-2005, 01:49 PM
|
#2
|
Senior Member
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468
Rep:
|
Hmmm, maybe you should have split the partition not resized...
KC
|
|
|
04-21-2005, 02:17 PM
|
#3
|
Member
Registered: Dec 2002
Location: North West England
Distribution: fedora
Posts: 52
Original Poster
Rep:
|
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
|
|
|
04-21-2005, 02:44 PM
|
#4
|
Senior Member
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468
Rep:
|
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
|
|
|
04-21-2005, 03:00 PM
|
#5
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
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.
|
|
|
04-22-2005, 02:09 AM
|
#6
|
Member
Registered: Dec 2002
Location: North West England
Distribution: fedora
Posts: 52
Original Poster
Rep:
|
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
|
|
|
04-22-2005, 04:47 AM
|
#7
|
Member
Registered: Dec 2002
Location: North West England
Distribution: fedora
Posts: 52
Original Poster
Rep:
|
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
|
|
|
04-22-2005, 07:17 AM
|
#8
|
Member
Registered: Dec 2002
Location: North West England
Distribution: fedora
Posts: 52
Original Poster
Rep:
|
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 06:37 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|