You are not logged in.

#1 2009-01-17 22:27:40

BKJ
Member
Registered: 2008-09-19
Posts: 71

e4defrag for ext3 to ext4 migration

Anyone know when this will hit testing/core?  I have already converted all my partitions to ext4 and I am now just awaiting for the ability to run the online defrag tool to make use of the extents and all the other goodness that ext4 will provide.  Thanks in advance.

Offline

#2 2009-01-18 00:35:27

toofishes
Developer
From: Chicago, IL
Registered: 2006-06-06
Posts: 602
Website

Re: e4defrag for ext3 to ext4 migration

I'm not sure it actually exists yet. If you've converted, things will slowly start using extents as files are created and modified- you don't have to do anything. Use lsattr to see if something is using extents- you'll see an 'e' in the big list of attributes.

Offline

#3 2009-01-18 02:18:56

BKJ
Member
Registered: 2008-09-19
Posts: 71

Re: e4defrag for ext3 to ext4 migration

It exists.  See this thread "http://bbs.archlinux.org/viewtopic.php?id=61602&p=4" (post 78).  I am just not bold enough to mess with the kernel.  Also, not really a big deal as I just ran this defrag script located here "http://ck.kolivas.org/apps/defrag/defrag-0.06/defrag" that was mentioned in another arch linux thread (cant find it at the moment).  This seems to work for a migrated ext3 to ext4 to enable extents on the already existing files.

Offline

#4 2009-01-18 02:25:21

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: e4defrag for ext3 to ext4 migration

BKJ wrote:

It exists.  See this thread "http://bbs.archlinux.org/viewtopic.php?id=61602&p=4" (post 78).  I am just not bold enough to mess with the kernel.  Also, not really a big deal as I just ran this defrag script located here "http://ck.kolivas.org/apps/defrag/defrag-0.06/defrag" that was mentioned in another arch linux thread (cant find it at the moment).  This seems to work for a migrated ext3 to ext4 to enable extents on the already existing files.

The script seems like a pretty good solution anyway. Just swapping files around should do the trick. Hopefully anyway, I'm going to do it in the next few hours.

Offline

#5 2009-01-18 02:34:05

toofishes
Developer
From: Chicago, IL
Registered: 2006-06-06
Posts: 602
Website

Re: e4defrag for ext3 to ext4 migration

skottish wrote:
BKJ wrote:

It exists.  See this thread "http://bbs.archlinux.org/viewtopic.php?id=61602&p=4" (post 78).  I am just not bold enough to mess with the kernel.  Also, not really a big deal as I just ran this defrag script located here "http://ck.kolivas.org/apps/defrag/defrag-0.06/defrag" that was mentioned in another arch linux thread (cant find it at the moment).  This seems to work for a migrated ext3 to ext4 to enable extents on the already existing files.

The script seems like a pretty good solution anyway. Just swapping files around should do the trick. Hopefully anyway, I'm going to do it in the next few hours.

Sounds about as useful as a gentoo makeworld. Have fun wasting time.

Offline

#6 2009-01-18 02:47:34

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,544

Re: e4defrag for ext3 to ext4 migration

toofishes wrote:
skottish wrote:
BKJ wrote:

It exists.  See this thread "http://bbs.archlinux.org/viewtopic.php?id=61602&p=4" (post 78).  I am just not bold enough to mess with the kernel.  Also, not really a big deal as I just ran this defrag script located here "http://ck.kolivas.org/apps/defrag/defrag-0.06/defrag" that was mentioned in another arch linux thread (cant find it at the moment).  This seems to work for a migrated ext3 to ext4 to enable extents on the already existing files.

The script seems like a pretty good solution anyway. Just swapping files around should do the trick. Hopefully anyway, I'm going to do it in the next few hours.

Sounds about as useful as a gentoo makeworld. Have fun wasting time.

