Importing zpool from Linux ZFS-Fuse

Moderators: jhartley, MSR734, nola

Importing zpool from Linux ZFS-Fuse

Post by daniel.jozsef » Sun Oct 07, 2012 12:57 pm

Hi!

There is a pair of disks in zraid mirror that I created in Linux, with ZFS-fuse. Now the machine I used them in is no longer around, and I kind of need to access the data on them.

The problem is that ZEVO simply fails to see them. This is how things go:
- I connected the two drives (via FW800) to my iMac.
- Mountain Lion pops up two dialogs that "the disk inserted cannot be read", and I click Ignore for both of them.
- Then...
Code: Select all
bash-3.2$ zpool showdisks
DISK DEVICE      SIZE  CONNECTION    DESCRIPTION
/dev/disk2    1.36TiB  FireWire      External RAID Media
/dev/disk3    1.36TiB  FireWire      External RAID Media

- Seems okay, but...
Code: Select all
bash-3.2$ zpool import -d /dev/
bash-3.2$ zpool list
no pools available


Now there is something important about this. Everyone keeps talking about partitions... These disks are NOT partitioned. They were added "as is" to the zpool in Linux, they were managed entirely by ZFS. In Disk Utility they show up as unformatted.

Is there any way I can get ZEVO to see the zpool? Or should I just get a Linux and save the data from them? (a bloody chore that is going to be...)
daniel.jozsef Offline


 
Posts: 14
Joined: Sun Sep 30, 2012 2:26 pm

Re: Importing zpool from Linux ZFS-Fuse

Post by dbrady » Sun Oct 07, 2012 2:34 pm

How does diskutil list display these 2 disks?
dbrady Offline


 
Posts: 67
Joined: Wed Sep 12, 2012 12:43 am

Re: Importing zpool from Linux ZFS-Fuse

Post by daniel.jozsef » Sun Oct 07, 2012 2:49 pm

Code: Select all
daniels-imac:~ coralio$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *3.0 TB     disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Vorpal                  3.0 TB     disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                                                   *1.5 TB     disk1
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                                                   *1.5 TB     disk2


Like this. BTW in the meantime I tried uninstalling ZEVO, and installing maczfs-74.2.0. Maczfs sees the pool, but reports it as faulted and unavailable, because of version incompatibilities (maczfs is only up to zpool version 8).
(Dang it!)
Anyway, ZEVO just "spat out" that there is nothing to do almost instantly, while with maczfs, when I run zpool import, it actually stops and thinks, the Firewire drives spin up, and then I get the following:

MACZFS-74.2.0 output:
Code: Select all
daniels-imac:~ coralio$ sudo zpool import
Password:
  pool: bulk
    id: 13747860897300033583
 state: FAULTED
status: The pool was last accessed by another system.
action: The pool cannot be imported due to damaged devices or data.
   see: http://www.sun.com/msg/ZFS-8000-EY
config:

   bulk        UNAVAIL  newer version
     mirror    ONLINE
       disk1   ONLINE
       disk2   ONLINE
daniel.jozsef Offline


 
Posts: 14
Joined: Sun Sep 30, 2012 2:26 pm

Re: Importing zpool from Linux ZFS-Fuse

Post by daniel.jozsef » Sun Oct 07, 2012 3:34 pm

...now this seems to be a major problem. I'm not sure what is the correct way to handle disks in raidz pools, but this is what Linux does. ZEVO seems to insist on there being a GUID partition scheme, which is prohibitive - there is no way I can create one, I'm pretty sure that area is also used by ZFS itself on the disks.
If there isn't one already, ZEVO needs a setting in a future version to ignore partitions and disk types, and just probe every available disk for ZFS content. Apparently the far more primitive maczfs successfully found it, so making it work is not a question of ADDING functionality, but TAKING it away, and allowing it to do what I'm sure it's already able to do.
I wonder, how can one file a feature request for ZEVO CE? I didn't find a bug tracking system on the GreenBytes page.
daniel.jozsef Offline


 
Posts: 14
Joined: Sun Sep 30, 2012 2:26 pm

Re: Importing zpool from Linux ZFS-Fuse

Post by daniel.jozsef » Tue Oct 09, 2012 4:33 am

