I have a setup with a smaller boot/root SSD drive and two HDDs organised into a mirror zpool, which I created as follows:
zpool create megastorage mirror /dev/sdb /dev/sdc
zfs create megastorage/large
zfs set mountpoint=/home/sergey/large megastorage/large
zfs create megastorage/Photos
zfs set mountpoint=/home/sergey/Photos megastorage/Photos
zfs create megastorage/Videos
zfs set mountpoint=/home/sergey/Videos megastorage/Videos
zfs create megastorage/Downloads
zfs set mountpoint=/home/sergey/Downloads megastorage/Downloads
It all was working fine until (at my own risk, blah blah, I know :) ) I upgraded my machine from Kubuntu 22.10 to 23.04 dev (the new KDE tiling support is awesome btw).
Now it appears that ZFS configuration has been "reset" - the drives/partitions are still there:
Disk /dev/sda: 7.28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: ST8000DM004-2U91
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: D84C712C-9C3C-D547-A67E-1F98349ECAB6
Device Start End Sectors Size Type
/dev/sda1 2048 15628036095 15628034048 7.3T Solaris /usr & Apple ZFS
/dev/sda9 15628036096 15628052479 16384 8M Solaris reserved 1
Disk /dev/sdb: 7.28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: ST8000DM004-2U91
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 2D33AD17-386C-CE4D-8623-ACFE852D090A
Device Start End Sectors Size Type
/dev/sdb1 2048 15628036095 15628034048 7.3T Solaris /usr & Apple ZFS
/dev/sdb9 15628036096 15628052479 16384 8M Solaris reserved 1
However, it appears that zpool no longer has any information about the drives:
# zpool list
no pools available
All the mountpoints are now just empty folders.
How do I safely recreate the pool and re-add the drives without erasing the data? The manpages do not make it clear whether zpool create
would erase the data on the drives.
Also, out of curiosity, where is the configuration of the pool is stored? The first time I did it it just worked like magic without tweaking any configs to make the changes permanent.
zpool import
zpool import megastorage
and thenzfs set mountpoint=...
for each mountpoint and my files are back now, thanks. If you add your comment as an answer I'll be happy to accept it.