Part 1: Importing a ZFS pool
So having finally carved some time out to perform much needed maintenance on my primary storage server at home I came to the decision I just didn't need the overhead of ZFS. Most of my storage is WORM (write once, read many) and changing pretty infrequently. Database workloads are already handled elsewhere so this is primarily to handle large media files, VM backups, act as a timemachine target and generally give me somewhere cost-effective to be an unashamed hoarder...
As such I was going to move from FreeNAS back to Linux in order to make the most of the disks available to me and, as part of this process, put back in place some fulldisk encryption (I'd been lazy) to link back up with Becoming Self-sufficient and IT Resilient.
Importing old ZFS pool
Obviously in time-honoured fashion I'd completely outgrown the 16TB or so of storage on the FreeNAS and had zero overflow capability. I therefore needed to cross my fingers and pray to the zfs gods...
- Docs & Pics: 2 x 2TB in RAID1 (mirrored)
- Media: 8 x 3TB in RAID5+0 (actually RAIDZ + striped)
I'd already backed up the
Docs & Pics to my secondary storage array so the
main problem was around all of those Linux ISOs on my
Being inherently lazy I decided to just got for it and attempt a direct import
of the old pool from within linux.
Download Ubuntu Desktop and boot into a live environment. Now run the following:
# install zfs sudo apt-get install -y zfs
With zfs installed now try to import the previous volume
zpool import media
And we get the following
cannot import 'media': pool may be in use from other system, it was last accessed by freenas.xmansion.local (hostid: 0xd55bd032) on Sat Dec 2 13:28:02 2017 use '-f' to import anyway
Hmm, couple of beers down the line now. Why not, what could go wrong...?
zpool import -f media ... *panic* ... [email protected]:~# ls /media/ cdrom media sysadmin [email protected]:~# ls /media/sysadmin/dump/ ... vzdump-lxc-101-2017_09_20-00_18_10.tar.gz ...
Wow, so that worked...
I'm not going to go into a huge amount of background on OMV but, high level, it's a Debian-based NAS distro which has been optimised to allow me to install direct to a USB as a boot device. This fits my requirements for a couple of reasons:
- Debian means
aptand all sorts of normal stuff just works; and
- Installation to a USB allows decoupling of the storage and OS. As we've just proven with the import of the zpool, disks should be transferrable and I don't want to clutter up storage with an OS if I don't need to.
Despite all of the other plugins and features it comes with I'm only interested in running this as a fileserver.
In part 2 of this series I'll go through the setup of OMV with fulldisk encryption, mergerfs and snapraid to provide almost double the amount of storage I had previously.