[SGVLUG] Resonable way to copy some files?
Claude Felizardo
cafelizardo at gmail.com
Sat May 19 00:08:56 PDT 2007
On 5/18/07, Michael Proctor-Smith <mproctor13 at gmail.com> wrote:
> So I finally had one of my drives(in an LVM appended two drive array a
> 120GB and 160GB) drive in my main tivo box crap out on me. Luckily it
did you literally mean TiVo or TiVo-like?
[snip]
>
> So I happen to have a 3ware 7850 card(8 port hardware raid) and the
> five iffy (160GB) drives that had been part of an array I replaced and
> the owner did not want. So quickly I rip apart the box and throw it
> back together. I figure the drives are iffy I will configure it as a 3
> drive raid 5 array and then have two hot spares .
wow, that's pretty pessimistic. 60% utilization and 40% hot spare? I
mean you can still run in degraded mode with a single failure and no
hot spares.
I'm pretty paranoid so I have a short script that gets fired off via a
cron several times a day that does a diff between /proc/mdstat and the
expected results. If there's a diff, I get an email alert. Seems to
work okay okay for me:
cat /usr/local/bin/checkraid.sh
---------------------------------------------------------------------------------------------------------
#!/bin/bash
MDSTATS=/proc/mdstat;
FILE=/var/lib/misc/mdstat;
diff $MDSTATS $FILE
---------------------------------------------------------------------------------------------------------
> Anyway enough background I get the system back online the array and
> lvm(for the future) configured and the mkfs run in time(well almost I
so you are doing lvm on top of raid-5? I tried that a few years ago
but had problems booting so i'm just using raid-5 but i'm thinking of
repartitioning again because my media partition is filling up and i
don't need 180 days of rsnapshot backups.
> So I had 30GB of the 148GB back and not being a scripting genus I
> wanted the easiest/fastest way to copy back only the files that had
> not been copied before. rsync? anyway that is what I ended up using.
i use rsync everywhere. my favorite is this:
rsync -avP src dst.
it only copies the files that need to be copied, shows the nice
progress hash marks, etc. Other options would be -e ssh if over the
internet, and --delete if i want clean up old files and --bw-limit=n
when i want to be nice to others on the same network.
claude
More information about the SGVLUG
mailing list