[Voyage-linux] periodic sync'ing from tmpfs to flash
Teco Boot
(spam-protected)
Sun Feb 6 00:53:34 HKT 2011
I updated voyage-sync, for better logging.
Test results below, and updated script attached.
Push this into daily?
Thanks, Teco
-------------- next part --------------
A non-text attachment was scrubbed...
Name: voyage-sync
Type: application/octet-stream
Size: 7974 bytes
Desc: not available
URL: <http://list.voyage.hk/pipermail/voyage-linux/attachments/20110205/4eaa14c5/attachment.obj>
-------------- next part --------------
syslog, before power down:
==========================
Feb 5 16:07:57 Voyage root: test before sync
Feb 5 16:08:17 Voyage voyage-sync: Synchronizing tmpfs changed files...
Feb 5 16:08:17 Voyage voyage-sync: Sync'ing /var/log to /.sync/var
Feb 5 16:08:17 Voyage voyage-sync: Sync'ing /var/tmp to /.sync/var
Feb 5 16:08:17 Voyage voyage-sync: Synchronization tmpfs completed
Feb 5 16:11:59 Voyage root: after sync
The last three lines are lost, you can check below.
syslog, after power failure recovery:
=====================================
Feb 5 16:07:57 Voyage root: test before sync
Feb 5 16:08:17 Voyage voyage-sync: Synchronizing tmpfs changed files...
Feb 5 16:08:17 Voyage voyage-sync: Sync'ing /var/log to /.sync/var
Jan 1 00:00:28 Voyage voyage-sync: /var recovered
Jan 1 00:00:28 Voyage voyage-sync: Recover'ing /.sync/var/tmp to /var
Jan 1 00:00:28 Voyage voyage-sync: /var recovered
Jan 1 00:00:28 Voyage voyage-sync: Will now restart after recovery from a power failure
Jan 1 00:01:15 Voyage voyage-sync: Start tmpfs...
Jan 1 00:01:15 Voyage voyage-sync: Checking if recovery from a power failure is needed...
Jan 1 00:01:15 Voyage voyage-sync: Copying /ro to /rw
Jan 1 00:01:15 Voyage voyage-sync: Setting up tmpfs for changed files...
Jan 1 00:01:15 Voyage voyage-sync: tmpfs: mount back /lib/init/rw/var/tmp to /var/tmp
Jan 1 00:01:15 Voyage voyage-sync: Start tmpfs completed
Jan 1 00:01:22 Voyage syslogd 1.5.0#6: restart.
Jan 1 00:01:23 Voyage kernel: klogd 1.5.0#6, log source = /proc/kmsg started.
Jan 1 00:01:23 Voyage kernel: [ 0.000000] Linux version 2.6.32-voyage (2.6.32-27) (root at punknix-uml) (gcc version 4.3.2 (Debian 4.3.2-1.1) ) #1 PREEMPT Wed Dec 22 06:20:45 GMT 2010
Jan 1 00:01:23 Voyage kernel: [ 0.000000] KERNEL supported cpus:
Jan 1 00:01:23 Voyage kernel: [ 0.000000] Intel GenuineIntel
Jan 1 00:01:23 Voyage kernel: [ 0.000000] AMD AuthenticAMD
Jan 1 00:01:23 Voyage kernel: [ 0.000000] NSC Geode by NSC
During recovery, first few messages are lost.
But not to bad.
syslog, normal reboot:
======================
Feb 5 16:30:30 Voyage shutdown[1760]: shutting down for system reboot
Feb 5 16:30:30 Voyage init: Switching to runlevel: 6
Feb 5 16:30:30 Voyage kernel: Kernel logging (proc) stopped.
Feb 5 16:30:30 Voyage kernel: Kernel log daemon terminating.
Feb 5 16:30:31 Voyage exiting on signal 15
Feb 5 16:30:42 Voyage voyage-sync: Stop tmpfs...
Feb 5 16:30:42 Voyage voyage-sync: Synchronizing tmpfs changed files...
Feb 5 16:30:42 Voyage voyage-sync: Sync'ing /var/log to /.sync/var
Feb 5 16:30:47 Voyage voyage-sync: Unmount'ing /var/tmp
Feb 5 16:30:47 Voyage voyage-sync: Sync'ing /.sync/var/tmp to /var
Feb 5 16:30:47 Voyage voyage-sync: Stop tmpfs completed
Jan 1 00:07:53 Voyage voyage-sync: Start tmpfs...
Jan 1 00:07:53 Voyage voyage-sync: Checking if recovery from a power failure is needed...
Jan 1 00:07:53 Voyage voyage-sync: Copying /ro to /rw
Jan 1 00:07:53 Voyage voyage-sync: Setting up tmpfs for changed files...
Jan 1 00:07:53 Voyage voyage-sync: tmpfs: mount back /lib/init/rw/var/tmp to /var/tmp
Jan 1 00:07:53 Voyage voyage-sync: Start tmpfs completed
Jan 1 00:08:01 Voyage syslogd 1.5.0#6: restart.
Jan 1 00:08:01 Voyage kernel: klogd 1.5.0#6, log source = /proc/kmsg started.
Jan 1 00:08:01 Voyage kernel: [ 0.000000] Linux version 2.6.32-voyage (2.6.32-27) (root at punknix-uml) (gcc version 4.3.2 (Debian 4.3.2-1.1) ) #1 PREEMPT Wed Dec 22 06:20:45 GMT 2010
Jan 1 00:08:01 Voyage kernel: [ 0.000000] KERNEL supported cpus:
Jan 1 00:08:01 Voyage kernel: [ 0.000000] Intel GenuineIntel
Jan 1 00:08:01 Voyage kernel: [ 0.000000] AMD AuthenticAMD
Jan 1 00:08:01 Voyage kernel: [ 0.000000] NSC Geode by NSC
The last three sync messages are lost, just as crash recovery.
And some messages of sync'ing back.
The start messages are appended to syslog before the boot messages itself.
Not to bad either.
Messages are also displayed on console.
Here it is complete.
Normal start:
=============
voyage-sync: Start tmpfs...
voyage-sync: Checking if recovery from a power failure is needed...
voyage-sync: Copying /ro to /rw
tar: ./var/lib/logrotate: time stamp 2010-04-17 21:06:01 is 324853485.734064156 s in the future
tar: ./var/lib/dhcp/dhclient.leases: time stamp 2010-12-25 21:06:37 is 346626321.732330137 s in the future
tar: ./var/lib/dhcp: time stamp 2010-12-25 21:06:37 is 346626321.732051889 s in the future
tar: ./var/lib: time stamp 2010-12-25 21:17:05 is 346626949.731909413 s in the future
tar: ./var: time stamp 2010-12-25 21:17:05 is 346626949.731782861 s in the future
tar: .: time stamp 2010-12-25 21:17:05 is 346626949.731663013 s in the future
voyage-sync: Setting up tmpfs for changed files...
voyage-sync: tmpfs: mount back /lib/init/rw/var/log to /var/log
voyage-sync: tmpfs: mount back /lib/init/rw/var/tmp to /var/tmp
voyage-sync: Start tmpfs completed
Normal stop:
============
voyage-sync: Stop tmpfs...
voyage-sync: Synchronizing tmpfs changed files...
voyage-sync: Sync'ing /var/log to /.sync/var
voyage-sync: Sync'ing /var/tmp to /.sync/var
voyage-sync: Synchronization tmpfs completed
voyage-sync: Unmount'ing /var/log
voyage-sync: Sync'ing /.sync/var/log to /var
voyage-sync: Unmount'ing /var/tmp
voyage-sync: Sync'ing /.sync/var/tmp to /var
voyage-sync: Stop tmpfs completed
Recovery:
=========
voyage-sync: Start tmpfs...
voyage-sync: Checking if recovery from a power failure is needed...
voyage-sync: Recover'ing /.sync/var/log to /var
voyage-sync: /var recovered
voyage-sync: Recover'ing /.sync/var/tmp to /var
voyage-sync: /var recovered
voyage-sync: Will now restart after recovery from a power failure
More information about the Voyage-linux
mailing list