Is it possible to create ZFS tank on USB media ?

David Christensen dpchrist at holgerdanske.com
Tue Apr 18 04:55:28 UTC 2017


On 04/17/2017 12:34 PM, Manish Jain wrote:
> Being new to ZFS, I wonder if is possible to create ZFS root on
> removable media like a USB pen drive ?

One of my favorite tricks is to use the Debian GNU/Linux installer to 
install to a (BIOS, MBR) 16 GB USB 3.0 flash drive -- for use as a 
poor-man's SSD for low-end machines, as a "portable" desktop, as a 
"rescue/repair/test" live image, etc.  I have a couple USB flash drives 
with Debian 7; I need to try it with Debian 8.


It's been a couple of years since I tried installing FreeBSD onto a USB 
flash drive using the FreeBSD installer.  The last time I tried, 
apparently such was not supported.  Various readers of this mailing list 
suggested various techniques for installing by hand, but I was then, and 
still would be now, looking for an OOTB KISS solution.


> Logically, it sounds pretty cool - and a convenient way of migrating
> with just a single MBR slice available :
>
> a) create a ZFS tank on USB
> b) rsync your installation to ztank
> c) boot from USB
> d) create a second tank : this time on the slice that originally was UFS
> e) rsync ztank to ztank2
>
> Is that too weird ? Impossible ? Thanks for shedding any light.

I don't know enough FreeBSD or ZFS to comment.


> (As already mentioned in a post I just made to f-q, my MBR slice index
> corruption has been taken care of - by - of all people - Microsoft,  : - )
>
> I used Windows to create a new slice, a Windows reshuffled the slice
> indexes to pack them in the normal order).

I still prefer and recommend one OS per system disk.  The USB flash 
drive trick is ideal for computers with space for only one drive, such 
as laptops.


David





More information about the freebsd-questions mailing list