Moving the Ubuntu Partition Over SSH

Asked by Sean

I accidentally installed Hardy on a 8 gig partition, and didn't realize the size was so small until I left the state for 3 months. How can I increase the partition size so that I don't have to worry about filling the hard drive with my MySQL database? (see system information below) All other partitions are forfeit. I need a near 100% certain method for booting into a larger partition without local access to a CD drive, keyboard, etc. Any advice?

(((Output from fdisk -l)))

Disk /dev/sda: 74.3 GB, 74355769344 bytes
255 heads, 63 sectors/track, 9039 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 7709 61922511 83 Linux
/dev/sda2 7710 9039 10683225 5 Extended
/dev/sda5 8854 9039 1494013+ 82 Linux swap / Solaris
/dev/sda6 7710 8798 8747329+ 83 Linux
/dev/sda7 8799 8853 441756 82 Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/sdb: 74.3 GB, 74355769344 bytes
255 heads, 63 sectors/track, 9039 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/sdb1 * 1 9038 72597703+ 7 HPFS/NTFS

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Ralph Janke (txwikinger) said :
#1

Thanks for the question.

I am not sure that I understand what you are trying to do.

You can use a program like partimage (http://orgs.man.ac.uk/documentation/partimage/index-3.html) to store an partition to another computer (also via ssl if partimage was compiled with that capability). You might want to do that by booting from the live-CD.

Otherwise, if you want to copy the files as filesystem, you can do that with scp (which is a remote-cp using ssh), or rsync which also can use ssh.

Another possibility is to delete the partitions that are behind your partition in question, and then grow your partition with the free space. gparted or qtparted should be able to do that and one of them should be on your live CD.

However, you need to be very careful with this. You should backup all your important information with methods above, or a backup application before you do that in case something goes wrong.

I hope this helps.

Revision history for this message
Sean (smcgregor08) said :
#2

As I understood it, you could grow the partition down disk but not up, so I could not simply grow the partition (my partition is towards the end). Right? Any action on the partitions has to be made while booted into the partition I want to grow. My best option seems to be copying the working partition (while running Ubuntu from it) to the larger partition, change the default boot partition, then restart the server. The problem is I don't have the ability to fix any anomalous problems that might come up and I have not tested any procedure for doing this.

This came up because I am living in a research forest in Oregon (I have internet but not cellular) and the server is in southern California. It'.s a long way to fix any problems, or use a live cd.

Thanks for the Advice.

Revision history for this message
Ralph Janke (txwikinger) said :
#3

I am sorry to say that it is impossible to change a partition that is used as the partition that you run linux on at the same moment.

It seems to me the only feasible option you have is a workaround. create a new partition at the end of the drive and copy some part of your filesystem tree over to that new partition. Then you can delete that part from the old partition and mount the new partition at the same place the old folder was.

I hope this helps.

Can you help with this problem?

Provide an answer of your own, or ask Sean for more information if necessary.

To post a message you must log in.