(any thoughts? from the devs maybe? this is causing major grief, and it would be really easy to fix... Or simply I'm missing some information.)
daniel.jozsef Offline


 
Posts: 14
Joined: Sun Sep 30, 2012 2:26 pm

Re: Importing zpool from Linux ZFS-Fuse

Post by NakkiNyan » Thu Oct 11, 2012 12:06 am

MacZFS does not use a GUID partition, or at least didn't when I used it (v74.1.0), which is likely why it tried while ZEVO didn't. I am not sure ZEVO can import it at all since it is mis-formatted per ZEVO's requirements. The only solution I can think of for this case is to backup the data and make the pool over again. Unfortunately OSX requires some things and there are too many versions of ZFS for disk portability.

daniel.jozsef wrote:Apparently the far more primitive maczfs successfully found it, so making it work is not a question of ADDING functionality, but TAKING it away, and allowing it to do what I'm sure it's already able to do.
Actually it would be adding functionality to make parts of the disk and OSX work well with each other. They would have to add another method of making the disk play nice with OSX, MacZFS does not play nice with OSX at all, and neither does their incoherent cheerleader "dtm" (Daniel Bethe).
NakkiNyan Offline


 
Posts: 47
Joined: Tue Oct 02, 2012 12:19 pm

Re: Importing zpool from Linux ZFS-Fuse

Post by dbrady » Thu Oct 11, 2012 12:33 am

daniel.jozsef wrote:(any thoughts? from the devs maybe? this is causing major grief, and it would be really easy to fix... Or simply I'm missing some information.)


The import code is filtering for disk slices. It's possible you can work around this by creating a symlink whose name looks like a disk slice. I haven't tested this, but it's an easy experiment to try. Using your disks above as an example:
Code: Select all
$ sudo ln -s /dev/disk1 /dev/disk1s2
$ sudo ln -s /dev/disk2 /dev/disk2s2
dbrady Offline


 
Posts: 67
Joined: Wed Sep 12, 2012 12:43 am

Re: Importing zpool from Linux ZFS-Fuse

Post by daniel.jozsef » Thu Oct 11, 2012 4:15 am

I'm not all that familiar with the inner workings of OSX, but I do know that it's POSIX, which means that /dev/disk1 is a read/write accessible character device. Would using it as such (ie. as a raw device) and eschewing partition tables cause problems with other OS components?

Backing up the data would be a major problem, since I have trouble making the drives accessible to a virtualized environment (Virtualbox), and do not have a Linux box (or an empty pair of 1.5T drives) around.

I'll try the symlink approach though. Still it would be nice if ZEVO supported disk portability, say as an emergency "force" option so as not to disrupt normal operation, if accessing the drives directly would play foul with high level OSX components.
daniel.jozsef Offline


 
Posts: 14
Joined: Sun Sep 30, 2012 2:26 pm

Re: Importing zpool from Linux ZFS-Fuse

Post by daniel.jozsef » Sat Oct 13, 2012 3:55 pm

Apparently creating slice symlinks did work after all. :) I guess the best solution would still be to recreate the pool, but at least I can access my files in the meantime.

There is one weird thing I noticed, when I navigate the file systems via bash, all the filenames appear correctly. However, Finder doesn't show some files. I am still trying to find out what is going on, it seems that the problem files have non-ASCII characters in their names. The weirdest thing is that it displays Japanese file names, but had trouble with some latin2 ones. Since I live in Hungary, I have plenty of latin2 filenames on my main drive, and (naturally) Finder doesn't have anything against those.
daniel.jozsef Offline


 
Posts: 14
Joined: Sun Sep 30, 2012 2:26 pm

file system normalisation (issues with file names)

Post by grahamperrin » Sat Oct 13, 2012 5:14 pm

daniel.jozsef wrote:… when I navigate the file systems via bash, all the filenames appear correctly. However, Finder doesn't show some files. … it seems that the problem files have non-ASCII characters in their names. … it displays Japanese file names, but had trouble with some latin2 …


On the affected file systems, what normalization properties are set?

For OS X, formD is preferred.
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Next

Return to General Discussion

Who is online

Users browsing this forum: ilovezfs and 1 guest

cron