Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Has anybody tried ext4?
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Schwinni
Apprentice
Apprentice


Joined: 02 Sep 2004
Posts: 214
Location: quadrant1.earth. germany.wuerzburg

PostPosted: Wed Oct 22, 2008 5:34 pm    Post subject: Has anybody tried ext4? Reply with quote

Hi all,

I patched my gentoo-sources-2.6.27 with the latest ext4 patches, so that ext4dev is changed to ext4:
http://www2.kernel.org/pub/linux/kernel/people/tytso/ext4-patches/2.6.27-ext4-2/

The patch ran fine and I also have built ext4 into kernel.

Now I'd like to use ext4. Has anybody tried that already?

With regard to the ext4 documentation it should be easy:

Quote:
- Compile and install the latest version of e2fsprogs (as of this
writing version 1.41) from:

http://sourceforge.net/project/showfiles.php?group_id=2406

or

ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/

or grab the latest git repository from:

git://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git

The latest version listed at ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/ is 1.41.3 which is in portage and installed.

Quote:
- Note that it is highly important to install the mke2fs.conf file
that comes with the e2fsprogs 1.41.x sources in /etc/mke2fs.conf. If
you have edited the /etc/mke2fs.conf file installed on your system,
you will need to merge your changes with the version from e2fsprogs
1.41.x.

I have not edited this file and assume that the latest version comes with e2fsprogs.
Further it contains a section for ext4 and ext4dev.

Quote:
- Create a new filesystem using the ext4 filesystem type:

# mke2fs -t ext4 /dev/hda1

Or configure an existing ext3 filesystem to support extents and set
the test_fs flag to indicate that it's ok for an in-development
filesystem to touch this filesystem:

# tune2fs -O extents -E test_fs /dev/hda1

If the filesystem was created with 128 byte inodes, it can be
converted to use 256 byte for greater efficiency via:

# tune2fs -I 256 /dev/hda1

(Note: we currently do not have tools to convert an ext4
filesystem back to ext3; so please do not do try this on production
filesystems.)

OK, I would have to use tune2fs.
But why do I have to append "-E test_fs"?
The patches removed the "dev" from ext4.
BTW, the documentation file was patched also!

Quote:
- Mounting:

# mount -t ext4 /dev/hda1 /wherever

Of course I would edit my /etc/fstab...

What do you mean? Shall I give it a try?
Do I need the "-E test_fs" param or is it an error in the documentation?
From where should I run tune2fs? Is there a LiveCD with the latest e2fsprogs?

The computer is a fresh install and besides the installation time nothing would be lost if someting goes wrong.

Best regards
Chris
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Wed Oct 22, 2008 6:25 pm    Post subject: Reply with quote

Moved from Kernel & Hardware to Unsupported Software.
unsupported stuff, so moved here
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
aronparsons
Tux's lil' helper
Tux's lil' helper


Joined: 04 Oct 2004
Posts: 117
Location: Virginia

PostPosted: Wed Oct 22, 2008 9:01 pm    Post subject: Reply with quote

You shouldn't need to append any options to mkfs.

I've been using ext4dev for months with the latest patches for 2.6.25 and 2.6.26 applied. It's been stable and is much faster than ext3. fsck is much quicker too for those unexpected shutdowns (e.g. failure to resume from suspend correctly).

I say give it a go, but make sure you have a good backup first. I went the route of creating new logical volumes with LVM and moving my data over instead of upgrading my ext3 partitions. I had the disk space to do this (1TB RAID5), but if not, I believe you can just mount as ext4, but you then lose backwards compatibility.
Back to top
View user's profile Send private message
Schwinni
Apprentice
Apprentice


Joined: 02 Sep 2004
Posts: 214
Location: quadrant1.earth. germany.wuerzburg

PostPosted: Wed Oct 22, 2008 10:40 pm    Post subject: Reply with quote

Thanks for your reply.

Unfortunately I don't have any disk space over.

I already checked the 2 relevant partitions and they already have an inode size of 256 bytes.

In order to use extents I have to run tune2fs -O extents -E test_fs /dev/<partition>, right?
Or is it tune2fs -O extents /dev/<partition>, because I have applied the patch to remove the dev state?

