You are not logged in.

#1 2005-10-16 14:43:14

biio
Member
From: Sweden
Registered: 2005-07-19
Posts: 39

Resize an ext3-partition

Hi, I didnt know which forum that was best to post in so I took the Workstation-forum.
I have a little problem. My computer is running a ext3 filesystem, and I realy need to make another partition on that disk without losing the old data (and I have no place to use for backup). I tried parted, but didnt work because of this: http://lists.gnu.org/archive/html/bug-p … 00081.html
So is there any other software that will do the trick? (Dont say partitionmagic, dont have acces to windowscomputer right now.) If it would do any difference, Im using a 2.6.13.2 kernel.
Need more info? Just ask.

Offline

#2 2005-10-16 15:11:55

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Resize an ext3-partition

fdisk? (*nix one, of course)

I don't know how feasible it is to keep data with it, though.

Offline

#3 2005-10-16 15:17:42

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: Resize an ext3-partition

you need to have the partition umounted to resize it, so make sure you do it in a live cd like archie or something.

Offline

#4 2005-10-16 15:18:35

biio
Member
From: Sweden
Registered: 2005-07-19
Posts: 39

Re: Resize an ext3-partition

lucke wrote:

fdisk? (*nix one, of course)

I don't know how feasible it is to keep data with it, though.

I dont think I can resize with fdisk, just create partitionstables?

a little edit:

Penguin wrote:

you need to have the partition umounted to resize it, so make sure you do it in a live cd like archie or something.

My partition is umounted, but that doesnt do the trick.

Offline

#5 2005-10-16 15:38:44

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Resize an ext3-partition

Well, as they say on the ML - use resize2fs to resize the filesystem first and then fdisk to shrink the partition.

Excerpt from resize2fs' man:

If you wish to shrink an ext2 partition, first use resize2fs to shrink the size of filesystem.  Then you may use fdisk(8)
       to shrink the size of the partition.  When shrinking the size of the partition, make sure you do not make it smaller than
       the new size of the ext2 filesystem!

Playing with it could be pretty blunder-prone, but well, we learn every day ;-)

I cannot think of any other tools that you could use, except those windowish bootcds whose names I don't remember - but I don't know if they'd have ext2/3 support anyway.

Offline

#6 2005-10-16 18:11:42

biio
Member
From: Sweden
Registered: 2005-07-19
Posts: 39

Re: Resize an ext3-partition

lucke wrote:

Well, as they say on the ML - use resize2fs to resize the filesystem first and then fdisk to shrink the partition.

Excerpt from resize2fs' man:

If you wish to shrink an ext2 partition, first use resize2fs to shrink the size of filesystem.  Then you may use fdisk(8)
       to shrink the size of the partition.  When shrinking the size of the partition, make sure you do not make it smaller than
       the new size of the ext2 filesystem!

Playing with it could be pretty blunder-prone, but well, we learn every day ;-)

I cannot think of any other tools that you could use, except those windowish bootcds whose names I don't remember - but I don't know if they'd have ext2/3 support anyway.

Hum, I thought I read the manual for that program earlier today, but I most have read wrong because I thought it only worked on ext2, but it clearly says it supports more FS-types than that. Dumb me wink
Well, I played around a little with that software, didnt work as I wanted to. But nevermind this thread anymore, I will be moving all my data to another box tomorrow.
Thanks for the help guys.

Offline

#7 2005-10-16 18:57:27

wanderingidea
Member
From: The Hague, The Netherlands
Registered: 2004-12-24
Posts: 26
Website

Re: Resize an ext3-partition

The only way I would resize ext3 is by using Partimage with an external usb harddisk.
I already tried something like this a few times, re-creating the partition and restoring the (Part)image. This is a fairly safe and quick way.

Offline

#8 2005-10-16 21:18:37

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Resize an ext3-partition

resize2fs resizes ext2 (DUH...). ext3 is ext2, with journal. To resize ext3, remove the journal first, like so:

tune2fs -O ^has_journal <device>

Resize as required, and then put the journal back:

tune2fs -O has_journal <device>

or

tune2fs -j <device>

Offline

#9 2005-10-20 10:48:48

pjezek
Member
From: Praha - CZ
Registered: 2005-05-19
Posts: 79

Re: Resize an ext3-partition

Why is this package available in repos, heh? :idea:


Our tomcat for your mice! Archlinux for your comps! Alfa Romeo for your roads! Faster running guaranted!

Offline

#10 2005-10-20 15:43:38

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Resize an ext3-partition

So that people have a choice. If you want a gui for this sort of thing, qtparted is good, but if like me, you're happy enough with the CLI, and you don't already have qt installed, it's 12MB including dependencies that you don't really need.

Offline

Board footer

Powered by FluxBB