1 |
> 4A. Best method to duplicate the CF card live while the system |
2 |
> is running. |
3 |
|
4 |
Best method I now which is near effort-less, but requires preparation is to |
5 |
setup your drive initially as a RAID-1 mirror but force it to have only one |
6 |
drive (if you don't want it mirrored all the time). |
7 |
|
8 |
Then, add a new drive to the RAID-1 and watch the synchronization. Once |
9 |
finished, take the drive out by failing it cleanly then by removing it, and you |
10 |
have an integral raid-mirrored copy of your original drive while it was running. |
11 |
|
12 |
On my own home-gateway, I used this to "burn" the latest state of the system to |
13 |
disk, and I used usb keys as main drives. At boot, it would pick up which ever |
14 |
is in most current state and update the other. And later in my local script, I |
15 |
would fail the hard drive so this gateway would become completely silent, except |
16 |
for the fan. (Noise was a big factor in my setup as it uses real old hardware) |
17 |
|
18 |
You could do exactly the same using a device in ram to avoid witting to the |
19 |
compact flash. It would boot from the single-mirror on your drive, sync with a |
20 |
device-in-ram (see ramfs and losetup, quite a hack but always worked for me), |
21 |
then fail the physical drive and run only on ram. Then in your local.stop |
22 |
script re-sync with the physical drive. |
23 |
|
24 |
The biggest problem with this method and flash cards is with the write limit. |
25 |
The RAID sync will overwrite every single byte on the card, so every physical |
26 |
sector will decrease in lifespan. Where is you used an intelligent copy program |
27 |
such as rsync, sector lifespan would increase more randomly and more slowly. |
28 |
|
29 |
I do not recommend the use of flash cards for anything else than read-only data |
30 |
(that you can change sometimes). I compare it to a better-cd-rw. |
31 |
|
32 |
Simon |