2

I can't access my locale file system after a reboot. The problem is that I can't mount my zfs filesystem. On system startup it always tells me: "An operation is already pending".

The result of this is, that my raspberry stored the external device under /dev/sda1 (I think before it was /dev/sda). So I tried to mount it manually but my zpool status just says:

pi@raspberrypi:~ $ sudo zpool status -v
  pool: owncloud
 state: UNAVAIL
status: One or more devices could not be opened.  There are insufficient
    replicas for the pool to continue functioning.
action: Attach the missing device and online it using 'zpool online'.
   see: http://www.sun.com/msg/ZFS-8000-3C
 scrub: none requested
config:

    NAME        STATE     READ WRITE CKSUM
    owncloud    UNAVAIL      0     0     0  insufficient replicas
      sda       UNAVAIL      0     0     0  cannot open

I tried to google it and somebody said that I only have to export and import it. But I think this was a big fault.

root@raspberrypi:~# zpool export owncloud
root@raspberrypi:~# zpool import -FX owncloud
cannot import 'owncloud': one or more devices is currently unavailable
    Destroy and re-create the pool from
    a backup source.
root@raspberrypi:~# zpool import -f
  pool: owncloud
    id: 6716847667614780371
 state: FAULTED
status: The pool metadata is corrupted.
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://www.sun.com/msg/ZFS-8000-72
config:

    owncloud                                               FAULTED  corrupted data
      disk/by-id/ata-WDC_WD10JPVX-22JC3T0_WD-WX41AA58A29S  ONLINE

root@raspberrypi:~# zpool import -f 6716847667614780371
cannot import 'owncloud': I/O error
    Destroy and re-create the pool from
    a backup source.

Does anyone know how to fix this problem? Because I really don't think this is a hardware error. I just want to get the stored data. Maybe with a tool not from zfs?

root@raspberrypi:~# mount /dev/sda1 /srv/owncloud/storage/
mount: /srv/owncloud/storage: unknown filesystem type 'zfs_member'.
phrogg
  • 888
  • 1
  • 13
  • 28
OjunbamO
  • 29
  • 1
  • 3

1 Answers1

0

Try exporting the pool and removing the zpool.cache file. It should be in /etc/zfs/spool.cache.

Then try zpool import owncloud.

Gordan Bobić
  • 1,748
  • 13
  • 16
  • There is no cache so the import doesn't work either. I think the file system is corrupted so import won't work or did I understand something wrong? thank you in advance – OjunbamO May 02 '20 at 16:28
  • Does this symlink exist: `/dev/disk/by-id/ata-WDC_WD10JPVX-22JC3T0_WD-WX41AA58A29` ? Is the disk visible under it's block device node, e.g. `/dev/sda` ? Can you `zpool import -d /dev/disk/by-id/ owncloud` ? Do you get anything from zpool import? Is the disk readable? Can you ddrescue the disk to a file on a different disk, connect it to a loopback device, run kpartx on that, and see if you can import it from there? – Gordan Bobić May 02 '20 at 16:50
  • I think you are right. As I said above I think it could be that the external device will be existend under `/dev/sda1` instead of `/dev/sda`. But if I disconnect the device, both `/dev/sda*`will disappear. result of `zpool import -d /dev/disk/by-id/ata-WDC_WD10JPVX-22JC3T0_WD-WX41AA58A29S`: `cannot open '/dev/sda/': Not a directory` – OjunbamO May 03 '20 at 13:26
  • Omit the trailing slash from the -d parameter. -d expects a directory and will scan all device nodes under it. – Gordan Bobić May 03 '20 at 13:29
  • Sorry but I don't know what you mean. I deleted the slash on your last import suggestion, but it also results in an error: `root@raspberrypi:~# zpool import -d /dev/disk/by-id owncloud cannot import 'owncloud': I/O error Destroy and re-create the pool from a backup source. ` – OjunbamO May 03 '20 at 13:37
  • Yes it looks like the pool is damaged beyond repair after all. :-( – Gordan Bobić May 03 '20 at 14:01
  • Yea I think so too. Do you know any way how to copy my data? Or is dd the only way? But thanks for you're help. – OjunbamO May 03 '20 at 14:24
  • I am not aware of an easy way to recover any data from where you are now. :-( – Gordan Bobić May 03 '20 at 14:28