[Voyage-linux] help with sync scripts
Hofer, Hermann
(spam-protected)
Wed Nov 18 20:09:53 HKT 2009
Hi Rob,
all data will by synced to CF with 'voyage-sync sync', but be care ONLY in a special directory '/.sync/...'. Syncing directly to '/var/log' as example in a running system is not possible. If you call 'voyage-sync sync' and simulate a power outage, all your saved data is available under this directory until 'voyage-sync stop' ist called. With this option all data from ramdisk is synced to '/.sync/...', any process accessing this fs is killed, the directory gets unmounted from RAM and then a sync from '/.sync/var/log' to '/var' on CF is executed. So only if voyage-sync with option 'stop' is called your data gets sync to the correct place on the CF but also any process accesing this fs will get killed, so this should only be an option on shutdown.
I belive it should possible to extend voyage-sync to detect a reboot with data remaining in '/.sync/...' from a previously sync and copy this data over to the correct place before syncing and mounting to ramdisk. If there is interest I can help.
Also I will send Punky a diff to extend voyage-sync (from experimental) with additional output to show this behaviour.
regards,
Hermann
-----Original Message-----
From: voyage-linux-bounces+h.hofer=ahsnet.de at list.voyage.hk [mailto:voyage-linux-bounces+h.hofer=ahsnet.de at list.voyage.hk] On Behalf Of Robert Rawlins - Think Blue
Sent: Tuesday, November 17, 2009 11:50 AM
To: voyage-linux at voyage.hk
Subject: RE: [Voyage-linux] help with sync scripts
Hey Rodney,
Thanks for the reply, I appreciate your help on this. I've just tried
running that command as suggested and it doesn't really appear to make any
difference, it still doesn't actually save the changes onto the card until a
shutdown occurs.
Do you have any other suggestions? I'm sure we must be fairly close to
having a solution, seems wierd that their isn't a script for saving the
changes to the solid state, I'd have thought this would be helpfull to a lot
of people.
Rob
-----Original Message-----
From:
voyage-linux-bounces+robert.rawlins=thinkbluemedia.co.uk at list.voyage.hk
[mailto:voyage-linux-bounces+robert.rawlins=thinkbluemedia.co.uk at list.voyage
.hk] On Behalf Of rodney at optimail.com.au
Sent: 17 November 2009 01:53
To: voyage-linux at voyage.hk
Subject: Re: [Voyage-linux] help with sync scripts
Robert,
looking through voyage-sync: despite the word 'sync' appearing throughout,
I think it isn't actually doing a file system sync, it is just copying
the writeable layer (tmpfs/aufs) to the underlying layer e.g. flash drive.
That may not sync for some time, or shutdown.
How about doing this for an experiment:
remountrw
/etc/init.d/voyage-sync sync
sync
remountro
Rodney
Robert Rawlins wrote:
...
# apart from /var/tmp and /var/log, add extra directories to sync from tmpfs
VOYAGE_SYNC_DIRS="/etc/thinkblue"
And this appears to work well, any changes in this directory are committed
to the disk on reboot. However, trying to sync this directory manually like
follows:
remountrw
/etc/init.d/voyage-sync sync
remountro
The commands run just fine, however, if I then simulate a power loss by
pulling the plug and restarting the system then the changes are not there
when the system comes back to life.
...
_______________________________________________
Voyage-linux mailing list
Voyage-linux at list.voyage.hk
http://list.voyage.hk/mailman/listinfo/voyage-linux
_______________________________________________
Voyage-linux mailing list
Voyage-linux at list.voyage.hk
http://list.voyage.hk/mailman/listinfo/voyage-linux
More information about the Voyage-linux
mailing list