[SOLVED] ZFS data volume lost after power failure

sgala

New Member
Jul 27, 2016
8
1
1
41
Hello,

Here Proxmox 4.1

I have (had) a ZFS volume with some VM. The server had a power lost. After the boot the ZFS volume is not readable/mounted.


root@pve:~# systemctl status zfs-import-cache.service
● zfs-import-cache.service - Import ZFS pools by cache file
Loaded: loaded (/lib/systemd/system/zfs-import-cache.service; static)
Active: failed (Result: exit-code) since Mon 2016-08-08 19:30:34 CEST; 7min ago
Process: 849 ExecStart=/sbin/zpool import -c /etc/zfs/zpool.cache -aN (code=exited, status=1/FAILURE)
Process: 733 ExecStartPre=/sbin/modprobe zfs (code=exited, status=0/SUCCESS)
Main PID: 849 (code=exited, status=1/FAILURE)

Aug 08 19:30:34 pve zpool[849]: cannot import 'zfspool1': I/O error
Aug 08 19:30:34 pve zpool[849]: Recovery is possible, but will result in some data loss.
Aug 08 19:30:34 pve zpool[849]: Returning the pool to its state as of Sat 06 Aug 2016 05:30:31 AM CEST
Aug 08 19:30:34 pve zpool[849]: should correct the problem. Approximately 7 seconds of data
Aug 08 19:30:34 pve zpool[849]: must be discarded, irreversibly. Recovery can be attempted
Aug 08 19:30:34 pve zpool[849]: by executing 'zpool import -F zfspool1'. A scrub of the pool
Aug 08 19:30:34 pve zpool[849]: is strongly recommended after recovery.
Aug 08 19:30:34 pve systemd[1]: zfs-import-cache.service: main process exited, code=exited, status=1/FAILURE
Aug 08 19:30:34 pve systemd[1]: Failed to start Import ZFS pools by cache file.
Aug 08 19:30:34 pve systemd[1]: Unit zfs-import-cache.service entered failed state.


some try:

root@pve:~# zpool status
no pools available

root@pve:~# zpool import -d /dev/disk/by-partuuid zfspool1

cannot import 'zfspool1': I/O error
Recovery is possible, but will result in some data loss.
Returning the pool to its state as of Sat 06 Aug 2016 05:30:31 AM CEST
should correct the problem. Approximately 7 seconds of data
must be discarded, irreversibly. Recovery can be attempted
by executing 'zpool import -F zfspool1'. A scrub of the pool
is strongly recommended after recovery.
# zpool import -o readonly=on -d /dev/disk/by-id/
pool: zfspool1
id: 12445319089102965614
state: FAULTED
status: One or more devices contains corrupted data.
action: The pool cannot be imported due to damaged devices or data.
The pool may be active on another system, but can be imported using
the '-f' flag.
see: http://zfsonlinux.org/msg/ZFS-8000-5E
config:

zfspool1 FAULTED corrupted data
scsi-2b126113900d00000 FAULTED corrupted data

root@pve:~# zdb
zfspool1:
version: 5000
name: 'zfspool1'
state: 0
txg: 88280
pool_guid: 12445319089102965614
errata: 0
hostid: 2831164162
hostname: 'pve'
vdev_children: 1
vdev_tree:
type: 'root'
id: 0
guid: 12445319089102965614
create_txg: 4
children[0]:
type: 'disk'
id: 0
guid: 14552473297351399686
path: '/dev/sdb1'
whole_disk: 1
metaslab_array: 35
metaslab_shift: 34
ashift: 12
asize: 1997134102528
is_log: 0
create_txg: 4
features_for_read:
com.delphix:hole_birth
com.delphix:embedded_data

SDB is a raid volume on a Adaptec 6405E and the volume at the controller level is Ok.

What I can do to recover the situation? It's happened only to me?

Thanks for any help...

Matteo
 
Hi Matteo,

Why did you run your ZFS on top of a RAID (That is clearly not the configuration ZFS is written for)? Do you have only one vdev in your pool and that is now corrupt? That's really bad :-(

I never encountered a problem like this, yet I hopefully never will. You normally give ZFS all the power over all raw devices and let it do its magic. A disk failure is inevitable, yet then easy fixable.

I can only suggest to ask on #zfsonlinux (IRC) for help.
 
I did this command:

root@pve:/# zpool import -F -d /dev/disk/by-id/ zfspool1
cannot import 'zfspool1': a pool with that name already exists
use the form 'zpool import <pool | id> <newpool>' to give it a new name

root@pve:/# zpool list
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
zfspool1 1.81T 1.23T 592G - 35% 68% 1.00x ONLINE -

the volume now it is ONLINE up & running.
 
Last edited:
  • Like
Reactions: chrone

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!