Can I run that although the partition is mounted?
If not, which LiveCD/DVD should I use?
Back to top
View user's profile Send private message
Schwinni
Apprentice
Apprentice


Joined: 02 Sep 2004
Posts: 214
Location: quadrant1.earth. germany.wuerzburg

PostPosted: Thu Oct 23, 2008 11:28 am    Post subject: Reply with quote

I did it.
For "tune2fs -O extents" the partition can stay mounted.
Then changing /etc/fstab and a reboot...

The only thing I wonder is the first line of "dmesg | grep EXT":
Code:
EXT3-fs: sda3: couldn't mount because of unsupported optional features (40).
EXT4-fs: barriers enabled
EXT4-fs: delayed allocation enabled
EXT4-fs: file extents enabled
EXT4-fs: mballoc enabled
EXT4-fs: mounted filesystem with ordered data mode.
EXT4 FS on sda3, internal journal on sda3:8
EXT4-fs: barriers enabled
EXT4 FS on sda5, internal journal on sda5:8
EXT4-fs: delayed allocation enabled
EXT4-fs: file extents enabled
EXT4-fs: mballoc enabled
EXT4-fs: mounted filesystem with ordered data mode.


Where does that come from?
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 9280

PostPosted: Thu Oct 23, 2008 12:42 pm    Post subject: Reply with quote

I've put together an ebuild based on 2.6.27.3 + gentoo patchset + the ext4 patch:

http://rapidshare.com/files/156778164/ext4-sources-2.6.27.3.ebuild.html

Use at your own risk! This is not yet tested with an actual ext4 filesystem, but compiles fine and boots successfully.

I do have an ext4 partition at home (not to confuse with /home ;)) but my laptop runs on reiserfs, so I can't test it myself for now.
Back to top
View user's profile Send private message
Schwinni
Apprentice
Apprentice


Joined: 02 Sep 2004
Posts: 214
Location: quadrant1.earth. germany.wuerzburg

PostPosted: Thu Oct 23, 2008 1:32 pm    Post subject: Reply with quote

Since your ebuild does exactly the same like my manual patching (gentoo-sources-2.6.27 patched with 2.6.27-ext4-2), and my setup works with / and /home mounted as ext4 I would say that the kernel built with the ebuild will work also...
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 9280

PostPosted: Thu Oct 23, 2008 2:48 pm    Post subject: Reply with quote

Using .3 though corrected a v86d segfault with the ext4-patched kernel image.

I'm going to try that out with my 1TB backup fileserver once I'm setting it up. ext4 is exactly what I need there.
Back to top
View user's profile Send private message
Schwinni
Apprentice
Apprentice


Joined: 02 Sep 2004
Posts: 214
Location: quadrant1.earth. germany.wuerzburg

PostPosted: Thu Oct 23, 2008 3:39 pm    Post subject: Reply with quote

gentoo-sources-2.6.27-r1 just reached portage and the patch ran fine.
That should be the same like your ebuild.

So, the ebuild should work fine. ;)
Back to top
View user's profile Send private message
Jimmy Jazz
Guru
Guru


Joined: 04 Oct 2004
Posts: 333
Location: Strasbourg

PostPosted: Thu Oct 23, 2008 8:07 pm    Post subject: Reply with quote

Schwinni wrote:
I did it.

The only thing I wonder is the first line of "dmesg | grep EXT":
Code:
EXT3-fs: sda3: couldn't mount because of unsupported optional features (40).



You need the right e2fsprogs ebuild. Probably the 1.41.3.
_________________
« La seule condition au triomphe du mal, c'est l'inaction des gens de bien » E.Burke
Code:

+----+----+----+
|    |::::|    |
|    |::::|    |
+----+----+----+

motto: WeLCRO
WritE Less Code, Repeat Often
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 9280

PostPosted: Thu Oct 23, 2008 8:15 pm    Post subject: Reply with quote

It is, according to his first post. ;)
Back to top
View user's profile Send private message
Schwinni
Apprentice
Apprentice


Joined: 02 Sep 2004
Posts: 214
Location: quadrant1.earth. germany.wuerzburg

