LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-25-2005, 02:43 PM   #1
VincentB
Member
 
Registered: Jun 2003
Location: Brussels, Belgium
Distribution: Ubuntu 6.10
Posts: 139

Rep: Reputation: 15
How to resize ext3 partitions?


All,

Recently I have installed Fedora Core 3.0 on my PC, in a dual boot with Windows XP. I have an issue now on this PC (DELL 510m - HD 60 Gb). One of the Linux partition will become soon full (/) while the other one (/home1) is nearly empty, as you can see hereafter.

Code:
(parted) print
Géométrie du disque pour /dev/hda: 0.000-57231,562 mégaoctets
Type d'étiquette de disque: msdos
Mineur   Départ      Fin     Type      Sys.fichiersFanions
1          0,031   2047,346  primaire  fat16
2       2047,346   9546,438  primaire  ntfs        amorce
3       9546,438  57231,562  étendue              lba
5       9546,469  11052,531  logique   ntfs
6      11052,562  26058,559  logique   ntfs
7      26058,590  32561,433  logique   ntfs
8      32561,464  39064,306  logique   ext3
9      39064,337  56062,771  logique   ext3
10     56062,802  57058,989  logique   linux-swap

On the XP partition, I have installed Partition Magic 8.0 which I used to resize the Windows partition, before installing FC 3.0. On an other PC, I used PM to resize a Linux partition ... which screw up the whole Linux partition: it did not boot anymore and I had to reinstall everything from scratch. My conclusion is then that PM is not the tool I should use to resize my laptop partitions.

On the Linux partition of my laptop, I have installed QTParted which does not allow me to manipulate Linux active partition (roughly speaking I can jut see that properties of my linux partitions).

Additional information (I am nevertheless not sure it is relevant) : I use grub as boot loader.
[
Code:
 
    root@fedora vincent]# more /etc/grub.conf
    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE: You do not have a /boot partition. This means that
    # all kernel and initrd paths are relative to /, eg.
    # root (hd0,7)
    # kernel /boot/vmlinuz-version ro root=/dev/hda8
    # initrd /boot/initrd-version.img
    #boot=/dev/hda
    default=0
    timeout=5
    splashimage=(hd0,7)/boot/grub/splash.xpm.gz
    hiddenmenu
    title Fedora Core (2.6.10-1.770_FC3)
    root (hd0,7)
    kernel /boot/vmlinuz-2.6.10-1.770_FC3 ro root=LABEL=/ rhgb quiet
    initrd /boot/initrd-2.6.10-1.770_FC3.img
    title Windows XP
    rootnoverify (hd0,1)
    chainloader +1
and here is my fstab configuration file:

Code:
  [root@fedora vincent]# more /etc/fstab
    # This file is edited by fstab-sync - see 'man fstab-sync' for details
    LABEL=/ / ext3 defaults 1 1
    none /dev/pts devpts gid=5,mode=620 0 0
    none /dev/shm tmpfs defaults 0 0
    LABEL=/home1 /home ext3 defaults 1 2
    none /proc proc defaults 0 0
    none /sys sysfs defaults 0 0
    LABEL=SWAP-hda10 swap swap defaults 0 0
    /dev/hdc /media/cdrecorder auto pamconsole,exec,noauto,fscontext=system_u:object_r :removable_t,managed 0 0

Moreover (QT)parted does not resize ext3 partitions. I have then tried to boot from Knoppix, convert the ext3 partition to ext2 and tried to resize the partition with parted ... without success.

My question is simple: how do I have to proceed in order to safely transfer unused space from the /home1 partition to the / partition without destroying my linux installation or loosing data? I have already spent so much time in installing and configuring everything on this PC and I would really like to avoid to re-do it from scratch. I have googled a lot without finding a safe and step-by-step way of doing this.

Please describe your solution with as many details as possible.
Please avoid vague and unclear solution: I have already tried soo much ...

You are my last hope ...

Thanks in advance for your help.
Do not hesitate to ask for more information if something is missing or unclear in my explanations.


Vincent Borreux
Brussels-Belgium
 
Old 05-26-2005, 11:56 AM   #2
kornerr
Member
 
Registered: Dec 2004
Location: Russia, Siberia, Kemerovo
Distribution: Slackware
Posts: 893

Rep: Reputation: 35
If you check all your partitions for errors in PM8, it should work.

You can resize ext3 with the help of "resize2fs".
(Maybe first you'll need to convert ext3 to ext2 (google))
But before using it read "man resize2fs"!
Also I HIGHLY recommend this very good link. Although it's about ntfs resizing, this document describes the use of an app which works just like "resize2fs".
Nevertheless you cannot move partitions with "resize2fs". But if you have enough space you can "simulate moving" (by creating/deleting/etc partitions).

Optionally you can read my signature

and I cannot see how "(parted) print" command can show you the available space... I believe that "(c)fdisk", "df -h" can do it... better.

"(qt)parted" can't resize ext3 (at least mine). But new "GParted", which uses "resize2fs" CAN do it (it needs modern GNOME libraries and it's only GUI app).
 
  


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
How to resize a ext3 partition? towel401 Linux - General 3 10-14-2005 05:30 PM
Can't resize ext3 Partition crack Linux - General 2 09-04-2005 07:39 AM
Resize an EXT3 charris Linux - Hardware 3 06-23-2004 01:43 PM
Another resize ext3 problem gemini91 Linux - Newbie 7 12-16-2003 03:59 AM
need to resize ext3 filesystem clsonnt Linux - Newbie 2 07-09-2003 10:59 AM

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

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