How To: Migrate from Fedora 14 to Ubuntu 12

billium
Posts: 8
Joined: Tue Jun 07, 2011 8:32 pm

How To: Migrate from Fedora 14 to Ubuntu 12

Postby billium » Tue Apr 02, 2013 6:45 pm

If you plan on using your old Fedora 14 install to look at as you configure your apps and network settings, make sure before you shut it down to disconnect the drives to edit /etc/fstab to not include the pooled drives. In my experience, when Fedora 14 cannot mount the drives in /etc/fstab, rather than skipping it fails to load the OS, and you'll have to use a live disk to edit the fstab file not to include the pooled drives.

Background
I had been using Amahi with Fedora 14 for about 2 years. The setup was seven storage pool drives (total ~12TB, not full), an OLD AMD Athlon 64 (~2004 era) and 2 gigs of RAM. None of the drives were in any RAID configuration (JBOD if you must) and I used CrashPlan as a backup, mapping backups to each drive in /var/hda/files/drives/driveX so drive recovery would be straightforward in the event of a failure. Sabnzbd, CouchPotato, and Sickbeard (henceforth "The Holy Trinity").

As some of you may know, as storage pools grow CrashPlan starts to take up a lot of memory. A friend of mine was getting ready to junk a perfectly good Athlon 64 X2 4200+ with an Asus MOBO that could support 8 gigs of RAM. I snatched it up, bought 8 gigs and 2 WD Black laptop drives (for the OS and a backup clone) and went to work swapping out the Mother Board, Processor, Memory, HDD, and OS. So that's all I'm really prepared to talk about doing, and really, this was extremely easy.

What you need to do before you do anything
  1. Read all instructions before doing anything.
  • Download Ubuntu. I recommend Long Term Support (LTS) flavor, but you may want to see what Amahi is recommending at the time. Also, torrents can be much faster than downloading directly from the link.
  • Make sure you know what your shares in Amahi are called (e.g. Movies) and where they live (e.g) /var/hda/files/movies (notice the caps difference). You'll need to create these shares exactly the same on your new install. There may be ways around this, but I'm just describing what worked for me.
  • Make note of your installed apps. For The Holy Trinity I actually booted up the old server and copied my settings one by one once I had completed the new installation. I didn't want to have to think too hard about anything and this was super easy.
  • Make note of, or use the technique used above, to get all your static IPs and any other special network settings in your old HDA.
  • Make a copy of couchpotato.db (/var/hda/web-apps/couchpotato/html/) and sickbeard.db (/var/hda/web-apps/sickbeard/html/). I'm not sure if Sabnzbd has an equivalent, but I didn't make use of it. I've read some suggestions say you can actually copy the entire couchpotato and sickbeard folders from your old server and after installing on the new server replace the new directories with the corresponding old ones. I don't know if this works. Better safe than sorry.
  • Make a copy of your old server's /etc/fstab and /etc/greyhole.conf files. These are EXTREMELY IMPORTANT.
  • For simplicity's sake, I recommend using the same username on your new server as you did on your old one (case sensitive). I would suspect that not doing this will cause headaches.
Install and Migrate
  1. Install Ubuntu as recommended by Amahi.
  • After installation, edit the new server's /etc/fstab file to include your storage pool drives as listed in the old server's /etc/fstab file. You just need to append the storage pool drives to the end of your new server's fstab file (be sure to include a trailing return). These will look like:

Code: Select all

UUID=e4fba906-2897-448d-afc9-cf83eac65060 /var/hda/files/drives/drive1 ext4 defaults 1 2
  • Do the same thing with greyhole.conf. In the old server's greyhole.conf file copy everything after "# here in multiple lines" and append that info to the end of the new server's greyhole.conf file.
  • Create the directories where your storage pool drives will need to be mounted. In my example above, the drive is mounted at /var/hda/files/drives/drive1 - so go create this directory.
  • Shutdown your system and connect your storage pool drives.
  • Turn on the beast. If you're prompted with anything saying that a drive could not be mounted it's likely that there's something wrong with your fstab file, or something wrong with the mount point (i.e. the directory for the mount point was not created, or was created in the wrong place/wrong name).
  • Run "sudo fdisk -l". Hopefully you'll see your storage pool disks available. I also enjoy "sudo lshw -class disk". In ubuntu you'll need to assign a root password if you haven't already. This is handy and a good time to do it so that you can "su".
  • You should be able to navigate to the Amahi desktop with "hda" or the IP for your HDA in a browser. At this point, recreate the shares exactly as they were in your old server. This is important. I had the case wrong on my "tv" folder and it didn't get picked up.
  • If everything is going well so far, you're ready to rebuild your storage pool. This is the moment of truth. Word of caution, when I did this initially, I did it over ssh and had a connection problem in the middle and it made me scared when the command was interrupted, so I'd recommend doing this at the server terminal. Log in as root (su) and:

Code: Select all

greyhole --fsck
  • You can watch the number of operations and tail the log:

