ZFS label issues between MacosX and Linux (SOLVED)

All your general support questions for OpenZFS on OS X.

ZFS label issues between MacosX and Linux (SOLVED)

Postby fcojavi0 » Mon Jul 31, 2017 11:03 am

Hello,

I think I have found a strange "issue" when working between Linux and MacOSX machines that made impossible to exchange drives between these systems. You can reproduce it using this:

1. In a MacOSX environment just create a pool in a USB disk. I.E:

zpool create -f -o ashift=12 -O compression=lz4 -O casesensitivity=insensitive -O atime=off -O normalization=formD USB diskXX

2. Everything works fine, you can plug-in/plug-out the USB drive in you mac systems and everything works fine:

zpool import USB
Do_whatever_you_want
zpool export USB

#zdb -l /dev/mapper/truecrypt2
--------------------------------------------
LABEL 0
--------------------------------------------
version: 5000
name: 'USB'
.......
vdev_tree:
type: 'disk'
path: '/dev/disk3' <=======Original disk path
whole_disk: 0

3. Under Linux you can do the same and works fine too. But after "zpool export USB" the label has changed:

zdb -l /dev/mapper/truecrypt2
--------------------------------------------
LABEL 0
--------------------------------------------
version: 5000
name: 'USB'
......
vdev_tree:
type: 'disk'
path: '/dev/mapper/WHATEVER' <== Linux PATH after beign used!!!!

4. Cannot be re-used in MacosX!!

sh-3.2# zpool list
no pools available
sh-3.2# zpool import
no pools available to import
zdb -l /dev/disk3
--------------------------------------------
LABEL 0
--------------------------------------------
version: 5000
name: 'USB'
state: 1
.........
type: 'disk'
id: 0
path: '/dev/mapper/XXXX

I have check forums & google and I didn't find anything about it. Any ideas? It is a bug or a "feature"? :)

How can I change the "path" in the label? I guess It is about the "auto-pool-detection"...


Thank you!
Last edited by fcojavi0 on Tue Aug 01, 2017 2:39 am, edited 1 time in total.
fcojavi0
 
Posts: 2
Joined: Mon Jul 31, 2017 10:37 am

Re: ZFS label issues between MacosX and Linux

Postby lundman » Mon Jul 31, 2017 6:35 pm

Try:

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

Re: ZFS label issues between MacosX and Linux (SOLVED!)

Postby fcojavi0 » Tue Aug 01, 2017 2:36 am

Thank you, lundman!

Works like charm :lol: :lol: :lol: :lol: :lol: :lol: :lol:
fcojavi0
 
Posts: 2
Joined: Mon Jul 31, 2017 10:37 am


Return to General Help

Who is online

Users browsing this forum: No registered users and 30 guests

cron