disable automatic zpool import

Moderators: jhartley, MSR734, nola

disable automatic zpool import

Post by xatru » Thu Jan 10, 2013 4:16 pm

Hi Guys,

I've got now a new mac mini server, that contains 2x 1TB disk. Alone to avoid the HFS+ single lock problem I've added via FireW old spare Intel SSD with 80GB as system disk.
Now I want to encrypted and mirror both 1T disks, ideal with ZFS. So far using CoreStorage to encrypt each disk and use ZFS mirror works great, however on reboot the problem comes. I can only unlock one disk by the time and hence zpool goes in degraded. As I don't plan to reboot that often, I think manual activating for zpools would be no problem (zpool import xxx).
Did anyone figure out yet how disable automatic mounting of zpools on e.g. startup/unlocking CoreStorage logical volume?

Thanks,
Xat
xatru Offline


 
Posts: 1
Joined: Sun Dec 16, 2012 5:17 pm

Suppression of dynamic import

Post by grahamperrin » Sun Jan 13, 2013 5:13 pm

As far as I know, there is an acknowledged need for import to be not dynamic in all cases. See for example:

ZEVO versus virtual machine uses of devices

With ZEVO Community Edition 1.1.1 there is no supported method to suppress the dynamics.
grahamperrin Offline

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

Keychain items for Core Storage encrypted logical volumes

Post by grahamperrin » Sun Jan 13, 2013 5:19 pm

xatru wrote:… I can only unlock one disk …


Add to a keychain:

  • two password items.

In the account field of the password item, have the UUID of the Core Storage logical volume.

Unlock the keychain before you connect the disks.

For each LV that is successfully unlocked in that way, without user interaction, the operating system will present an additional prompt to unlock. You may ignore, escape from these prompts.
grahamperrin Offline

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

Bump

Post by grahamperrin » Sun Mar 24, 2013 2:18 pm

Time to gently bump this feature request.

See for example viewtopic.php?p=4365#p4365 – I don't want to access the data, but I would like to connect the disk (to run zdb or whatever) without the kernel panicking so soon after connection.

Interface

I imagine a radio button or switch in the ZEVO pane of System Preferences, and a requirement to reboot the system after switching.
grahamperrin Offline

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

Re: disable automatic zpool import

Post by raattgift » Mon Mar 25, 2013 2:24 pm

It would also be nice to have a way to have the pool readonly=on property to be set for the first import (upon critical mass of attaching devices), rather than requiring an export and reimport (with -o readonly=on).
raattgift Offline


 
Posts: 98
Joined: Mon Sep 24, 2012 11:18 pm

Link

Post by grahamperrin » Mon Mar 25, 2013 8:41 pm

raattgift wrote:… pool readonly=on property to be set for the first import …


That fits with post viewtopic.php?p=3440#p3440 and others under ZFS forensics.
grahamperrin Offline

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

Re: disable automatic zpool import

Post by grahamperrin » Thu Jun 06, 2013 12:48 am

In IRC a few days ago (with a view to testing MacZFS in a virtual machine with a pool exported by ZEVO) there was a suggestion to first export pools, then use kextunload.

This works in only some cases.

Responses to kextunload
grahamperrin Offline

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

Approaches to suppressing dynamic import

Post by grahamperrin » Thu Jun 06, 2013 2:07 pm

Re viewtopic.php?p=4893#p4893

NakkiNyan wrote:… derailed and died with no answer …


To clarify: I'm interested in all approaches, including the one at viewtopic.php?p=4870#p4870

ilovezfs wrote:… I wonder if anyone has had luck blocking ZEVO auto imports using /etc/fstab or perhaps changing the filesystem type code in the GPT. …
grahamperrin Offline

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

FreeBSD use of 516E7CBA-6ECF-11D6-8FF8-00022D09712B

Post by grahamperrin » Mon Jul 08, 2013 4:19 am

Hints

Applying UUID 516E7CBA-6ECF-11D6-8FF8-00022D09712B – the type associated with FreeBSD ZFS – to a partition with ZFS content will:

  • prevent operating systems such as Mountain Lion from recognising that there's ZFS content
  • prevent ZEVO Community Edition 1.1.1 from performing a dynamic import
  • allow the disk, if USB, to be used with virtual machines such as VirtualBox (cross reference).

If the operating system presents the yellow alert that's customary for a disk with no recognisable file system:

  • opt to Ignore.

Related: Compatibility with other ZFS systems

Thanks to ilovezfs and others in irc://chat.freenode.net/#mac-zfs for the hints.
grahamperrin Offline

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

Suppression of dynamic import

Post by grahamperrin » Thu Oct 03, 2013 8:54 pm

Temporarily setting aside the symbolic link to zpool –

/usr/sbin/zpool

– will result in pools being:

  • online
  • not automatically/dynamically imported.

(I stumbled across this effect whilst adding parts of ZEVO to a Recovery OS.)

Please proceed with caution. With the symlink not in its proper place, some things may not work as expected – consider at least the zfs_delegate process, the ZEVO pane of System Preferences, and any third party routine that may expect to find zpool in its usual place.

Whilst the symlink is set aside, you can use the zpool binary at its true path:

/System/Library/Filesystems/zfs.fs/Contents/Resources/bin/zpool

Replace the symlink at the earliest opportunity.


Last bumped by grahamperrin on Thu Oct 03, 2013 8:54 pm.
grahamperrin Offline

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


Return to General Discussion

Who is online

Users browsing this forum: ilovezfs and 0 guests

cron