-
December 20th, 2005, 05:04 PM
#1
Enabling linux ext3 full data journal mode
I was wondering if anyone could help me with the following problem.
For a project I'm building some kind of failsafe linux system which users can
switch off with the power button (no monitor attached). Because the system
must be failsafe I'm using a journaling file system (ext3) (in case of a power failure
or someone who accidentally disconnects the power plug).
As far as I know ext3 is using ordered mode by default so it only journals
metadata. Because I want a failsafe system it's better to use full data journaling
(data=journal).
I've searched almost a whole day on google and tried several options but it
still doesn't work.
On several sites I see that I have to add the following flag to my bootloader
Code:
rootflags=data=journal
and add this to my fstab:
- If I don't add the rootflags then the system is getting read/write errors because the filesystem is read only.
- If I don't add the line to my fstab but only the line in my bootloader then the system gets a kernel panic.
- If I add both lines the system also gets a kernel panic.
System info: linux box (mandrake 10.1) kernel 2.6.8.1 with lilo as boot loader, kernel support
for ext3 filesystems (compiled in kernel itself and not as a module).
Who can help me to enable full data journaling?
-
December 20th, 2005, 06:07 PM
#2
If I don't add the rootflags then the system is getting read/write errors because the filesystem is read only.
If the filesystem is read-only, why enable journaling?
If the filesystem is read-only it cannot get corrupted? (except during a harddisk failure)
Not sure if linux uses the same scheme but on BSD I would..
mount / and /usr read-only, mount /tmp on a memory disk and /usr/home and /var on a journaling system. /home (/usr/home) and /var should be the only filesystems that change (during normal operations) and are important enough to save. It shouldn't matter if /tmp gets nuked..
Oliver's Law:
Experience is something you don't get until just after you need it.
-
December 20th, 2005, 07:09 PM
#3
@SirDice
Sorry I forgot to mention that readonly is the error message I get. I want the
root filesystem to be read/write but when I set one of these options then the
system complains that it can't write to the disk because it's mounted ro.
-
December 21st, 2005, 10:06 AM
#4
odd... What does a mount tell you when you get that message? Is it really mounted read-only?
Oliver's Law:
Experience is something you don't get until just after you need it.
-
December 21st, 2005, 06:58 PM
#5
Tomorrow I will look what the error messages are and I shall post the boot.log
and the exact settings I made.
By the way I'm still looking on the internet but there's not very much I can find
about this problem.
-
December 22nd, 2005, 10:58 AM
#6
Oliver's Law:
Experience is something you don't get until just after you need it.
-
December 22nd, 2005, 05:55 PM
#7
reiser4 performs 'atomic' operations; in other words, data cannot get corrupted through a power-off during transfer.
On the other hand, I don't know how much sits in swap before the transfer is done. It is not in the kernel yet though it's easy enough to patch it; and I've never had a problem with reiser4 getting corrupted (and I have had some unclean shutdowns).
-
December 24th, 2005, 04:55 PM
#8
Small update:
@SirDice thanks but I've already read those two links ;-)
A few days ago I posted that I should upload the logfiles. Because the filesystem is in read
only mode (god knows why) the logfiles cannot be updated.
I know that the system first mounts the filesystem in ro mode but the it should switch to
rw mode which is not happening at my system when I turn full journaling on. Anyway
I'm still searching for a solution, when I find it I'll post it here.
-
January 5th, 2006, 03:48 PM
#9
I solved the problem,
First use tune2fs to turn full journaling on on the desired partition:
Code:
tune2fs -o +journal_data /dev/hdaX
then change the /etc/fstab file, add the following line in the option field of the desired partition:
Reboot and check the journaling mode with:
Code:
tune2fs -l /dev/hdaX
it should display the journaling mode with a lot of other info.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|