PostPosted: Thu Oct 23, 2008 9:26 pm    Post subject: Reply with quote

genstorm wrote:
It is, according to his first post. ;)

Of course, as ~arch user I always have the latest packages. :lol:

No seriously, I really don't know where this comes from.
I mean, everything works and a forced fsck said that everything is alright.
Back to top
View user's profile Send private message
Jimmy Jazz
Guru
Guru


Joined: 04 Oct 2004
Posts: 333
Location: Strasbourg

PostPosted: Thu Oct 23, 2008 10:44 pm    Post subject: Reply with quote

Schwinni wrote:
genstorm wrote:
It is, according to his first post. ;)

Of course, as ~arch user I always have the latest packages. :lol:

No seriously, I really don't know where this comes from.
I mean, everything works and a forced fsck said that everything is alright.


Sorry I didn't read well ;)

I'm only using ext4dev right now but after reading /etc/mke2fs.conf file, ext4 doesn't have the options test_fs=1 flag any more. Perhaps there is something to dig here.
_________________
« La seule condition au triomphe du mal, c'est l'inaction des gens de bien » E.Burke
Code:

+----+----+----+
|    |::::|    |
|    |::::|    |
+----+----+----+

motto: WeLCRO
WritE Less Code, Repeat Often


Last edited by Jimmy Jazz on Fri Oct 24, 2008 10:25 am; edited 1 time in total
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 9280

PostPosted: Thu Oct 23, 2008 10:53 pm    Post subject: Reply with quote

I'm trying it out myself now, let's see if it shows the same message...
Back to top
View user's profile Send private message
Schwinni
Apprentice
Apprentice


Joined: 02 Sep 2004
Posts: 214
Location: quadrant1.earth. germany.wuerzburg

PostPosted: Thu Oct 23, 2008 11:21 pm    Post subject: Reply with quote

Yes, perhaps the message comes because I didn't set "-E test_fs" with tune2fs.
On the other hand, that shouldn't be needed because of the patch.
Weird...
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 9280

PostPosted: Fri Oct 24, 2008 10:12 am    Post subject: Reply with quote

I do not get that message. Did a "tune2fs -O extents /dev/sdb1" just like you and get the following output:
Code:
EXT3 FS on sda8, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
EXT4-fs: barriers enabled
EXT4 FS on sdb1, internal journal on sdb1:8
EXT4-fs: delayed allocation enabled
EXT4-fs: file extents enabled
EXT4-fs: mballoc enabled
EXT4-fs: mounted filesystem with ordered data mode.

I still have an ext3 partition around, both mount fine.
Back to top
View user's profile Send private message
Jimmy Jazz
Guru
Guru


Joined: 04 Oct 2004
Posts: 333
Location: Strasbourg

PostPosted: Fri Oct 24, 2008 10:24 am    Post subject: Reply with quote

Jimmy Jazz wrote:

Sorry did read well ;)


Oops should have been didn't :)

Anyway we can read that ext4 has been declared stable in the last git sources. It's worth trying it then.
_________________
« La seule condition au triomphe du mal, c'est l'inaction des gens de bien » E.Burke
Code:

+----+----+----+
|    |::::|    |
|    |::::|    |
+----+----+----+

motto: WeLCRO
WritE Less Code, Repeat Often
Back to top
View user's profile Send private message
Schwinni
Apprentice
Apprentice


Joined: 02 Sep 2004
Posts: 214
Location: quadrant1.earth. germany.wuerzburg

PostPosted: Fri Oct 24, 2008 1:19 pm    Post subject: Reply with quote

genstorm wrote:
I do not get that message. Did a "tune2fs -O extents /dev/sdb1" just like you and get the following output:
Code:
EXT3 FS on sda8, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
EXT4-fs: barriers enabled
EXT4 FS on sdb1, internal journal on sdb1:8
EXT4-fs: delayed allocation enabled
EXT4-fs: file extents enabled
EXT4-fs: mballoc enabled
EXT4-fs: mounted filesystem with ordered data mode.

I still have an ext3 partition around, both mount fine.


What mount options do you use?
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 9280

PostPosted: Fri Oct 24, 2008 9:41 pm    Post subject: Reply with quote

