Cannot access disk on zfs, Don’t Panic!!


I was having an issue with one of my Proxmox 5.0 version. When I was trying to start my VM it states an error:

 kvm: -drive file=/dev/zvol/rpool/vm-102-disk-1,if=none,id=drive-scsi0,format=raw,cache=none,aio=native,detect-zeroes=on: Could not open '/dev/zvol/rpool/vm-102-disk-1': No such file or directory 

Hmm.. ” /dev/zvol is missing” when I check the zpool status, all states good

 [email protected]:~# zpool status -v
   pool: rpool
  state: ONLINE
   scan: none requested
     NAME                                              STATE     READ WRITE CKSUM     rpool                                             ONLINE       0     0     0       mirror-0                                        ONLINE       0     0     0         scsi-3600050e000008c00bd67000026b50000-part3  ONLINE       0     0     0         scsi-3600050e000008c0066750000d6930000-part3  ONLINE       0     0     0
 errors: No known data errors
 [email protected]:~# zfs list
 NAME                          USED  AVAIL     REFER  MOUNTPOINT
 rpool                         661G   139G      104K  /rpool
 rpool/ROOT                    345G   139G       96K  /rpool/ROOT
 rpool/ROOT/pve-1              345G   139G      345G  /
 rpool/data                    316G   139G       96K  /rpool/data
 rpool/data/base-1000-disk-0  1.00G   139G     1.00G  -
 rpool/data/vm-1003-disk-0    5.50G   139G     5.50G  -
 rpool/data/vm-1003-disk-1    3.54G   139G     3.54G  -
 rpool/data/vm-101-disk-0     69.1G   139G     69.1G  -
 rpool/data/vm-102-disk-1      236G   139G      234G  -
 [email protected]:~#

Reboot the proxmox did not solve the problem. So, after a couple of hours. I got a clue from the following reference:

There was a problem upgrade command that’s not completely finished, there are two conditions that we don’t have to panic

  1. The ZFS has still detected the disk list when we type command “zfs list”
  2. Zpool status has no error found and no disk issue (hardware)

How to solve it??

Check your current zfs installed by running the following command:

dpkg -l | grep -i "zfs"

If there are some version mismatch 0.6 and 0.7 then you have to reinstall it. First. before we reinstall please ensure that the current kernel running is 4.10 (for proxmox 5.0). If all is good that running a command as follows:

apt-get install libzpool2linux
apt-get install libnvpair1linux
apt-get install libuutil1linux
apt-get install libzfs2linux-dev
apt-get install libzfs2linux 
apt-get install zfs-initramfs
apt-get install zfsutils-linux
apt-get install spl

The command above will reinstall (either downgrade and upgrade), So, all version will be exactly the same and it should be 0.7 to all ZFS* and supported kernel 4.10

When it’s done please wait for 5 minutes then try to start the VM again, if there is an error please reboot the server/proxmox to update the kernel with new ZFS reinstalled.

That’s all. I had my day back to normal again ? Hope this helps you All


Please enter your comment!
Please enter your name here