On Tue, 1 Jan 2002 07:28, Jason Lim wrote: > What do you think would be the best way to duplicate a HD to another > (similar sized) HD? > > I'm thinking that a live RAID solution isn't the best option, as (for > example) if crackers got in and fiddled with the system, all the HDs would > end up having the same fiddled files.
If crackers get in then anything which involves online storage is (potentially) gone. > If the HD is duplicated every 12 hours or 24 hours, then there would > always be a working copy, so if something is detected as being altered, we > could always swap the disks around and get a live working system up and > running almost instantly (unless we detect the problem more than 24 hours > later, and then it would be too late since the HDs already synced). The most common problem in this regard I've encountered when running ISPs (see at many sites with all distributions of Linux, Solaris, and AIX) is when someone makes a change which results in a non-bootable system. Then several months later the machine is rebooted and no-one can remember what they changed. Better off having an online RAID for protection against hardware failures and secure everything as much as possible to alleviate the problem of the machines being cracked. > So... what do you think the best way would be to duplicate a HD on a live > working system (without bringing it down or anything like that). > Performance can drop for a while (maybe do this at 5am in the morning), > but the system must stay up and operational at all times. LVM. Create a snapshot of the LV and then use dd to copy it. > Maybe dd... or cp -a /drive1/* /drive2/... or something? Doing that on the device for a mounted file system will at best add a fsck to your recovery process, and at worst result in a file system so badly corrupted that an mkfs is needed. LVM solves this, but adds it's own set of problems. I think that probably your whole plan here is misguided. Please tell us exactly what you are trying to protect against and we can probably give better advice. -- http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/projects.html Projects I am working on http://www.coker.com.au/~russell/ My home page