Recovering Greyhole After Ubuntu Upgrade

In my previous post I talked about some issues I hit when I upgraded from Ubuntu 14.04 to 16.04, it wasn’t all plain sailing and in this one I’ll cover the issues I’ve had with getting Greyhole back up and running.

At the end of the last post I had my “missing” disks mounted and I mentioned I was moving data around. Thankfully the two disks that were mounting fine we’re two of my largest, 4TB and 2TB worth, the two that weren’t mounting are 2TB and 3TB, after deleting a load of old files and reducing the redundancy level on the non-critical shares it looked like I’d have just enough space to make things easier.

One at a time I ran the command to remove a disk from the pool and waited for Greyhole to finish balancing;
greyhole –going=/mnt/three/gh

You can see what the Greyhole service is doing by running “greyhole –L”, one it tells you it is sleeping you can crack on with the second disk.

This completed and I was able to see my files from a remote machine via Samba, huzzah! The problem was the install wasn’t tidy any more, I couldn’t control Greyhole using the service command and the landing zones were on a disk I was intending to reformat. I tried unsuccessfully to fix it but decided to follow the steps to reinstall it in the end. From the perspective of the documentation this would be the same as migrating to a new machine.

First off I ran “sudo apt remove greyhole –purge” which removes the service with extreme prejudice and I then followed the standard steps to install as per this page. I restarted Samba and Greyhole after running the fsck command and lo and behold I got most my shares back online! Two were showing up fine, full of files, one was showing up but empty. This was my backups share which was a little worrying but I’d already backed it up to another machine so wouldn’t be a big issue to rebuild it.

It turns out that when I was configuring the smb.conf and greyhole.conf files I called the backup share “Backups” rather than “Backup” and this meant that Greyhole couldn’t find the files to make them accessible again. I fixed this typo, ran fsck again and they are now showing up.

Regarding the other two drives, it looks like I’d initialised them as zfs_members at some point and with Ubuntu 16.04 and they can’t be mounted in the same way. It’s a vaguely educated guess so happy to be corrected! To get rid of them I used the wipefs tool which strips the drive bare of partition signatures. BE VERY CAREFUL WITH THIS!

I ran “wipefs –all /dev/sdc” and “wipefs –all /dev/sdd” which seemed to do the trick. After that I followed this guide to format my drives using parted. I’ve no idea why but blkid still doesn’t show the UUID for the partitions I’d created but I took note of them from the output of the mkfs.ext4 command. I put them into fstab along with creating a folder to mount against with the other two drives and ran “sudo mount /dev/sdc1” and the same for sdd1, they then showed up!

Finally I added the two drives to the Greyhole storage pool by following this guide and ran “greyhole –balance”.