[SOLVED] cannot import pool after export

New to OpenZFS on OS X (Or ZFS in general)? Ask your questions here!

[SOLVED] cannot import pool after export

Postby maybeageek » Sat May 21, 2016 12:22 pm

Hi everybody,

basically my question is in the Subject.

Last night I wrote a little script to backup my external HDD to another external with zfs send -> recv.

To do that I needed to format the backup drive. So, in order to not harm my source drive, I did zpool export poolname, followed by a power down of the drive.
I then dd'd zeros to the backup drive (was HFS+ before), created a new pool and dataset and checked if everything went ok.
After that, I powered up the source drive, but nothing appeared. A reboot normally brings it back: To no luck.
zpool import results in "no pools available to import"

zpool status shows only the backup pool I created.

And now I am stuck. I did not change anything on the source drive and it is a single disk pool. So it should be able to see and import it?
When I installed new versions of O3X the export and later an import worked without problems.

What can I do?

zpool status only lists the new pool on my backup drive.

Any help is highly appreciated!

All the best,

maybeageek
Last edited by maybeageek on Tue May 24, 2016 11:02 am, edited 1 time in total.
maybeageek
 
Posts: 12
Joined: Fri Jul 31, 2015 3:17 am

Re: cannot import pool after export

Postby maybeageek » Sun May 22, 2016 2:03 pm

Code: Select all
sh-3.2# zpool import
no pools available to import


Code: Select all
diskutil list
/dev/disk5 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk5
   1:                        ZFS                         1.0 TB     disk5s1
   2: 6A945A3B-1DD2-11B2-99A6-080020736631               8.4 MB     disk5s9


So there still seems to be something recognizable there.
maybeageek
 
Posts: 12
Joined: Fri Jul 31, 2015 3:17 am

Re: cannot import pool after export

Postby xbytor » Sun May 22, 2016 2:54 pm

Try
Code: Select all
sudo zpool import -a
if you haven't already. If not, specify the device directly
Code: Select all
sudo zpool import /dev/disk5s1
.
xbytor
 
Posts: 22
Joined: Sun Jun 29, 2014 7:52 pm

Re: cannot import pool after export

Postby maybeageek » Mon May 23, 2016 12:17 am

Hi,

thanks for the hint. I already tried -a.

Code: Select all
sh-3.2# sudo zpool import -a         
no pools available to import
sh-3.2# sudo zpool import /dev/disk5s1
cannot import '/dev/disk5s1': no such pool available


So, that didn't work :-(
maybeageek
 
Posts: 12
Joined: Fri Jul 31, 2015 3:17 am

Re: cannot import pool after export

Postby maybeageek » Mon May 23, 2016 12:33 am

I must admit: Most of the data on the disk is just there for backup purposes, so losing it doesn't hurt too much.
There is just two files on there that I'd like to have back, but nothing of utmost value.

What I'd like mainly is to understand what happened and why.
maybeageek
 
Posts: 12
Joined: Fri Jul 31, 2015 3:17 am

Re: cannot import pool after export

Postby lundman » Mon May 23, 2016 12:37 am

zpool import -d /dev
User avatar
lundman
 
Posts: 1334
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: cannot import pool after export

Postby maybeageek » Mon May 23, 2016 1:45 am

lundman wrote:zpool import -d /dev


Code: Select all
sudo zpool import -d /dev/disk5s1
cannot open '/dev/disk5s1/': Not a directory
sudo zpool import -d /dev     
no pools available to import


thanks mate, but didn't work :-(
maybeageek
 
Posts: 12
Joined: Fri Jul 31, 2015 3:17 am

Re: cannot import pool after export

Postby Brendon » Mon May 23, 2016 2:11 am

One can only assume that somehow you didn't actually do exactly as described (and you have destroyed the ZFS filesystem), or alternately this disk has failed at an inconvenient moment.

When you plug the offending disk in, does it appear in "diskutil list"? If it does you could possibly try "zdb -l /dev/yourdisk".

