Discussion Locked

Extending Partitions

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I run rh 6.2 server and use the update agent regularly to keep up with patches. The other day, I was updating the kernal and got a message saying that there wasn't enough room on the /file system. Is it possible to increase the size of a partition without fdisking the whole thing and starting over? I'd hate to lose the user accounts/passwords or unretrieved emails (those on vacation). My plan would be to add an addtional hard disk.
If I do have to fdisk, can I just smb to my linux and copy the \var\mail folder & \etc\passwd files to be later moved back to the reconfigured linux box?
Any advise appreciated. Thanks - Keith

5 replies

by thechas

If the drive has multiple partitions, you should be able to change the partition sizes using a utility such as Partition Magic.

Alternately, you could move some files from the OS partition to another partition.

If your drive has only one partition, your only choice is to get a larger drive, or clear space on your existing drive.

There are many utilities out there for transfering the contents on one drive to another, I am sure that most are Linux compatible.

by cpfeiffe

All of the methods in the first answer will work. If you want to try something different here is one more approach you can take.

If you have space available on the drive that isn't allocated to any partition you can try this method.

Find out what directory under / that doesn't have its own mount point is using the most space (du is the command to figure this out. Use the du man page for the proper use). Create a new partition. Boot the Linux machine into single user mode. Mount the new partition. Mount the old partition. Move the data in the directory to the new partition. Edit your /etc/fstab file to reflect the new mount point (if you move data from /var directory to the new mount point you will want the raw device to mountas /var). /var becomes its own mount point and uses the disk space available in the new partition, freeing up the space the /var folder used in the / partition.

Good luck.

by paulo.sedrez

The update agent (up2date) stores a lot of information (packages header files ant the packages itselves) in the /var structure (I can't remember now, /var/cache/... or /var/spool/...). If you have enough disk space on another partition, I suggest you move that directory to other partition and create a symbolic link on the original location pointing to the new location.

And to respond to our answer: gnu parted should be able to do nondestructively, but you have to start it from a bootable linux floppy.

--Sedrez

by paulo.sedrez

Sorry, bad english here:

And to respond to your *question*: gnu parted should be able to do nondestructive resize of a partition; but the partition must be unmounted, so you will probably have to start it after booting from a utility floppy or CD- I recommend SuperRescue (look for it in freshmeat.net). It can also move partition in a disk(as long it is to a free space and copy entire partitions.

This discussion is closed to new replies.