God forbid we enjoy tinkering with our systems, and have some fun getting a small speed boost. Some people would use the _exact same_ argument you just offered, against using Arch at all - or even any Linux or BSD. It's just how far you're willing to go, which is different for each person. Everyone's capable of looking up benchmarks, or asking for them. Posting for the sole reason to make a snide comment is rather... yeah. Negative, at best. Regardless of whether extents gives a boost of 1% or 100%.

On topic, here is the only benchmark I could find of ext4 with and without extents, it's on the second page, the second graph: http://www.linux-magazine.com/w3/issue/79/Ext4.pdf

Oh, here's another: http://www.csamuel.org/2008/12/29/first … -with-ext4

Last edited by Ranguvar (2009-01-18 02:51:50)

Offline

#7 2009-01-18 16:26:33

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

Re: e4defrag for ext3 to ext4 migration

That e4defrag thing doesn't work with flex_bg option yet and that's default when creating a new ext4 FS. Just FYI.

Offline

#8 2009-01-19 17:21:54

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: e4defrag for ext3 to ext4 migration

lucke wrote:

That e4defrag thing doesn't work with flex_bg option yet and that's default when creating a new ext4 FS. Just FYI.

Lucke, why did you have to go and ruin my day by mentioning this. mad Now I've just got to have the flex_bg option. Then, after I've managed to enable it*, I'll try to figure out what it is!

*I just let my computer spend most of the past 12 hours defragging my newly converted ext4 partitions, all so that I could enable extents. And, just as I was feeling good about things, you have to go and mention the flex_bg option! I must have it!


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#9 2009-01-19 17:24:40

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

Re: e4defrag for ext3 to ext4 migration

If you have flex_bg, you can't use e4defrag. Ergo, you should be happy not to have it!

Offline

#10 2009-01-19 17:31:35

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: e4defrag for ext3 to ext4 migration

lucke wrote:

If you have flex_bg, you can't use e4defrag. Ergo, you should be happy not to have it!

If you're absolutely sure .... O.K., I'm happy again. Thanks.


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#11 2009-01-19 17:39:02

pointone
Wiki Admin
From: Waterloo, ON
Registered: 2008-02-21
Posts: 379

Re: e4defrag for ext3 to ext4 migration

Can you explain this flex_bg option in more detail, please? After mucho Googling, all I've found is that it prevents fragmentation somehow.

I, too, am jealous of those with more options than I--especially the ones I don't understand!


M*cr*s*ft: Who needs quality when you have marketing?

Offline

#12 2009-01-19 17:53:55

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

Re: e4defrag for ext3 to ext4 migration

man mke2fs wrote:

flex_bg
                          Allow bitmaps and inode tables for a block group to be placed anywhere on the storage media (use with -G option to group meta-data in order
                          to create a large virtual block group).

That's all I know about this option.

And here's the excerpt from the defrag patch.

http://www2.kernel.org/pub/linux/kernel/people/tytso/ext4-patches/2.6.28-ext4-4/broken-out/defrag-01-add-ext4-ioc-defrag-ioctl wrote:

+    /*
+     * Will go away.
+     * Now ext4 online defrag does not support flex_bg feature.
+     */
+    if (EXT4_HAS_INCOMPAT_FEATURE(org_inode->i_sb,
+                    EXT4_FEATURE_INCOMPAT_FLEX_BG)) {
+        printk(KERN_ERR "ext4 defrag: online defrag does not support "
+                "flex_bg feature.\n");
+        return -EOPNOTSUPP;
+    }

Note that if you want to use e4defrag, you have to build your own patched kernel - so currently you need both a patched kernel and an ext4 FS without flex_bg (it seems impossible to clear that flag, so if you use default mkfs.ext4 options, you're stuck with it; if you convert from ext3, you don't have that flag).

Offline

#13 2009-01-20 22:44:45

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: e4defrag for ext3 to ext4 migration

toofishes wrote:

Sounds about as useful as a gentoo makeworld. Have fun wasting time.

Yeah, but now instead of seeing nothing but "---------------" using lsattr, I get some of these "-------------e-". And you think that that's not worth a bunch of hours of waiting? WHATEVER!