- Brendon
Brendon
 
Posts: 286
Joined: Thu Mar 06, 2014 12:51 pm

Re: cannot import pool after export

Postby maybeageek » Mon May 23, 2016 6:50 am

Hi Brendon,

I am certain I did it with the right disk, as they are quite different. My source ZFS disk is in a SATA dock so there is no possibility of actually destroying it once the switch is flicked.
The backup-drive is one of two USB3 2,5" Intenso drives, and I tripple checked to get the right disk device. My other Intenso survived without problem, and the ZFS volume was exported and physically switched off (and verified disconnected). So nothing can have happened to it.

diskutil list still lists the correct disk (dev/disk5) with a GPT scheme and 2 partitions, the first one being ZFS, the other autocreated by "zpool create /dev/disk5".
(see below:
disk 0 = internal SSD
disk 1 = internal HDD
disk 2 = virtual, FusionDrive
disk 3 = the Intenso backup drive, meant as receiving end for the zfs send command.
disk 4 = the second Intenso drive, TimeMachine Backup of the Mac
disk 5 = the Disk in the dock, my initial ZFS drive

zdb -l /dev/disk5 output below, also.

Thanks for your time!

Code: Select all
diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *121.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:          Apple_CoreStorage Macintosh HD            121.0 GB   disk0s2
   3:                 Apple_Boot Boot OS X               134.2 MB   disk0s3
/dev/disk1 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk1
   1:                        EFI EFI                     209.7 MB   disk1s1
   2:          Apple_CoreStorage Macintosh HD            728.3 GB   disk1s2
   3:                 Apple_Boot Recovery HD             650.1 MB   disk1s3
   4:       Microsoft Basic Data BOOTCAMP                271.0 GB   disk1s4
/dev/disk2 (internal, virtual):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS Macintosh HD           +843.1 GB   disk2
                                 Logical Volume on disk0s2, disk1s2
                                 8CAB3374-14DF-41DD-A94C-6A4062EDF47B
                                 Unencrypted Fusion Drive
/dev/disk3 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk3
   1:                        EFI EFI                     209.7 MB   disk3s1
   2:                  Apple_HFS Intenso1TB              999.9 GB   disk3s2
/dev/disk4 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk4
   1:                        EFI EFI                     209.7 MB   disk4s1
   2:          Apple_CoreStorage TimeMachine             999.9 GB   disk4s2
   3:                 Apple_Boot Boot OS X               134.2 MB   disk4s3
/dev/disk5 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk5
   1:                        ZFS                         1.0 TB     disk5s1
   2: 6A945A3B-1DD2-11B2-99A6-080020736631               8.4 MB     disk5s9
/dev/disk6 (external, virtual):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS TimeMachine            +999.5 GB   disk6
                                 Logical Volume on disk4s2
                                 CA0B3F58-D008-48E5-A9E8-8A7C9E632792
                                 Unlocked Encrypted


Code: Select all
zdb -l /dev/disk5
--------------------------------------------
LABEL 0
--------------------------------------------
failed to unpack label 0
--------------------------------------------
LABEL 1
--------------------------------------------
failed to unpack label 1
--------------------------------------------
LABEL 2
--------------------------------------------
failed to unpack label 2
--------------------------------------------
LABEL 3
--------------------------------------------
failed to unpack label 3
maybeageek
 
Posts: 12
Joined: Fri Jul 31, 2015 3:17 am

Re: cannot import pool after export

Postby Brendon » Mon May 23, 2016 1:46 pm

show us

zpool import -a
zpool status

If you believe the output of diskutil list, disk3 appears to be HFS "Intenso1TB", although it is easy to have a disk that looks like that contain ZFS.

- Brendon
Brendon
 
Posts: 286
Joined: Thu Mar 06, 2014 12:51 pm

Next

Return to Absolute Beginners Section

Who is online

Users browsing this forum: No registered users and 2 guests