You are not logged in.

#1 2009-06-02 19:36:30

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

avoiding ext4 corruption, is it as simple as rootflags=data=ordered

I read the suggestion on the ext4 data corruption page to add the rootflags=data=ordered option to my kernel line in /boot/grub/menu.lst which I have done.  Is that it?  There are some other suggestions floating around when I search on this in google.  For example, adding nodelalloc to the /etc/fstab for ext4 partitions seems to receive some mixed opinions on this one...

Any advice is appreciated as always.

P.S. I've experienced two data loss issues on my ext4 partitions, both of which were a result of the a power outage.

#1 - damage to my /etc/rc.conf which got cleared upon reboot (empty file)
#2 - my arch64 virtualmachine's 10 gig hdd file (virtual box) got wacked and had to be restored from a backup.

Both of which happened wo/ the rootflags=data=ordered flag which I have now set.

Last edited by graysky (2009-06-03 06:34:50)


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

Offline

#2 2009-06-02 20:14:25

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

Re: avoiding ext4 corruption, is it as simple as rootflags=data=ordered

nodelalloc should prevent data loss caused by delayed allocation, don't know about data=ordered. 2.6.30 contains fixes to those delalloc-related issues and it is just round the corner; kernel26-ice includes those fixes backported from 2.6.30.

Offline

#3 2009-06-02 21:53:52

wakkadojo
Member
Registered: 2009-05-31
Posts: 50

Re: avoiding ext4 corruption, is it as simple as rootflags=data=ordered

@lucke

Are you saying that appending rootflags=data=ordered in /boot/grub/menu.lst and/or using the mount option nodelalloc in /etc/fstab will be unnecessary in kernel 2.6.30?

Last edited by wakkadojo (2009-06-02 22:49:22)

Offline

#4 2009-06-03 08:13:11

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

Re: avoiding ext4 corruption, is it as simple as rootflags=data=ordered

Yes. Unless data=ordered pertains also to another issue.

Offline

#5 2009-06-03 16:55:42

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

Re: avoiding ext4 corruption, is it as simple as rootflags=data=ordered

As I suspected: data=ordered is actually the default, so the wiki tip is kind of ... moot.

Offline

#6 2009-06-03 19:05:36

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

Re: avoiding ext4 corruption, is it as simple as rootflags=data=ordered

@lucke - you're saying that rootflags=data=ordered is a grub default?  In other words, when I experienced data loss as per my original post, it was with rootflags=data=ordered by virtue of it being a default setting? If that's the case, I guess I need to add nodelalloc to my ext4 partitions in /etc/fstab right?

EDIT: I looked in the grub manual but found nothing about either 'rootflags' or 'data=ordered.'  Can you post a reference?

Thanks!

Last edited by graysky (2009-06-03 19:11:08)


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

Offline

#7 2009-06-03 19:22:11

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

Re: avoiding ext4 corruption, is it as simple as rootflags=data=ordered

rootflags sets mount options for the root filesystem (only): http://www.mjmwired.net/kernel/Document … meters.txt

data=ordered is default for ext3 and ext4 (unless specified otherwise - in fstab, by rootflags or with mount command - ordered is used; grep dmesg for it): http://www.mjmwired.net/kernel/Document … s/ext4.txt

nodelalloc in fstab is instead the way to go.  2.6.30 should be released in a few days (-rc8 got released today). Description of introduced fixes/workarounds: http://lwn.net/Articles/322823/

Offline

#8 2009-06-03 19:27:14

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

Re: avoiding ext4 corruption, is it as simple as rootflags=data=ordered

Thanks, lucke.  I removed the rootflags=data=ordered from my /boot/grub/menu.lst and will just hang in there until 2.6.30.

You were right about the ordered data mode:

grep ordered /var/log/dmesg.log
EXT4-fs: mounted filesystem sda2 with ordered data mode
EXT4-fs: mounted filesystem sda6 with ordered data mode

Thanks again!

Last edited by graysky (2009-06-03 19:33:20)


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

Offline

#9 2009-06-05 07:56:08

rwd
Member
Registered: 2009-02-08
Posts: 658

Re: avoiding ext4 corruption, is it as simple as rootflags=data=ordered

you can b.t.w. check if drives are mounted with data=ordered using:

grep -i data= /proc/mounts

Offline

Board footer

Powered by FluxBB