zevo with Truecrypt volume

Moderators: jhartley, MSR734, nola

zevo with Truecrypt volume

Post by jsb204 » Mon Sep 17, 2012 1:50 pm

I've had good results using MacZFS with a Truecrypt volume- that is, I created a volume with Truecrypt, mounted it, and created a zfs filesystem on it. The next time I want to mount it, I attach it with Truecrypt (using the "do not mount") option, and then the decrypted volume shows up as a disk in /dev. I was then able to simply import it under MacZFS with the 'zpool import <poolname>' command.

After installing Zevo, I have found that it will not import this pool. The import command fails with "no such pool available." So my question: Why will this technique not work with Zevo while it works flawlessly with MacZFS?

The only wildcard here is that I booted in 64-bit mode to use Zevo, and thus I had to install a 64-bit version of MacFUSE to make Truecrypt work.

Thanks.
jsb204 Offline


 
Posts: 16
Joined: Sat Sep 15, 2012 11:32 am

FUSE for OS X

Post by grahamperrin » Tue Sep 18, 2012 3:42 pm

jsb204 wrote:… version of MacFUSE …


MacFUSE is no longer maintained.

You may instead use FUSE for OS X, which has a MacFUSE compatibility layer.
grahamperrin Offline

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

Re: FUSE for OS X

Post by jsb204 » Tue Sep 18, 2012 9:09 pm

grahamperrin wrote:MacFUSE is no longer maintained.

You may instead use FUSE for OS X, which has a MacFUSE compatibility layer.


Thanks for the tip. I did some more testing, and FUSE doesn't seem to have any bearing on the problem.
jsb204 Offline


 
Posts: 16
Joined: Sat Sep 15, 2012 11:32 am

Re: zevo with Truecrypt volume

Post by jbchatham » Wed Sep 19, 2012 7:52 pm

Did you have any more luck with this? In the same situation - trying to share a truecrypt zfs volume in a dual-boot system. Everything seems to recognize that the mounted truecrypt volume is zfs:

Code: Select all
$ zpool import -d /private/tmp/.truecrypt_aux_mnt1
  pool: stuff
    id: 12714233537894169838
 state: UNAVAIL
status: One or more devices are missing from the system.
action: The pool cannot be imported. Attach the missing
   devices and try again.
config:

   stuff                                          UNAVAIL  insufficient replicas
     /private/tmp/.truecrypt_aux_mnt1/volume.dmg  UNAVAIL  cannot open


