[mythtv-users] Harddrive downgrade...

Larry Sanderson larry.sanderson at gmail.com
Tue Dec 11 17:22:06 UTC 2007


On Tuesday 11 December 2007 12:05:18 pm Andrew Close wrote:
> On Dec 11, 2007 10:58 AM, Bill Omer <bill.omer at gmail.com> wrote:
> > Why not enable the option to require XXGB free?  If you make myth
> > leave 100GB free, then the space should shrink by its self.  Then
> > you can install your 200GB drive and use dd.
>
> i wasn't sure that would work.  i thought dd might try to copy the
> empty space at the end of the 300GB drive as well.  i have slimmed
> down the usage of the drive to about 145GB, although it is growing
> quickly again. :)
> thanks Bill, i didn't think i could do that.  i'll give it a try.

I'm pretty sure this will not work - you will be left with a truncated 
filesystem, which I believe would be unusable.  (It is possible that a 
filesystem could survive a truncation like that if no file data is 
stored after the 200GB mark, but I doubt it)

Instead, just use tar or cpio to copy the files over.

This command should do the trick:
(assume that the source partition is mounted to / and the new partition 
is mounted to /mnt/newdisk)

tar cpvf - --one-file-system --atime-preserve | \
tar xpf - --atime-preserve -C /mnt/newdisk


Note: this technique has a couple advantages.  It alows you to pick a 
new filesystem if you choose (perhaps you've been itchin to try out 
ReiserFS-4?), and it also serves to defrag all your files.


More information about the mythtv-users mailing list