LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-23-2009, 03:48 PM   #1
ahurd
Member
 
Registered: Sep 2007
Posts: 76

Rep: Reputation: 15
Need help resizing / partition


I am on Kubuntu 8.04. The partition on which / is mounted has run out of space. In gparted, / is immediately preceed by /home and followed by extended, which has a huge size but no bytes available, It is followed by swap, then one smaller partition from which I could steal bytes. However, clicking on resize shows no space available before or after /. What can I do? Thanks.
 
Old 02-23-2009, 04:00 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Can you post the output of
fdisk -l
mount
and
df -m
in code tags?
 
Old 02-23-2009, 04:10 PM   #3
ahurd
Member
 
Registered: Sep 2007
Posts: 76

Original Poster
Rep: Reputation: 15
fdisk -l showed nothing. For the other 2 here it is.
Code:
albert@ALBERT:~$ mount
/dev/sda3 on / type ext3 (rw,relatime,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda2 on /home type ext3 (rw,relatime)
/dev/sda7 on /DATA type ext3 (rw)
overflow on /tmp type tmpfs (rw,size=1048576,mode=1777)
nfsd on /proc/fs/nfsd type nfsd (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)

albert@ALBERT:~$ df -m
Filesystem           1M-blocks      Used Available Use% Mounted on
/dev/sda3                11907     11846         0 100% /
varrun                    1013         1      1013   1% /var/run
varlock                   1013         0      1013   0% /var/lock
udev                      1013         1      1013   1% /dev
devshm                    1013         0      1013   0% /dev/shm
/dev/sda2                29760      9155     19106  33% /home
/dev/sda7               399569      3611    375661   1% /DATA
overflow                     1         1         1  11% /tmp

Last edited by Tinkster; 02-23-2009 at 04:24 PM. Reason: code tags
 
Old 02-23-2009, 04:24 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
For fdisk: try running as root (or using sudo).
 
Old 02-23-2009, 04:32 PM   #5
ahurd
Member
 
Registered: Sep 2007
Posts: 76

Original Poster
Rep: Reputation: 15
here it is:
Code:
albert@ALBERT:~$ sudo fdisk -l
[sudo] password for albert:

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

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1912    15358108+   7  HPFS/NTFS
/dev/sda2            1913        5736    30716280   83  Linux
/dev/sda3            5737        7266    12289725   83  Linux
/dev/sda4            7267       60801   430019887+   5  Extended
/dev/sda5            7267        7521     2048256   82  Linux swap / Solaris
/dev/sda6            7522        9051    12289693+  83  Linux
/dev/sda7            9052       60801   415681843+  83  Linux

Disk /dev/sdb: 259 MB, 259522560 bytes
65 heads, 32 sectors/track, 243 cylinders
Units = cylinders of 2080 * 512 = 1064960 bytes
Disk identifier: 0xc3072e18

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         244      253423    6  FAT16
Partition 1 has different physical/logical endings:
     phys=(249, 64, 32) logical=(243, 44, 30)

Last edited by Tinkster; 02-23-2009 at 04:33 PM. Reason: added code tags
 
Old 02-23-2009, 04:41 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
I guess you could disable swap, resize sda7, move the swap partition,
then resize extended, then move extended to the back of the drive and
increase root by what you gained. There's also the question what the
purpose of sda6 might be, which is partitioned but not used anywhere.



Cheers,
Tink


P.S.: Please, for posting output of command line tools, make use
of the CODE tags ... it makes is so much easier to read.
 
Old 02-23-2009, 05:11 PM   #7
ahurd
Member
 
Registered: Sep 2007
Posts: 76

Original Poster
Rep: Reputation: 15
Could you spell this out in more detail. I am not very clear what happens to available resizing space for remaining partitions when eg other partitions are deleted or resized. As to sda6 I am not sure what is in it but think it could be deleted. It is not mounted.
 
Old 02-23-2009, 05:39 PM   #8
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,053

Rep: Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881
Quote:
Originally Posted by ahurd View Post
and followed by extended, which has a huge size but no bytes available
This is normal. And I suspect that you haven't fully grasped what is going on (and my apologies in advance if I am explaining something that you actually already know).

'Extended' is a container partition; in other words it just acts as a 'placeholder' in the partition table saying, in effect, 'there are other partitions here, we'll get around to the details later'. To see what that means in practice, look at the starting and ending block numbers:
Code:
Device    Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1912    15358108+   7  HPFS/NTFS
/dev/sda2            1913        5736    30716280   83  Linux
/dev/sda3            5737        7266    12289725   83  Linux
/dev/sda4            7267       60801   430019887+   5  Extended
/dev/sda5            7267        7521     2048256   82  Linux swap / Solaris
/dev/sda6            7522        9051    12289693+  83  Linux
/dev/sda7            9052       60801   415681843+  83  Linux
sda4 uses 7267 to 60801 and yet sda5, sda6 and sda7 are also mapped sequentially into that space (7267 to 7521, 7522 to 9051 and 9052 to 60801, respectively). That would make no sense (you'd be using the same block for two different things), except for the fact that sda4 is only a container for sda5, etc.

In terms of 'quick fixes' from where you are now:
  • Do you have a live CD that you can use? (this just makes the mechanics of fiddling with partition tables easier and isn't an absolute necessity)?
  • Do you have log files that are growing out of control? what else have you done that might be eating into disk space (storing media files?? installed lots of applications?) because at one point you had space, and now you don't. If you can even get a few hundred megabytes back temporarily, you'll have a bit of breathing space to make changes.
  • What about sda7 (/DATA). That looks to have plenty of spare space, and if you can push all the used stuff up to one end and split it, it looks as if that can give you plenty of space.
  • (Once you have made some space to do it) you could move something that is currently under '/' on to another partition; maybe moving something like /usr off on to a partition of its own would make you enough space.
 
Old 02-23-2009, 09:17 PM   #9
ahurd
Member
 
Registered: Sep 2007
Posts: 76

Original Poster
Rep: Reputation: 15
I booted into Parted Magic and used gparted to delete /sda6 and move swap so I ended up with following:
sda4 extended 410.1g
unallocated 2.93g
sda5 swap 1.95g
unallocated 8.79g
sda6 396.43g
The / partition is /sda3 and I believe I can go back into gparted and enlarge /sda3 by the 2.93g of unallocated but I decided to stop and check with you.

ANOTHER THING TO REPORT. When I got out of Parted Magic to resume boot. I got fsck error. The reported problem is:

log of fsck -C -R -A -a
Mon Feb 23 17:41:31 2009

fsck 1.40.8 (13-Mar-2008)
WARNING: bad format on line 15 of /etc/fstab
/dev/sda2: clean, 11771/1925120 files, 2404319/7679070 blocks
/dev/sda6: clean, 22620/51970048 files, 2555258/103920460 blocks
fsck.ext3: No such file or directory while trying to open /dev/sda7
/dev/sda7:
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>

fsck died with exit status 8

Mon Feb 23 17:41:32 2009

My fstab is as follows:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda3
UUID=e38270b7-e9ca-4bb7-b939-fb97471395d1 / ext3 relatime,errors=remount-ro 0 1
# /dev/sda2
UUID=cd446e71-9e00-4582-baf0-bb1a3b17af37 /home ext3 relatime 0 2
# /dev/sda5
UUID=2af623e6-e190-4690-b2e5-e7fdf3564996 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
/dev/sda6 /mnt/sda6 ext3 defaults 1 2
/dev/sda7 /DATA ext3 defaults 1 2

I resumed boot with Control D and everything seems to be ok. Is there anything to worry about?
 
  


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
resizing partition? ocicat Linux - Newbie 1 07-02-2008 05:48 PM
Resizing a partition metallica1973 Linux - Software 1 09-19-2006 07:28 PM
Resizing partition. Khalinsar Linux - Newbie 4 03-23-2006 10:17 AM
Problem Resizing Linux Partition From Partition magic John_Emad SUSE / openSUSE 5 02-16-2005 01:42 PM
need help resizing an ext3 partition with an underlying partition... spiroth10 Linux - Software 1 07-30-2004 01:21 PM


All times are GMT -5. The time now is 10:37 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration