[mythtv-users] controlling disk space on "/" on mythtv backend

Jim Abernathy jfabernathy at outlook.com
Thu Jan 11 18:47:51 UTC 2018



On 01/11/2018 12:14 PM, Jerry wrote:
On Thu, Jan 11, 2018 at 11:48 AM, Jerry <mythtv at hambone.e4ward.com<mailto:mythtv at hambone.e4ward.com>> wrote:
On Thu, Jan 11, 2018 at 11:28 AM, Jim Abernathy <jfabernathy at outlook.com<mailto:jfabernathy at outlook.com>> wrote:

I think i have moved most of my /var/lib/mythtv directory usage to other drives via the Storage Directories setup in mythtv-setup.  But I was thinking about for short term fixes if I could just use Clonezilla to copy everything on my 16GB boot Flash drive to a 64GB flash drive.  Would it really be that easy??


It should be.  You have to be careful to expand the file system to the size of your hard drive with Clonezilla.  There is definitely an option for that but you can miss it.  That's the simplest choice.  Clonezilla will fix the bootloader install for you.

You could use this script here: http://www.linuxjournal.com/magazine/hack-and-migrate-new-hard-drive

I have used that script many, many times to migrate hard drives.  At the end you'll have to reinstall GRUB or your bootloader of choice.  That's the only tricky bit but it's not that hard.  You have to chroot into the new drive and run one command.  Otherwise, the drive will not boot.

You will also have to fix the UUIDs most likely in /etc/fstab.  Cut and paste is your friend here.

Chroot details here: http://bremford.org/tips/MigrateDiskInUbuntu.html and also another migration recipe (but I use the first link).

Doing it the harder way pays off in the end.  You learn by doing.

No matter what, BE CAREFUL to not mix up the drives using Clonezilla or a recipe.  Using the recipe, I mount the drives as /mnt/source and /mnt/target to be safer and more clear.  And I do an 'ls' to check beforehand that I haven't mixed them up.  It can happen.

One other thing here:  I boot into a Live CD/DVD environment.  It's definitely better than doing it with a live file system.  You can use your Ubuntu Installation CD/DVD of choice.  Just boot with it, say you want to try out Ubuntu, open up a terminal and get cranking.  Or plug the USB drives into a different independent computer and skip the Live CD/DVD.

And another thing:  if you plug them in, Ubuntu will most likely mount them itself.  You'll have to umount the drives and mount them somewhere else, or use the paths it creates.  In Fedora, USB drives mount under /run/media/username.  It may be the same in Ubuntu.  So just:

<boot -- plug in drives>

$ sudo umount /run/media/jim/UUID_STRING_1/moretext1 /run/media/jim/UUID_STRING_2/moretext2
$ sudo mkdir /mnt/source /mnt/target

$ dmesg

<page through that - if you just plugged in the drives the info will be near the end with disk sizes>

$ sudo mount /dev/sd<whatever> /mnt/source
$ sudo mount /dev/sd<next_one> /mnt/target

<resume script here>
<finish script>
<boot new usb drive>
<fix alcoholic drink of choice (beer for me)>
<profit>


Thanks for the information!
Here's what I did and I have it working.
1.  First I created a bootable USB Flash with Clonezilla.
2.  I booted that on my myth backend server and cloned disk to disk the USB boot flash to the new larger USB flash.  I figured that wouldn't do any damage.
3.  I then removed the boot flash and saved it in a desk draw.
4.  I took the new larger USB Flash to another Ubuntu desktop and use gparted to delete the swap and expand the EXT4 partition to within 8GB of the end and then created a new swap partition there.
5.  I took the new larger flash and put it in the server and rebooted.  I forgot to fix the UUID in the /etc/fstab for the swap file so it timed out on the swap at boot.  Once booted I fixed the UUID problem for swap and reboot.

Done and working so far.

Thanks all,

Jim A


_______________________________________________
mythtv-users mailing list
mythtv-users at mythtv.org<mailto:mythtv-users at mythtv.org>
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20180111/8ad973d7/attachment-0001.html>


More information about the mythtv-users mailing list