N.B. I'm a complete noob when it comes to ZFS pools.
I created a ZFS pool yesterday across 4 3TB HDDs, like so:
2017-06-10.16:31:08 zpool create data sda sdc sdd sde
2017-06-10.16:31:29 zfs set compression=lz4 data
2017-06-10.16:31:43 zfs set atime=off data
Then I started copying some data in. Awhile later I notice that my pool is gone, and one of my harddrives is offline. I tried rebooting hoping that would bring it back online, but I get stuck in some kind of loop as described here. I didn't have time to deal with it yesterday, so I just shut the machine off until now.
I was about to try and recover from a USB stick, but I tried booting again, and the system came up fine! I run zpool list
and it says "no pools available". Did some googling, tried zpool import data
. I get an error,
cannot mount '/data': directory is not empty
Tried zpool list
again, and sure enough, we're back online:
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
data 10.9T 125G 10.8T - 0% 1% 1.00x ONLINE -
Tried ls /data
, there's a directory in there, everything looks good. Check my Minio app which stores its data there, and all my buckets are gone. Sure enough, the only thing actually in /data
is /data/minio/.minio.sys
which the Minio service must have recreated when it came online. zpool history
has this scary [scrubbing is OK] looking line in it:
2017-06-11.00:24:08 zpool scrub data
But I don't remember running that. The part I really don't get though, is that zpool list
says that 125G
is still in use, which sounds about right. So,
- Where is that data? How do I get access to it again?
- I added
ZFS_MOUNT='no'
to/etc/default/zfs
like that article suggests, butsystemctl enable zfs-mount.target
says "Failed to execute operation: No such file or directory" -- how am I supposed to automount my ZFS pool such that I won't get stuck during boot? - It appears I created my zpool incorrectly -- via their device names (e.g.
sda
) instead of UUIDs -- can I correct that now?
My USB stick is assigned a /dev/sdX
letter isn't it? I suspect that has something to do with the mounting of the pool.