[mythtv-users] Adding new 1 Terabyte Drive and Moving existing Recordings

Craig Sanders cas at taz.net.au
Wed Jan 7 22:53:56 UTC 2009


On Tue, Jan 06, 2009 at 08:47:55PM -0800, Jonny B wrote:
> On Tue, Jan 6, 2009 at 2:50 PM, Craig Sanders <cas at taz.net.au> wrote:
> > mv is the wrong command to use here, in case something goes wrong.
> > when moving lots of large files from one file-system to another,
> > it's better to copy first, delete later [...]
>
> Historically, every time I've used mv, it does exactly what you're
> stating to do instead. It copies ALL the files in the command (I'm
> presuming wildcards have been used) over to the destination, and then,
> once complete, removes them from the source location. I always do mv

yes, mv does that when moving files from one fs to another (on the same
fs, it just renames them into the target dir). 

however, the difference is that mv does the delete automatically, before
you've had a chance to verify that that the new setup works.

i prefer to do the delete manually in a separate step after i'm certain
that everything is perfect. i've learnt over the years to always leave
myself the opportunity to back out and undo what i've done until the
last possible moment. once you've deleted the files, you're committed,
you can't go back, and you can't even delay for very long because the
service (in this case myth) will be down until you've finished. and your
deadline for completing the job is the next scheduled recording.


> > one of the advantages of using rsync rather than mv or cp is that
> > you can take as long as you want to finish the job. you can spread
> > it over days or weeks even. [...]
>
> I don't see any reason not to go to sleep while the mv is running...

well, of course you can.  but myth will be down the whole time and won't
be back up until you've completed every step.


what i outlined was a general method of doing systems administration
tasks (like shuffling lots of files around) rather than just a specific
tool (like rsync).

doing it the way i suggested does it 'out of band' - the system
isn't dependant on the rsync being finished before it can go on with
its normal work. even better, there's no deadline, and the lack of
dependency takes the urgency out of the equation. which is good - the
more hurried and rushed you are, the more likely you are to make a
mistake.

craig

-- 
craig sanders <cas at taz.net.au>


More information about the mythtv-users mailing list