ext3 fun , slow writing speed ????

I have a silly problem, my hard disk structure is shown below. my application is writing a lot of data (25+ frames per seconds) on a read-write partition hda3 all the time.

Hda1 ? swap (128MB) Hda2 ? ext2 ( 400MB) Read - Only Hda3 ? ext2 (58GB)

On site system always switch off from mains so no unmounting. And next time when we switch it on it get stuck in fsck for manual check.

I tried converting ext3 to solve this problem, things works fine it don't stuck for manual fsck but very unusual thing happens.

My writing speeds of the frames to disk drops down to half?

I have no idea why this happens.

It gives me message file system is already journal when I try to do tune2fs ?j, so I change the fstab to ext3 and it works fine except the writing speeds????

Any suggestions ?????????

Thanks

Rushi

Reply to
Rushi
Loading thread data ...

Ext3 will *not* save your filesystem from corruption and having to do a manual fsck. All it does is *reduce the likelihood* of a catastrophic filesystem error if you switch off the power. You will still *inevitably* get a catastrophic filesystem error sometime if you switch off the power to a writing system. If, as you are doing, you are writing a lot of data all the time, then it'll happen sooner or later. If this in not accpetable in your application, you can only change the hardware so that you get some warning that power is about to go off, and shut down or at least unmount the drive cleanly. Consider a UPS that can talk to your box.

AFAIK there is no (linux) filesystem that can guarantee not to corrupt if power is removed, although I suppose you could design one if you are prepared to accept data loss.

--
Trevor Barton
Reply to
Trevor Barton

Thanks Trevor,

I think got to implement something from ACPI, not sure yet if my SBC support the protocol or not.

But for the current system I am not worried about the corrupt data much , I just want to stop the system going to manual fsck and scan it automatically if it goes in that mode

Reply to
Rushi

If you really don't care about data saving over a powerup at all, just make a partition with nothing else on it and reformat it each boot by not mounting it automatically from your fstab and then running mke2fs later in the init script somehwere.

Alternatively, you can probably do the same thing (ie leave it unmounted) and run fsck later with some combination of flags that'll do everything it can automatically as return some error code to the shell if the disk is damaged beyond repair, at which point you can reformat. Look at the man page for fsck.

The boot process only stops and demands a manual fsck because you have the partition being mounted automatically as part of the boot process, and it's determined that the partition is sufficiently brken that it doesn't want to automatically fix it for you, in case it's the wrong thing to do.

Stop that hapenning (through /etc/fstab) and you can then do what you want with it later.

Trev

--
Trevor Barton
Reply to
Trevor Barton

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.