LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-28-2005, 10:53 AM   #1
techsimian
LQ Newbie
 
Registered: Aug 2004
Distribution: Mandrake 10.0
Posts: 13

Rep: Reputation: 0
Resize / partition without loss of data


Ok, here's the strange problem that I have, best illustrated by a generated diagram of the partition table.

http://82.42.97.63/~chris/partable.png

Yep.

And this:

Code:
$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/ide/host0/bus0/target0/lun0/part1
                      5.8G  5.2G  365M  94% /
/dev/ide/host0/bus0/target0/lun0/part6
                       31G   13G   19G  40% /home
Now this probably wasn't a good idea to create the partitions with those specs, and I'm now seeing this. I am running out of space on my root partition. This happened before, and I didn't keep an eye on it -- eventually Linux would not work very well, complaining of 'No free space on /'. I do not want that to happen to me again, especially when I have 20 GIGABYTES of free space sitting on the /home partition doing nothing!

I've searched around a bit, and gotten the all-too-familiar 'O..K. Can't do that' feeling when I've read how to do it. I don't mind having a command-line method to resize the paritions, but I'd like a method I can put my confidence in. I do not have any backup solutions at the moment (except for a 128MB USB Pendrive and 30MB of FTP space from my ISP, which is virtually useless in this case. I also have no blank CDRs left).

Can this be done -- reliably, safely and securely?
And also, out of interest, is it possible for the partitions to become resized automatically over time? I'm sure I set my / and /home to be around 50/50. I can't imagine setting myself around 5GB for apps and such, and 30GB for my own personal files.
 
Old 02-28-2005, 03:34 PM   #2
DyeKid
Member
 
Registered: Apr 2003
Distribution: Slackware 10.2 (AMD64 Desktop, HP ZV5120US & IBM T20 Laptops) Suse 10.1 (IBM T23 Laptop)
Posts: 58

Rep: Reputation: 15
While I haven't actually done this, I would suggest you check out VCOM http://www.v-com.com
and see if Partition Commander will work for you.

It will run as a bootable CD, and resize, create, format new partitions.

They suggest backing up valuable data before the resize, but it MAY work.

I know that it did resize my NTFS formatted XP partition on my laptop with no problems or data loss.
 
Old 03-01-2005, 09:17 AM   #3
techsimian
LQ Newbie
 
Registered: Aug 2004
Distribution: Mandrake 10.0
Posts: 13

Original Poster
Rep: Reputation: 0
I'd really rather not pay out on commercial software for something that can be done with tools already available. I mean, I know I can do it in Linux, but the process of unmounting is a little daunting.

Do you know of any good guides for this? I've Googled, but turned up results I can't put my whole confidence in.

Last edited by techsimian; 03-01-2005 at 09:18 AM.
 
Old 03-01-2005, 12:32 PM   #4
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
Do you have another hard drive available? Even on a different system that you can connect with via network? If you do the job is simple. If you don't you will have a hard time.

Basically, you need to put the contents of /home someplace else while you change that partition. You can resize / nondestructively, but you are going to lose /home.
 
Old 03-01-2005, 01:37 PM   #5
techsimian
LQ Newbie
 
Registered: Aug 2004
Distribution: Mandrake 10.0
Posts: 13

Original Poster
Rep: Reputation: 0
Oh, thanks. That helps. I dropped the symlink from /music -> /myhomedir/music, and replaced it with an actual directory (probably not the greatest idea really, but the permissions are set properly. It's not exactly world writable.) and I guess I can FTP my important stuff like documents -- unless you think it's absolutely necessary I keep the home dir exactly as it is (dotfiles, etc)?
 
Old 03-18-2005, 10:59 PM   #6
mindmerge
LQ Newbie
 
Registered: Apr 2004
Location: San Tan Valley, Az
Distribution: Any... but I prefer Debian based...
Posts: 26

Rep: Reputation: 15
I would think that an easy way to take care of this would be to use slax http://slax.linux-live.org/ or knoppix http://www.knoppix.org/ or another live type of linux system http://iso.linuxquestions.org/. I prefer slax over knoppix, but that is based on personal preference to a specific distribution.

If you want a more advanced explanation I am the wrong guy... I take the easy way out.... otherwise why would I use linux? ;-)
 
Old 03-19-2005, 12:19 AM   #7
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
Don't query the disk structure using df; it doesn't give enough information. Instead, use sfdisk -l and post that here.

Actually, you won't be able to do what you want to do without blowing off partition 6 and replacing it. You can't change the start point of a partition, and you can't resize the partition in front of it unless there is unallocated space available at the end of the partition. So partition 6 has to go.

Back up the data, blow it off, then enlarge partition 1 (which is easy to do at that point). Then recreate the other partition and reload the data.

Actually, don't try anything until you have looked at the disk using sfdisk.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to resize partition with no data loss? jonohana Linux - Newbie 3 11-15-2005 08:20 AM
Does the Suse 10.0 installation resize fat32 partitions without data loss? augu2000 SUSE / openSUSE 4 10-26-2005 05:28 PM
Resize Reiser without data loss dlublink Linux - Hardware 2 05-18-2005 04:46 PM
Want to split a partition without data loss. Ebel Linux - Hardware 1 08-09-2004 11:56 PM
data loss on FAT32-Partition sem2 Linux - General 1 08-01-2003 11:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration