<br><br><div class="gmail_quote">On Wed, Dec 5, 2012 at 3:11 AM, Mike Perkins <span dir="ltr"><<a href="mailto:mikep@randomtraveller.org.uk" target="_blank">mikep@randomtraveller.org.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 03/12/12 21:14, Michael Watson wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On 3/12/2012 7:19 PM, Simon Hobson wrote:<br>
</div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
As to copying your drive, my technique is this :<br>
Install the new drive in the system along side the existing one - you can now<br>
let the system continue running as normal.<br>
Partition & format as required, mount somewhere on the filesystem. Use rsync<br>
to copy the recordings from the old drive to the new one. You can do this in<br>
batches if you want, stopping before the backed has to do any Myth related<br>
work (eg recording or serving up frontends).<br>
When ready to make the switch, stop the backend, run the rsync copy again to<br>
get the replacement drive fully up to date, make any changes that might be<br>
needed to fstab etc, shutdown, remove the old drive and start up.<br>
<br>
</blockquote>
I would add the new drive, create filesystem and mount, add the new drive to the<br>
default storage group, and remove faulty drive from the storage group, so no new<br>
recordings will be written to the old drive, (but you will not be able to access<br>
the recordings on the old drive from within myth unless you create a new storage<br>
group with the old drive included).<br>
Copy the recordings over using rsync, but precede the rsync command with<br>
"ionice -c3", and let the copy run its course. Once done, modify fstab to<br>
include new drive and remove the old drive, shutdown and physically remove old<br>
drive.<br>
Power up, run find_orphans.py to clean up any missing recordings.<br>
<br>
</div></blockquote>
So, what is going to happen when your rsync operation meets the first defective sector?<br>
<br>
As it happens I have no intention of attempting any of this with the existing server host, (i) I would expose the other drives to potential operator error (ii) there are no free SATA slots which means more potential error juggling drives around (iii) every time I boot the server mythbackend will start and try to do things to the disks.<br>
<br>
There is a minor issue I have: the two old drives have the same geometry, the two new drives do as well, but the old drives have 512-byte sectors, the new ones have 4096-byte sectors. My plan is this:<br>
<br>
Remove good old drive, mount with new drive in spare host. Rsync files across. Put new drive into MBE slot where good drive was. (Er, fix fstab for new UUIID.)<br>
<br>
Remove bad old drive, mount into spare host alongside good old drive (same geometry). Use dd_rescue to bit-copy from bad to good. When happy with result remove bad old drive.<br>
<br>
Put remaining new drive in spare host, rsync from good old drive to new drive. Remove new drive and put into MBE.<br>
<br>
??? Profit!<span class="HOEnZb"><font color="#888888"><br>
<br></font></span></blockquote><div><br>Sounds like it will work, but it will be MUCH faster if you can use a sata port on your motherboard, or even get one of those usb to sata connectors and plug it in the back. I took my backend offline while doing it, and simply temporarily decommissioned one drive that wasn't involved in / or the faulty drive, juggling the others as needed. <br>
<br>As you say UUID is the way to go :) <br><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888">
-- <br>
<br>
Mike Perkins</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
______________________________<u></u>_________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
<a href="http://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/<u></u>listinfo/mythtv-users</a><br>
</div></div></blockquote></div><br>