# ZFS on my external HDD



## bsdolith (Nov 11, 2013)

Hi,

I have an external USB HDD where I have set up ZFS where I do backups to. I will frequently unplug this HDD and store it offline. I have set up the HDD simply by performing `# zpool create latoyabu0 /dev/label/latoya` followed by `# zfs create -o copies=2 -o compression=on latoyabu0/bu0`

When I unplug the HDD (after unmounting bu0) and plug it back again I have to run `# zpool clear latoyabu0` and then mount bu0 with `# zfs mount latoyabu0/bu0`before I do the backups with rsync. 

Is this the correct way to do it? I ask because I discovered that there was an error on the HDD when I ran `zpool status`. I could fix the problem by scrubbing the HDD but after unplugging the HDD again the error came back.

Right now I am wiping the HDD and I am about to set up ZFS on it again but before I do I want to make sure I do it right!


----------



## wblock@ (Nov 11, 2013)

Why are you using a label on it?  You appear to be using it correctly, but ZFS has its own labels that should make that unnecessary.  (I think, have not used ZFS on an external drive.)

Have you tried `zpool export` before disconnecting the drive, and `zpool import` to reconnect it?


----------



## bsdolith (Nov 12, 2013)

It was just a label I set with glabel to make it easier to remember. It works fine with ZFS. You are also right about using `# zpool import latoyabu0` and `# zpool export latoyabu0`. That is the way I am supposed to do it! Thanks!


----------

