This is a very nice idea!
If anyone is going to use dirty software raid1 arrays for mirroring, check
out the values in /proc/sys/dev/raid. You can increase the speed_limit_max
value (defaults to 10MB/s) so that the mirror drive syncs to the real
backuppc drive faster.
-Ross
On Fri, 6 Aug 2004, Les Mikesell wrote:
On Fri, 2004-08-06 at 09:50, Leon Letto wrote:
I would be very interested in how to setup the mirror and then break it so
you can move the drive offsite. Do you think this could be done with USB2.0
drives as well?
The external cases I'm using have both USB and firewire. USB seems to
autodetect hotplugging on Fedora where firewire takes manual
intervention on core1 and is broken on core2. I'll experiment a bit
to see if there is much difference in speed or CPU efficiency. Software
wise they look the same once detected.
Do you think it would be possible to mirror RAID5 or RAID0 volumes in this
way as well? What I mean by that is setup a RAID51 (I think that is what
mirrored RAID5 volumes are called) to create a copy of a RAID5 and then
break it and move the second RAID5 offsite?
I don't think the linux md driver cares what kind of lower level
partition it is mirroring. It can even work across a network if
you use the nbd or enbd devices but USB/firewire/SATA seems
easier and cheaper since you can get 250/300 gigs in a single
drive now and put them in external cases.
The only part that might be a problem is that you have to start from
scratch or dig up some information I couldn't find about mirroring
an existing filesystem. Creating the raid makes a new superblock
and changes the size of the previous partition. You can
mdadm --create /dev/md0 --level=mirror \
--raid-devices=2 /dev/hdc1 missing
(assuming no existing md devices and an internal IDE on hdc1 as one
part). This builds a 'broken' mirror which starts working anyway.
Then make the filesystem on /dev/md0, mount it, and start using. When
you want to sync the mirror:
mdmadm --add /dev/md0 /dev/sda1
(assuming the matching drive has been detected and has the matching
partition already added via fdisk).
Then 'cat /proc/mdstat' will show the sync status and 7 or 8 hours
later it should be complete. You don't have to stop anything to
add a drive but if you want it to be 'clean' for use, the partition
should be unmounted before breaking the raid. Then:
mdadm /dev/md0 --fail /dev/sda1
mdadm /dev/md0 --remove /dev/sda1
and you can unplug it and remount the broken partition. So far I'm
just trying to catch back up with the first external mirror, but if
it works out I'll have 2 or 3 in an offsite rotation and swap the
external half of the mirror at least once a week. It should be
possible to wrap the commands to swap in a couple of scripts. The
only thing that might be an issue is that hotplug drives are added
as the next-available scsi device name. If you happen to add internal
scsi drives or plug in multiple external drives the partition name
might change the next time it is connected.
---
Les Mikesell
les < at > futuresource.com
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site.
www.ostg.com
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site.
www.ostg.com
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/