LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 07-12-2010, 02:20 PM   #1
davholla
Member
 
Registered: Jun 2003
Location: London
Distribution: Linux Mint 13 Maya
Posts: 729

Rep: Reputation: 32
Gparted problems


I want to use Gparted to extra space to /dev/sda5/. Using a live CD I shrunk /dev/sda7 and I have 9.77 Gb of free space.

However I can not increase the size of /dev/sda5 - I can only shrink it.

Any ideas? Do I need to reboot and then try?
 
Old 07-12-2010, 02:28 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Please post the complete list of partitions, sizes, etc. A screenshot form GParted or just a cut and paste of the results of "fdisk -l"
 
Old 07-12-2010, 03:13 PM   #3
davholla
Member
 
Registered: Jun 2003
Location: London
Distribution: Linux Mint 13 Maya
Posts: 729

Original Poster
Rep: Reputation: 32
Thanks for the quick reply:-

Code:
sudo fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x70000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1           8       64228+   6  FAT16
/dev/sda2               9        1314    10485760    7  HPFS/NTFS
/dev/sda3   *        1314       30965   238176090+   7  HPFS/NTFS
/dev/sda4           30966       60801   239657670    5  Extended
/dev/sda5           30966       31984     8185086   83  Linux
/dev/sda6           31985       32493     4088511   82  Linux swap / Solaris
/dev/sda7           32494       59526   217142541   83  Linux
 
Old 07-12-2010, 03:47 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
You have a pretty straightforward situation here. The extended partition (sda4) goes to the limit of the disk---thus all the space on the disk is useable. Any partition editor should be showing that you have ~ 21.5 GB free space at the end of sda7. (thus there should be no issue resizing sda7)

How much of sda3 is being used?

If I were to set up a 500GB disk from scratch (for dual-boot), I would give Windows no more than ~ 20GB. I would then have a partition for shared data (with modern Linux distros, you can use any format for this--including NTFS--but the most common formats are FAT and ext2 or 3. You can install a driver in Windows to access ext2 and 3)
 
1 members found this post helpful.
Old 07-12-2010, 03:50 PM   #5
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by davholla View Post
Using a live CD I shrunk /dev/sda7 and I have 9.77 Gb of free space.

However I can not increase the size of /dev/sda5 - I can only shrink it.
Unfortunately, you shrunk sda7 leaving its start position unchanged. gparted would have let you shrink it leaving its end position unchanged. That would have left less to do.

Now you need to move sda7 so the unpartitioned space is before it instead of after it.

Then you need to move sda6 so the unpartitioned space is before it instead of after it. But since sd6 is swap, if you don't have any suspend to disk data in it at the time you repartition, it is likely easier to delete it and then recreate it, rather than move it.

Then you can expand sda5.

All that can be done in the liveCD similar to the way you shrunk sda7.

Last edited by johnsfine; 07-12-2010 at 03:58 PM.
 
1 members found this post helpful.
Old 07-13-2010, 01:21 PM   #6
davholla
Member
 
Registered: Jun 2003
Location: London
Distribution: Linux Mint 13 Maya
Posts: 729

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by johnsfine View Post
Unfortunately, you shrunk sda7 leaving its start position unchanged. gparted would have let you shrink it leaving its end position unchanged. That would have left less to do.

Now you need to move sda7 so the unpartitioned space is before it instead of after it.

Then you need to move sda6 so the unpartitioned space is before it instead of after it. But since sd6 is swap, if you don't have any suspend to disk data in it at the time you repartition, it is likely easier to delete it and then recreate it, rather than move it.

Then you can expand sda5.

All that can be done in the liveCD similar to the way you shrunk sda7.


Thanks that makes sense. I moved sda7 which take a very very long time - However sda6 is locked so I can not do anything.
Any ideas?

Code:
sudo fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x70000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1           8       64228+   6  FAT16
/dev/sda2               9        1314    10485760    7  HPFS/NTFS
/dev/sda3   *        1314       30965   238176090+   7  HPFS/NTFS
/dev/sda4           30966       60801   239657670    5  Extended
/dev/sda5           30966       31984     8185086   83  Linux
/dev/sda6           31985       32493     4088511   82  Linux swap / Solaris
/dev/sda7           33769       60801   217142541   83  Linux
 
Old 07-13-2010, 01:43 PM   #7
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
You need to stop the Linux you are booted in (the liveCD, I assume) from using swap in order to do anything to sda6.

As root, give the command

/sbin/swapoff -a
 
1 members found this post helpful.
Old 07-13-2010, 03:01 PM   #8
davholla
Member
 
Registered: Jun 2003
Location: London
Distribution: Linux Mint 13 Maya
Posts: 729

Original Poster
Rep: Reputation: 32
Thanks - so far so good. Of course I have not finished yet.

That worked with no loss of data.

Last edited by davholla; 07-14-2010 at 10:04 AM.
 
  


Reply



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
[SOLVED] Partition problems gparted fdisk ubume2 Linux - General 2 09-18-2009 10:44 PM
Problems with Partitions in Gparted krimzen85 Linux - Newbie 4 08-13-2009 06:05 PM
Problems using gparted! kris2pe Linux - Software 38 08-15-2007 01:11 PM
GParted NTFS Resizing-Has anyone had any problems with it? FreeDoughnut Linux - Software 11 11-08-2006 06:14 AM

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

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