Code: Select all

watch -d greyhole --view-queue tail -f /var/log/greyhole.log
  • Hopefully this completes successfully, because this is rebuilding your shares so you can access all your stuff in the spectacular ways you're used to. If it doesn't work you likely misspelled (case sensitive) or had the path wrong to one of your shares.
  • Now it's time to reinstall your apps and reconfigure network settings (static IPs, aliases). For The Holy Trinity, you can assign settings by looking them up on your old server. For sickbeard if you replace the new sickbeard.db file with the old one, it should rebuild your history. I tried the same with couchpotato.db but it didn't work. Sickbeard was the one I was really concerned about anyway though.
  • One final word on the server DNS; in order to get it working where I could type "sickbeard" and have it load the app, I had to:

Code: Select all

apt-get update apt-get install hdactl hdactl-hup
That's it! You should be back up and running. Just be sure to be careful, and have an idea about what you're doing with each step, rather than just following them. I did this with a little google-ing, got help in the chat for the hdactl-hup part, but mostly just thought out a plan of attack from being familiar with using Amahi.

If you plan on using your old Fedora 14 install to look at as you configure your apps and network settings, make sure before you shut it down to disconnect the drives to edit /etc/fstab to not include the pooled drives. In my experience, when Fedora 14 cannot mount the drives in /etc/fstab, rather than skipping it fails to load the OS, and you'll have to use a live disk to edit the fstab file not to include the pooled drives.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: How To: Migrate from Fedora 14 to Ubuntu 12

Postby bigfoot65 » Tue Apr 02, 2013 7:07 pm

Great tutorial. I believe it would be better served if it were in the wiki. Forums are not the best place for tutorials.

Would you mind adding it to the wiki? We would greatly appreciate it.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

nefarious
Posts: 9
Joined: Fri Sep 23, 2011 10:56 am
Location: Edmond, OK

Re: How To: Migrate from Fedora 14 to Ubuntu 12

Postby nefarious » Tue Apr 02, 2013 8:11 pm

Great write up! It should also be useful for anyone planing to upgrade from Amahi 6 to 7 using Fedora on both old and new once Amahi 7 is released. The key is the details of how to transfer your storage pool and "The Holy Trinity" of apps.
-=Zod=- Norco RPC-4220, AMD Athlon II 2.8GHz, 16GB RAM, & 40TB in my GH Storage Pool

kikkegek
Posts: 341
Joined: Sun Jul 31, 2011 9:28 am

Re: How To: Migrate from Fedora 14 to Ubuntu 12

Postby kikkegek » Tue Apr 02, 2013 11:38 pm

did you use Ubuntu Desktop or Server? because your download link refers to the desktop version...

jaybea
Posts: 56
Joined: Tue Dec 15, 2009 1:24 am

Re: How To: Migrate from Fedora 14 to Ubuntu 12

Postby jaybea » Wed Apr 03, 2013 5:37 am

Great article. I don't think that I will move to Ubuntu for my HDA (I have a couple of Ubuntu clients, and I think I prefer Fedora), but it will be useful guidance for moving to Amahi 7 when the time comes.

billium
Posts: 8
Joined: Tue Jun 07, 2011 8:32 pm

Re: How To: Migrate from Fedora 14 to Ubuntu 12

Postby billium » Wed Apr 03, 2013 5:22 pm

did you use Ubuntu Desktop or Server? because your download link refers to the desktop version...
I used Ubuntu Desktop. There is little difference between the two. I decided not to temp fate since there is a known issue with Server that Amahi links to on the installation instructions page.

billium
Posts: 8
Joined: Tue Jun 07, 2011 8:32 pm

Re: How To: Migrate from Fedora 14 to Ubuntu 12

Postby billium » Wed Apr 03, 2013 5:25 pm

Great write up! It should also be useful for anyone planing to upgrade from Amahi 6 to 7 using Fedora on both old and new once Amahi 7 is released. The key is the details of how to transfer your storage pool and "The Holy Trinity" of apps.
Yes, I did not really cover this, perhaps a more appropriate thread title would be "Migrating Storage Pool...".

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: How To: Migrate from Fedora 14 to Ubuntu 12

Postby bigfoot65 » Wed Apr 03, 2013 6:47 pm

Would you be willing to add this to the wiki? We would greatly appreciate the contribution.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

billium
Posts: 8
Joined: Tue Jun 07, 2011 8:32 pm

Re: How To: Migrate from Fedora 14 to Ubuntu 12

Postby billium » Wed Apr 03, 2013 8:24 pm

Would you be willing to add this to the wiki? We would greatly appreciate the contribution.
I've requested an account here so I can add to the wiki. Willing but not able.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: How To: Migrate from Fedora 14 to Ubuntu 12

Postby bigfoot65 » Thu Apr 04, 2013 3:17 am

All pending wiki account requests have been approved. If yours is not working, please PM me the user name requested so we can investigate.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

Who is online

Users browsing this forum: No registered users and 20 guests