This was my first time using ZFS and I made a huge blunder.
I created my "server" zpool as per:
sudo zpool create -f server raidz2 /dev/sdb /dev/sdc /dev/sdd /dev/sde
Then, there was a directory under my root directory called /server
.
So I changed the permission in the folder so I could write to it and created two folders in /server
then dumped several portable HDD & SSDs into the folders then went to bed. I estimate about 300-600 GB worth.
The next day I went into /server
and it was empty! I looked at the properties and it says usage 404.8 GiB of 437 GiB free. When I typed ls -l
there is nothing in the folder (the pool was comprised of four 8 TB drives).
I think I needed to create a dataset to save the data under, rather than the top level of the zpool, big whoops!
I tried Testdisk on the effected portable hard drives and I think the data is still on them but the file structure is not restorable with Testdisk?
So now my big issue is I can't spend hundreds of hours sorting random files out, I have a fourth child imminent and no spare time. So I was really hoping to find a ZFS solution in restoring the misplaced data as I think it's my only practicable option. I'm hoping it's still on the ZFS drives somewhere. Without the file structure the data is almost useless. Otherwise I'd try and restore the data with Testdisk from the portable drives.
zpool import server
orzpool import -d /dev/disk/by-id/
. and/or maybezfs mount server
too.