Dear all,

I am considering using aufs for my company's embedded system. I would 
like to have a read-only partition with the factory-installed firmware 
(i.e. operating system with applications), and a read-write partition 
(user data and all user-initiated firmware upgraded go here). By using 
this configuration, I can restore the system by just formatting the 
read-write partition (reset it to factory state) if anything about user 
data/firmware upgrade go wrong.

In my initramfs, the read-only partition is mounted as /ro, and the 
read-write partitions is mounted as /rw. Then these branches are merged 
to /aufs. Then I move /ro to /aufs/.aufs/ro and /rw to /aufs/.aufs/rw. 
As a last step, I move /aufs to /, and initramfs would finish its job.

That is, after booting up the system, the mount point would be:
/ - AUFS union of /.aufs/ro and /.aufs/rw
/.aufs/ro - read-only partition
/.aufs/rw - read-write partition

But now I found a problem here. I am unable to ensure clean unmount of 
these partitions. Every time I reboot the system, there is always some 
unclean filesystem warning, and seems replaying the journal every time 
for the read-write partition (I am using ext3, and I always see there 
are several deleted inodes being cleaned, and). Being an unattended 
embedded system I am very concerned with it, since it is intended to be 
a security product, and for security reasons remote support is often 
impossible, since it would not be connected to the internet. This test 
is just a new installation and test how aufs works, with very little 
file IO. I am concerned if the filesystem would go wrong if there are 
more file IO, since data loss is often unacceptable in our embedded system.

Is there any way that unmount the filesystem (or at least ensure the 
filesystem being clean) at shutdown/reboot? I tried mounting all the 
partitions read-only but seems it doesn't fix this issue.

Sorry for the long mail, but I believe that it would be better to 
explain my situation clearly and throughly. Thanks in advance.

Regards,
Yiu-Chung Lee

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

Reply via email to