ZFS cannot import pool: no such pool available

r00t9

New Member
Nov 5, 2023
7
0
1
I have a Proxmox Server with ZFS (mirror - two disks).
After a power outage, i get an error that the pool it was already there.

I check /etc/zfs/zpool.cache and it was empty so i run this zpool set cachefile=/etc/zfs/zpool.cache pool

After reboot, i get this error message cannot import pool : no such pool available . But i can see my pool is online and Healthy.

I can see the mount pool to the system but the size is 128KB



Anyone can help without losing my data :) Not sure what is the next step to run
 
no backups available?

please check zpool import and report.
Backup disk it was broken, and I ordered a new one, but it didn't arrive and this happen today :D

zpool import

no pools available to import
 
ok, thats bad..
can you find in dmesg | grep sd interface names of any of your drives?
 
Yes i can see the interface for my two drives.

I set cachefile=none for my pool ( i remember i never set cache for zfs :/ )

After reboot, i can see the same error that i get the first time.

Service: zfs-import-scan

Error: Cannot import 'pool' : pool already exists.

zpools import still the same output if i run it manually no pools available to import
 
can you get a second pc for testing, Please install a new proxmox ve on that and add the old drives of that zfs pool.

Can you please write the exact drives names?
 
I don't have a second PC for testing.

Not sure what you mean by drives names i will try to answer it.

sda1,sdc1
 
sda1,sdc1
"sda" etc has no stable meaning, those names may possibly mutate on each reboot or after hardware modification like adding controllers, drives or a random PCI card...

Please try again: lsblk -o+FSTYPE,MODEL | grep -v zd
 
OK i ran this command lsblk -o+FSTYPE,MODEL | grep -v zd is the output.

1755444820263.png


I needed to shut down to change hdmi, and when i chose the older kernel (6.2.16-3-pve) , it booted ok.

ls -l /lib/modules/
total 8
drwxr-xr-x 4 root root 4096 Nov 7 2023 6.2.16-19-pve
drwxr-xr-x 4 root root 4096 Nov 2 2023 6.2.16-3-pve


Now, everything is working ok :/ i think.

Not sure, maybe is the command i run before update-initramfs -u -k all or i comment out backup disk from fstab


With df -h i don't remember if it was like this before :/
pool 6.3T 128K 6.3T 1% /pool


I still see this Error from zfs-import-scan.service

zpool[722]: cannot import 'pool': pool already exists
systemd[1]: zfs-import-scan.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: zfs-import-scan.service: Failed with result 'exit-code'.
systemd[1]: Failed to start zfs-import-scan.service - Import ZFS pools by device scanning.


Not sure why is working or why it was not booting in maintenance mode
 
This might not matter or help at all...

When you are booted into the previous kernel, you say your pool is working? If so, then do a `zpool status pool` (or whatever the name of the pool is).

If it has sda and sdc listed, then I would export and reimport it

With your VMs/containers all shutdown, so nothing is using that pool

`zfs export pool` (use your real pool name)
`zpool import -d /dev/disk/by-id -aN`

This will cause it to use the ids and not the sdX, which as UdoB mentioned, can change.