--EDIT--

This is a little better description of flex_bg. From: http://lists.zerezo.com/linux-kernel/msg13412149.html

ext4: FLEX_BG Kernel support v2.

This feature relaxes check restrictions on where each block groups meta data is
located within the storage media.  This allows for the allocation of bitmaps or
inode tables outside the block group boundaries in cases where bad blocks forces
us to look for new blocks which the owning block group can not satisfy.  This
will also allow for new meta-data allocation schemes to improve performance and
scalability.

Offline

#14 2009-01-20 22:56:53

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: e4defrag for ext3 to ext4 migration

skottish wrote:
toofishes wrote:

Sounds about as useful as a gentoo makeworld. Have fun wasting time.

Yeah, but now instead of seeing nothing but "---------------" using lsattr, I get some of these "-------------e-". And you think that that's not worth a bunch of hours of waiting? WHATEVER!

I know what you mean. I feel really sorry for all those people who get --------------- instead of -------------e- when they type lsattr. They just don't know what they're missing.


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#15 2009-01-21 04:25:43

BKJ
Member
Registered: 2008-09-19
Posts: 71

Re: e4defrag for ext3 to ext4 migration

I don't call it wasting my time....  As of now I have the "-------------e-" as well.  I just used the defrag script.  Time well spent for me.

Offline

#16 2009-02-02 05:08:38

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: e4defrag for ext3 to ext4 migration

So, should I create new ext4 partitions with or without flex_bg if I want to be able to use e4defrag to defrag them in the future? Is this going to be supported by e4defrag soon?

Offline

#17 2009-02-02 12:21:19

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,544

Re: e4defrag for ext3 to ext4 migration

Found this in a January 25th email from the creator of e4defrag:

"The new online defrag handles the flex_bg feature correctly, so you will be able to run e4defrag on the Fedora 10 soon.

Regards, Akira Fujita"

I think 0.95 is the latest? Will search more later.

Offline

#18 2009-02-12 08:39:52

MetalheadGautham
Member
From: Bangalore, India
Registered: 2008-07-27
Posts: 143
Website

Re: e4defrag for ext3 to ext4 migration

CONVERT ? Is there a tool to directly convert an EXT3 file system to EXT4 ?
And is it recommended for my / partition and /home partition ?

Offline

#19 2009-02-12 08:55:44

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: e4defrag for ext3 to ext4 migration

MetalheadGautham wrote:

CONVERT ? Is there a tool to directly convert an EXT3 file system to EXT4 ?
And is it recommended for my / partition and /home partition ?

http://bbs.archlinux.org/viewtopic.php?id=63222


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#20 2009-02-12 16:15:47

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,544

Re: e4defrag for ext3 to ext4 migration

MetalheadGautham wrote:

CONVERT ? Is there a tool to directly convert an EXT3 file system to EXT4 ?
And is it recommended for my / partition and /home partition ?

http://wiki.archlinux.org/index.php/Ext4

Offline

#21 2009-04-08 18:27:00

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: e4defrag for ext3 to ext4 migration

lucke wrote:

Note that if you want to use e4defrag, you have to build your own patched kernel - so currently you need both a patched kernel and an ext4 FS without flex_bg (it seems impossible to clear that flag, so if you use default mkfs.ext4 options, you're stuck with it; if you convert from ext3, you don't have that flag).

Sorry to add to an older thread, but can someone answer a question for an ext4 newb?  I'm planning to backup, nuke, and create an ext4 formatted /home right now (using 2.6.29).  I was going to use gparted to make the ext4.  Thoughts about whether or not it will have this flex_bg flag this way?

Last edited by graysky (2009-04-08 18:28:03)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#22 2009-04-08 19:12:44

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,544

Re: e4defrag for ext3 to ext4 migration

flex_bg is a default ext4 option; it should. mkfs.ext4 does it, at least. You can check with tune2fs -l /dev/foo after you make the partition.

Offline

Board footer

Powered by FluxBB