You are not logged in.

#1 2005-07-22 12:25:15

mico
Member
From: Slovenia
Registered: 2004-02-08
Posts: 247

mount ro vs. rw,sync

I'm building a linux system that will be powered off simply by switching off the power, so the / partition is mounted read only. Problem is that it needs to copy or delete some files occasionally.

For this purpose I have another ext2 partition which is mounted with options rw,sync in fstab. The power would never be switched off during file creation, copy, ..., but only after such tasks are finished. Could I just switch off the power or would the filesystem get corrupted?

I could also mount ro, then before copying remount to rw and back to ro. It is a bit awkward, though. And I'd need root privileges for that.

Offline

#2 2005-07-22 13:51:50

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: mount ro vs. rw,sync

where do you need to write to?

you could look into unionfs....
http://www.unionfs.org/

Offline

#3 2005-07-22 14:25:27

mico
Member
From: Slovenia
Registered: 2004-02-08
Posts: 247

Re: mount ro vs. rw,sync

I'm not sure about this unionfs. It means additional space and a kernel module.

I am not building a live distro. The data I need to write is small. And it needs to be written on very rare occasions. But it needs to stay on disk after shutdown.

Basically what I wanted to ask is: will an unclean poweroff cause any corruption on ext2 (non journalizing filesystem), mounted with "rw,sync"? I can safely assume none of write processes will still be in progress when the power is switched off. The media is compact flash, so there is no need to fear of any disk cache?

Offline

Board footer

Powered by FluxBB