LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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


Reply
  Search this Thread
Old 05-27-2007, 06:29 AM   #1
qanopus
Senior Member
 
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358

Rep: Reputation: 45
need help with reallocating harddisk space to partitions


Hi,

This is my problem. I have a 33 GB linux root partition, which, in retrospect is just an awful waste of hard drive space. Currently I'm only using somewhat less the 8 GB and I'm entirely content with the stuff I have already installed so I won't be using much more.

On the other hand my 5 GB windows partition is nearly completely full (duh! only 5 gigs). The reason I made it so small is that I figured that I hardly use windows anyway so why waste disk space on it. So I made it just large enough so as to be able to install windows xp and ms office. But it seems I have been too conservative and now I'm having trouble installing security patches and updates for windows.

I also have a 25 GB "data" partition where I keep stuff like movies and mp3s. This partition to is nearly full. This is a linux partition formatted as ext3.

Here is the output of "fdisk -l"

Code:
[root@localhost /home/sohail]# /sbin/fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1           6       48163+  de  Dell Utility
/dev/sda2   *           7         659     5245222+   7  HPFS/NTFS
/dev/sda3             660        3922    26210047+  83  Linux
/dev/sda4            3923        9729    46644727+   5  Extended
/dev/sda5            3923        3987      522081   82  Linux swap / Solaris
/dev/sda6            3988        5293    10490413+  83  Linux
/dev/sda7            5294        9729    35632138+  83  Linux
and my "df -h"

Code:
[root@localhost /home/sohail]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda7              33G  7.7G   24G  25% /
tmpfs                 501M     0  501M   0% /dev/shm
/dev/sda6             9.7G  2.1G  7.1G  23% /home
/dev/sda3              25G   22G  1.9G  93% /usr/local/data
Just to clearify:

/dev/sda2: Windows XP system partition (NTFS)
/dev/sda3: "data" partition (ext3)
/dev/sda7: Linux root partition (ext3)

I want to resize my linux root to +/- 15 GB, resize my windows to 10 GB and reallocate the rest to my data partition.

What is the best way to do all this? Preferably with open source stuff and without loosing any data.

Last edited by qanopus; 05-27-2007 at 06:39 AM.
 
Old 05-27-2007, 06:46 AM   #2
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Your Linux / partition can certainly be resized (providing you used ext2 or ext3 rather than xfs) but I fail to see the point, really. You can only grow your windows partition by resizing an adjacent one - the data partition in this case.
However, this could get rather tricky. If there is one thing that you should avoid at all cost, it is changing the start of a partition - in other words, you can slice off part of its tail but not off its head. But doing so leaves you with the same issue: you don't get any free space right after the windows partition...

I see several options for a non-destructive solution in this case:
- move all your data to the / partition so that you can delete and rebuild the partition
- resize your root partition, create a new partition in the freed-up space and use that to copy over your data - then delete and resize the original data partition
- minimize the contents of the windows partition as far possible: you can create one or more new partitions anywhere on the disk (by resizing other ones) and move the windows temporary and swap files as well as large applications to separate partitions. This could lead to some minor windows performance loss, however.

All of this is best done from a Gparted liveCD; and if you start deleting/creating partitions, you should be aware that your partitions are likely to get renumbered in the process and that you will have to adjust your /etc/fstab accordingly if you want your Linux to be able to boot again.

Last edited by jay73; 05-27-2007 at 06:49 AM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Reallocating Disk Space sarrab20 Fedora 1 07-07-2006 06:46 PM
Reallocating space pulisubs Linux - Newbie 2 09-16-2004 12:29 PM
Low Harddisk space. Can I just transfer the entire Linux to a bigger harddisk? davidas Linux - Newbie 12 04-13-2004 02:03 AM
Reallocating space for existing install invictus Linux - General 6 09-08-2003 04:13 PM
Reallocating free Space stratos Linux - Newbie 2 08-15-2002 11:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:39 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