Link to home
Start Free TrialLog in
Avatar of GinEric
GinEric

asked on

Linux partition resizing

Can anyone give some advice on resizing a Linux partition?  I know it can be done with simple fdisk, by changing the parameters, but am not sure what will happen.  Here is the information:

   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1               1        1020     8193118+  83  Linux
/dev/hdc2            1021        1542     4192965    6  FAT16
/dev/hdc3            1543        3649    16924477+   5  Extended
/dev/hdc5            1543        2562     8193118+  83  Linux
/dev/hdc6            2563        3582     8193118+   7  HPFS/NTFS
/dev/hdc7            3583        3607      200781    7  HPFS/NTFS
/dev/hdc8            3608        3632      200781    7  HPFS/NTFS
/dev/hdc9            3633        3649      136521   82  Linux swap

I want to change the 8 gig primary Linux to 16 gig, eliminate /hdc5 thereby, and am not sure of the effects on A.)  the extended partitioning  B.)  the NTFS partitions in the extended region.

This look fairly dangerous to me and I'm not sure what the results will be.  I could, of course, copy everything except the first Linux partition somewhere else and fdisk the whole thing, if that is the safer way to go.  I don't want to lose the Primary Linux partition because too much has been built on it and rebuilding it or reinstalling it could take a year.

The FAT16 and the three NTFS partitions, as well as the second 8 gig Linux partition can be temporarily stored on another disk.  I'm also not sure of what will happen if the swap partition is changed, removed and reinstalled or whatever.  The one thing that must be preserved is the primary Linux Partition.
ASKER CERTIFIED SOLUTION
Avatar of scampgb
scampgb
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of neteducation
neteducation

oh, forgot to mention, but mybe clear anyway.... if you create a new filesystem on this new partition, you'll loose the data that was stored there -> do backup / copy away data first
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of GinEric

ASKER

scampgb

That is pretty much what I was thinking.  The reason for doing so was, or is, that there is a lot of development on the first Linux partition, and it has eaten up space incredibly fast.  I too thought that using /dev/hdc5 was the answer.  I was just not sure how to make it part of the root partition system.  If I move the source compiles to it, they will most likely break.  However, this is what I was considering:

"You could mount hdc5 and use it "as if" it was just in the root partition the other one"

except that I'm not quite sure how to accomplish that.

Making way for new drives and new servers as well, with much bigger base hard drives.  It won't be a problem with them, however, it is a problem with this one.  There are two other hard drives and a CDR and DVD on the same server.  Each drive has an OS, or two, Linux and/or Windows.  /dev/hda1 and /dev/hdb1 are similar to /dev/hdc1 except that one is FAT, one is NTFS, and their subpartitions are combinations of FAT, NTFS, and Linux.

None are XP, they are at most NT Server 4.0 SP6a.

I have pretty much abandoned/deprecated Windows except on workstations, i.e., I have had enough of Windows Servers; that's all I can stands and I can't stands no more!

neteducation and ChastityMan

I was going to do it manually with Linux fdisk, rather than use any program because I can't predict their results and usually cannot fix them.  I've changed cylinder addresses before and found I could always just rewrite them back if it didn't work.  However, playing with the primary Linux partition is very dangerous, and backing it up really requires copying the whole thing to another disk.

This box is on Slackware 10 currently, and part of its use is to develope Slackware, and other Open Source software.  I do have XP on other machines.  Mixing XP and above with Linux on the same box is maybe a future experiment, I feel I just can't trust XP not to try and break the Linux partitions currently.

What's really in the way is the extended partition.  I know I can't cross that boundary without problems.

I'm going to split the points.  scampgb was closest to my own thinking on the problem.  I hope that is acceptible with all.

Avatar of GinEric

ASKER

Thanks to all of you.  You have all been very helpful.