# Help with clean disconnect for USB backup drive



## iroc409 (Dec 29, 2013)

I have a ZFS file server here at home running backups on 3 USB 3.0 3TB drives (that's a lot of 3's) that I rotate for my backup scheme. I'm having some issues getting a "clean" disconnect, and I think I am missing a command to take care of it; after a lot of Googling I've not really found what I think I am looking for. I am pretty sure I've used it in the past, but can't for the life of me remember what it is.

The external drives are single-drive ZFS pools. So, when I disconnect a drive I use `zfs export` on the drive. I have in the past been able to use usbconfig to turn off the external drive, but the last time I swapped them out it would not turn the drive off (after export). After I unplugged the drive and plugged in the new drive, the server would not see it. I had to reboot the server to import the next drive.

I haven't seemed to have any data loss or failures, no panics, warnings, etc. I would like to create some scripting to automate some tasks and to do some checks before it performs the daily backup. Being able to completely turn off a backup drive automagically would be a large benefit.

Is there something I should be using after I export the USB drive's ZFS pool to properly disconnect it from the system, or do I just have some sort of bug going on that isn't letting it fall off gracefully?


----------