Nothing special, just the defaults.
Back to top
View user's profile Send private message
Schwinni
Apprentice
Apprentice


Joined: 02 Sep 2004
Posts: 214
Location: quadrant1.earth. germany.wuerzburg

PostPosted: Fri Oct 24, 2008 9:53 pm    Post subject: Reply with quote

Hmm, I use "defaults,user_xattr".
Gonna set it to defaults and see what happens...
Back to top
View user's profile Send private message
Grahammm
Tux's lil' helper
Tux's lil' helper


Joined: 01 Sep 2004
Posts: 84
Location: Berkshire UK

PostPosted: Sun Oct 26, 2008 3:58 pm    Post subject: Reply with quote

I have already converted my /home partition to ext4 and am considering converting my root partition (currently ext3). I am using the 2.6.27-ext4-2 patchset applied to gentoo-sources-2.6.27-r1. But before I convert the root partition, there are a couple of things I want to make sure of first.

1) For safety, I want to have a rescue CD/DVD/USB stick with a kernel (preferably a patched 2.6.27) and e2fsprogs which can handle ext4. Obviously the Gentoo live CDs do not. Are there any live CDs which do?

2) That the root partition will mount as ext4. The documentation says that the ext4 driver can mount an ext3 partition, so I edited /etc/fstab to make / ext4 but after re-booting it still showed as ext3. So i want to make sure that if I enable extents, that it will mount (especially if I have not got a rescue disk which groks ext4)
Back to top
View user's profile Send private message
boris64
Veteran
Veteran


Joined: 04 Oct 2003
Posts: 1770
Location: Vechelde/Peine

PostPosted: Sun Oct 26, 2008 5:12 pm    Post subject: Reply with quote

I'm also using ext4 on all partitions for about a week
now and got no problems yet.

There is just one tiny thing that needs to be resolved to use
it on my root partition.
I didn't find any grub version, that can boot an ext4 root partition (w/o extra /boot).
Is there anyone who found a working patch etc.?
_________________
boris64.net 200x / visit my desktop / try these tiny kernel patches ;)
Back to top
View user's profile Send private message
sleipner
n00b
n00b


Joined: 13 Aug 2005
Posts: 48

PostPosted: Sun Oct 26, 2008 6:43 pm    Post subject: Reply with quote

boris64 wrote:
There is just one tiny thing that needs to be resolved to use
it on my root partition.
I didn't find any grub version, that can boot an ext4 root partition (w/o extra /boot).
Is there anyone who found a working patch etc.?


http://ext4.wiki.kernel.org/index.php/Ext4_Howto#Booting_from_an_ext4_filesystem
Back to top
View user's profile Send private message
mikkoc
Apprentice
Apprentice


Joined: 24 May 2007
Posts: 231

PostPosted: Sun Oct 26, 2008 7:04 pm    Post subject: Reply with quote

So, I have 2.6.28 kernel with ext4 support built-in (no ext4dev).

I also have e2fsprogs-1.41.3

What do I need to switch to ext4?
Is it enough to change ext3 to ext4 in /etc/fstab?

I currently have:
/dev/sda8 / ext3 defaults 0 1

thanks
Back to top
View user's profile Send private message
Schwinni
Apprentice
Apprentice


Joined: 02 Sep 2004
Posts: 214
Location: quadrant1.earth. germany.wuerzburg

PostPosted: Sun Oct 26, 2008 9:03 pm    Post subject: Reply with quote

mikkoc wrote:
So, I have 2.6.28 kernel with ext4 support built-in (no ext4dev).

I also have e2fsprogs-1.41.3

What do I need to switch to ext4?
Is it enough to change ext3 to ext4 in /etc/fstab?

I currently have:
/dev/sda8 / ext3 defaults 0 1

thanks

You want to use extents:
Code:
tune2fs -O extents /dev/sda8

Do that before you mount it as ext4.

And have a look if the inode size is 256 bytes:
Code:
tune2fs -l /dev/sda8 | grep "Inode size"

But be warned: That takes some time!

If it is 128, you should unmout the partition and set the inode size to 256 bytes:
Code:
tune2fs -I 256 /dev/sda8
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum