[mythtv-users] new drive

Simon linux at thehobsons.co.uk
Thu Nov 24 19:44:43 UTC 2022

Ram Ramesh <rramesh2400 at gmail.com> wrote:

> As long as the new drive is as big as the old drive, you can create (empty) partitions of the same (or bigger) size on the new disk and "dd" each partition from old drive to new drive. This will keep everything intact including UUID.

If it comes to it, you could just dd the whole drive as long as the new drive is not smaller than the old one. However, I would recommend ddrescue as being far more suitable ...
You can interrupt it and it can resume where it left off.
If there are any bad blocks, it can copy what it can and leave you a list of what it couldn’t copy. If the errors are intermittent, you may be able to get everything whereas dd will simply die at the first error.

Doug Larrick <doug at parkercat.org> wrote:

> Alternative: since you say your OS is on another drive and this one is
> just data, partition it as a new drive and mount in a new location,
> then add the new location as a Storage Directory in MythTV (in the same
> / default Storage Groups for each type of file). Move the recording &
> other files over using normal file-level commands (`mv` or a tarpipe).
> Then remove the old drive from the Storage Group and decommission it.

rsync is my favourite here, especially when there is a large filesystem (I have 7TB of recordings !).
You can interrupt it, and when you run the command again, it will skip files that are already copied. So, for example, you could let it rip while the system is idle, but stop it when a recording is due to start.
You can do the bulk of your copying with the system active. You just need to shut everything down and do one last copy to ensure that the destination has the latest file alterations.
Or you can specify a bandwidth limit which may mean you can just leave it running even when the system is active.

But back to the OP’s question.
I have separate drives which only hold recordings. If I’m upgrading/replacing one, I’ll do as above - partition the new drive, mount it on a temporary mount point, copy all the files to it (note the above about rsync), then remove the old drive and adjust filesystem labels/fstab entries as required to make the new drive live.


More information about the mythtv-users mailing list