On Mi, 30 dec 20, 16:56:25, mick crane wrote: > > I just confused myself. Initially I read somewhere that to make the raid > first copy the OS from one disk to another.
Do you mean copy as in 'cp' or 'rsync' or similar? RAID operates at a lower level, typically below the filesystem (except for ZFS and btrfs, which integrate both). > Just struggling to get a picture of what happens, if what's on one disk gets > copied to the other or if they are written to simultaneously. It should happen (more or less) simultaneously. The data is still in RAM so it's much faster to just write it to the other drive as well, instead of reading it from the first drive. > I always understood that you can't duplicate one disk to another with itself > being the OS. Depends on what you understand by "duplicate". If you mean a file-level copy, cp and/or rsync don't care whether the system is running or not. The problem is that files may change before the copy operation is completed and the resulting system is inconsistent[1]. As far as I know it is possible to take a "snapshot" of a running system with LVM, ZFS and btrfs. > It'll be the way the software raid does it. I should probably read more. Snapshots and RAID mirrors are different things. [1] though this can be used to minimize downtime, e.g. by doing one cp/rsync pass while the system is running and a second *rsync* pass with the system inactive, e.g. while booted from a live system or another installation. Kind regards, Andrei -- http://wiki.debian.org/FAQsFromDebianUser
signature.asc
Description: PGP signature