But cannot import it (the -f needed because I forgot to export from the other OS before rebooting but I've tried after an export as well):

Code: Select all
zpool import -f -d /private/tmp/.truecrypt_aux_mnt1 stuff
cannot import 'stuff': invalid vdev configuration


relevant parts of dmesg:

Code: Select all
________________________________________
ZFS WARNING: 'error from: fs.zfs.zpool'
pool: 'stuff'

zfsdev_ioctl: function error 22 on command 2


and zdb -l:

Code: Select all

$ sudo zdb -l /private/tmp/.truecrypt_aux_mnt1/volume.dmg
--------------------------------------------
LABEL 0
--------------------------------------------
    version: 28
    name: 'stuff'
    state: 0
    txg: 24688
    pool_guid: 12714233537894169838
    hostname: 'brent-macbook-arch'
    top_guid: 7410058982286221671
    guid: 7410058982286221671
    vdev_children: 1
    vdev_tree:
        type: 'disk'
        id: 0
        guid: 7410058982286221671
        path: '/dev/dm-1'
        whole_disk: 0
        metaslab_array: 30
        metaslab_shift: 31
        ashift: 9
        asize: 332868354048
        is_log: 0
        create_txg: 4
--------------------------------------------
LABEL 1
--------------------------------------------
    version: 28
    name: 'stuff'
    state: 0
    txg: 24688
    pool_guid: 12714233537894169838
    hostname: 'brent-macbook-arch'
    top_guid: 7410058982286221671
    guid: 7410058982286221671
    vdev_children: 1
    vdev_tree:
        type: 'disk'
        id: 0
        guid: 7410058982286221671
        path: '/dev/dm-1'
        whole_disk: 0
        metaslab_array: 30
        metaslab_shift: 31
        ashift: 9
        asize: 332868354048
        is_log: 0
        create_txg: 4
--------------------------------------------
LABEL 2
--------------------------------------------
    version: 28
    name: 'stuff'
    state: 0
    txg: 24688
    pool_guid: 12714233537894169838
    hostname: 'brent-macbook-arch'
    top_guid: 7410058982286221671
    guid: 7410058982286221671
    vdev_children: 1
    vdev_tree:
        type: 'disk'
        id: 0
        guid: 7410058982286221671
        path: '/dev/dm-1'
        whole_disk: 0
        metaslab_array: 30
        metaslab_shift: 31
        ashift: 9
        asize: 332868354048
        is_log: 0
        create_txg: 4
--------------------------------------------
LABEL 3
--------------------------------------------
    version: 28
    name: 'stuff'
    state: 0
    txg: 24688
    pool_guid: 12714233537894169838
    hostname: 'brent-macbook-arch'
    top_guid: 7410058982286221671
    guid: 7410058982286221671
    vdev_children: 1
    vdev_tree:
        type: 'disk'
        id: 0
        guid: 7410058982286221671
        path: '/dev/dm-1'
        whole_disk: 0
        metaslab_array: 30
        metaslab_shift: 31
        ashift: 9
        asize: 332868354048
        is_log: 0
        create_txg: 4


thanks!
jbchatham Offline


 
Posts: 1
Joined: Fri Sep 14, 2012 9:46 pm

Re: zevo with Truecrypt volume

Post by jsb204 » Wed Sep 19, 2012 9:25 pm

jbchatham wrote:Did you have any more luck with this?


No, I'm afraid not. I don't see why it shouldn't work. I'm sticking with MacZFS for now. Please post an update here if you get it to work.
jsb204 Offline


 
Posts: 16
Joined: Sat Sep 15, 2012 11:32 am

Re: zevo with Truecrypt volume

Post by dbrady » Wed Sep 19, 2012 9:29 pm

Code: Select all
    vdev_tree:
        type: 'disk'
        id: 0
        guid: 7410058982286221671
        path: '/dev/dm-1'



The device path is using a non-standard disk name. Normally ZEVO expects GPT labeled disks which will automatically show up in the /dev/dsk/ directory with persistent disk names. If the disk isn't in /dev/dsk during the import, then it will not be found.

The "-d" option of zpool import let's you override the default location. You could try adding a symlink, like:
Code: Select all
$ sudo ln -s /dev/dm-1 /dev/disk50
$ sudo zpool import -f -d "/dev"

to see if this will help locate the non-standard disk during import.
dbrady Offline


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

Re: zevo with Truecrypt volume

Post by jsb204 » Fri Sep 21, 2012 7:26 pm

Some more data on this:

Code: Select all
sh-3.2# diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            999.9 GB   disk0s2
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk1
   1:                        EFI                         209.7 MB   disk1s1
   2:                  Apple_HFS backup                  600.0 GB   disk1s2
   3:                        ZFS                         399.7 GB   disk1s3
/dev/disk3
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     Apple_partition_scheme                        *2.0 TB     disk3
   1:        Apple_partition_map                         32.3 KB    disk3s1
   2:                  Apple_HFS jsb                     2.0 TB     disk3s2
/dev/disk4
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.5 TB     disk4
   1:                        EFI                         209.7 MB   disk4s1
   2:                        ZFS                         1.5 TB     disk4s2
/dev/disk5
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            SANDISK-4GB            *4.0 GB     disk5
/dev/disk6
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                                                   *1.5 TB     disk6


Notes:
1. /dev/disk4s2 is labeled a "ZFS," but is not actually a zfs disk, the label is just left over from a previous use of the disk. disk4s2 is actually an encrypted Truecrypt volume.

2. /dev/disk6 is the decrypted but unmounted Truecrypt volume. MacZFS will show this as an available volume with zpool import. Zevo does not see it for some reason:
Code: Select all
sh-3.2# zpool showdisks

DISK DEVICE      SIZE  CONNECTION    DESCRIPTION
/dev/disk1     932GiB  USB           WD Ext HDD 1021 Media
/dev/disk4    1.36TiB  USB           PI-192 SATA/USB20 Drive Media
/dev/disk5    3.77GiB  USB           SanDisk Cruzer Media


Code: Select all
sh-3.2# zpool import
  pool: testpool
    id: 2718849431541938165
 state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:

   testpool                                     ONLINE
     GPTE_9C715E50-C0E1-4D59-A943-275C82EE2217  ONLINE
sh-3.2# zpool import -d /dev
  pool: testpool
    id: 2718849431541938165
 state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:

   testpool        ONLINE
     /dev/disk1s3  ONLINE


As you can see, it does not show the ZFS pool at /dev/disk6.

For reference, here is the same deal with MacZFS:

Code: Select all

sr10-699ec0c7a6:~ root# diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            999.9 GB   disk0s2
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk1
   1:                        EFI                         209.7 MB   disk1s1
   2:                  Apple_HFS backup                  600.0 GB   disk1s2
   3:                        ZFS                         399.7 GB   disk1s3
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            SANDISK-4GB            *4.0 GB     disk2
/dev/disk3
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     Apple_partition_scheme                        *2.0 TB     disk3
   1:        Apple_partition_map                         32.3 KB    disk3s1
   2:                  Apple_HFS jsb                     2.0 TB     disk3s2
/dev/disk4
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.5 TB     disk4
   1:                        EFI                         209.7 MB   disk4s1
   2:                        ZFS                         1.5 TB     disk4s2
/dev/disk5
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                                                   *1.5 TB     disk5


sr10-699ec0c7a6:~ root# zpool import
  pool: fpool
    id: 4731135749982950984
 state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:

   fpool       ONLINE
     disk5     ONLINE

  pool: testpool
    id: 2718849431541938165
 state: FAULTED
status: The pool is formatted using an incompatible version.
action: The pool cannot be imported.  Access the pool on a system running newer
   software, or recreate the pool from backup.
   see: http://www.sun.com/msg/ZFS-8000-A5
config:

   testpool    UNAVAIL  newer version
     disk1s3   ONLINE

(testpool is "FAULTED" because it is a Zevo pool)
jsb204 Offline


 
Posts: 16
Joined: Sat Sep 15, 2012 11:32 am

Re: zevo with Truecrypt volume

Post by dbrady » Fri Sep 21, 2012 8:11 pm

Looks like disk6 is an unlabeled disk. Can you partition it with GPT, like:
Code: Select all
diskutil eraseDisk "ZFS Pool" %noformat% disk6


How was the ZFS pool created in disk6?
dbrady Offline


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

Re: zevo with Truecrypt volume

Post by jsb204 » Fri Sep 21, 2012 8:37 pm

dbrady wrote:Looks like disk6 is an unlabeled disk. Can you partition it with GPT, like:
Code: Select all
diskutil eraseDisk "ZFS Pool" %noformat% disk6

How was the ZFS pool created in disk6?


The pool was created with MacZFS via "zpool create <poolname> /dev/disk6"

It didn't occur to me to partition the disk, since it is not a physical disk but merely a decrypted slice of another disk. Maybe in retrospect I should have tried that, but I'm not inclined to reformat that disk and replace the data right now. In any event, I think ZFS should be able to deal with unlabeled partitions and whole disks. If I get a few minutes this weekend or next week, I'll create a test disk and try some different approaches.
jsb204 Offline


 
Posts: 16
Joined: Sat Sep 15, 2012 11:32 am

Re: zevo with Truecrypt volume

Post by jsb204 » Sat Oct 13, 2012 8:28 pm

jsb204 Offline


 
Posts: 16
Joined: Sat Sep 15, 2012 11:32 am

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests