success mounting OSv images on OS X?

42 views
Skip to first unread message

Russ Tremain

unread,
Aug 18, 2015, 2:56:59 AM8/18/15
to Osv Dev
Hi,

Trying to get OSv vmdk images (which I assume are ZFS) to mount on OS X,
using Open ZFS ( https://openzfsonosx.org/wiki/Install ).

Using Vdmutil (free util from Paragon) to mount the vmdk file:

# vdmutil attach -verbose -vendor vmdk -nomount osv-base.vmw
Looking for VDM Contoller...
Connecting... OK.
Creating new drive... OK.
New vd id: A4B8BE5ABBF197210A3C4510212A8F6C
Launched helper with pid = 2424, id = A4B8BE5ABBF197210A3C4510212A8F6C
launch res = 0
Running comand... Command callback(0x12345678)
OK.
/dev/disk2
/dev/disk2s2
Closing connection... OK.

bash-4.3# diskutil list
...
/dev/disk2
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *10.7 GB disk2
1: Linux 10.7 GB disk2s2

bash-4.3# zpool import
pool: osv
id: 15769066805321415286
state: ONLINE
status: Some supported features are not enabled on the pool.
action: The pool can be imported using its name or numeric identifier, though
some features will not be available without an explicit
'zpool upgrade'.
config:

osv ONLINE
disk2 ONLINE

bash-4.3# zpool import -R /zfsmount osv

bash-4.3# zpool list
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
osv 9.94G 18.2M 9.92G - - 0% 1.00x ONLINE /zfsmount

bash-4.3# zfs list osv
NAME USED AVAIL REFER MOUNTPOINT
osv 18.2M 9.76G 297K /zfsmount

So everything looks okay - except the the volume is empty:

bash-4.3# find /zfsmount
/zfsmount
/zfsmount/zfs

Any ideas?

thanks,
-Russ

Cyril Plisko

unread,
Aug 18, 2015, 4:43:38 AM8/18/15
to OSv Development, ru...@releasetools.org

Hi Russ,

check that your datasets are mounted.

zfs get mounted

Chances they are not. If so mount them manually - zfs mount -a

 
thanks,
-Russ

Russ Tremain

unread,
Aug 18, 2015, 12:31:56 PM8/18/15
to Cyril Plisko, OSv Development
okay, this is *way* cool!

the "mount -a" didn't work, but "mount osv/zfs" did the trick:

bash-4.3# zfs mount -a
bash-4.3# zfs get mounted
NAME     PROPERTY  VALUE    SOURCE
osv      mounted   yes      -
osv/zfs  mounted   no       -
bash-4.3# zfs mount osv/zfs
bash-4.3# zfs get mounted
NAME     PROPERTY  VALUE    SOURCE
osv      mounted   yes      -
osv/zfs  mounted   yes      -
bash-4.3# find /zfsmount
/zfsmount
/zfsmount/zfs
/zfsmount/zfs/.Trashes
/zfsmount/zfs/init
/zfsmount/zfs/init/00-cmdline
/zfsmount/zfs/init/30-auto-00
/zfsmount/zfs/zfs.so
/zfsmount/zfs/dev
/zfsmount/zfs/libzfs.so
/zfsmount/zfs/tools
/zfsmount/zfs/tools/mkfs.so
...

Spotlight immediately attacks the volume...

I tried importing as read-only earlier, but zfs seems to want to write on it, which is okay, as I can just back-up the image first.

thanks & cheers,
/r
--
You received this message because you are subscribed to the Google Groups "OSv Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nadav Har'El

unread,
Aug 18, 2015, 12:41:46 PM8/18/15
to Russ Tremain, Cyril Plisko, OSv Development
On Tue, Aug 18, 2015 at 7:31 PM, Russ Tremain <ru...@releasetools.org> wrote:
okay, this is *way* cool!

the "mount -a" didn't work, but "mount osv/zfs" did the trick:

bash-4.3# zfs mount -a
bash-4.3# zfs get mounted
NAME     PROPERTY  VALUE    SOURCE
osv      mounted   yes      -
osv/zfs  mounted   no       -
bash-4.3# zfs mount osv/zfs
bash-4.3# zfs get mounted
NAME     PROPERTY  VALUE    SOURCE
osv      mounted   yes      -
osv/zfs  mounted   yes      -
bash-4.3# find /zfsmount
/zfsmount
/zfsmount/zfs
/zfsmount/zfs/.Trashes
/zfsmount/zfs/init
/zfsmount/zfs/init/00-cmdline
/zfsmount/zfs/init/30-auto-00
/zfsmount/zfs/zfs.so
/zfsmount/zfs/dev
/zfsmount/zfs/libzfs.so
/zfsmount/zfs/tools
/zfsmount/zfs/tools/mkfs.so
...

Very nice. Too bad Linux distributions don't have such convenient zfs mounting options.


Spotlight immediately attacks the volume...

I tried importing as read-only earlier, but zfs seems to want to write on it, which is okay, as I can just back-up the image first.

Maybe you can use something like

 zfs set readonly=on ...

So it won't try to write. But I didn't actually try if it works.

If you make it readonly, how will OSX add its ".Trashes" directory? :-)


Russ Tremain

unread,
Aug 18, 2015, 1:46:00 PM8/18/15
to Nadav Har'El, Cyril Plisko, OSv Development
At 7:41 PM +0300 8/18/15, Nadav Har'El wrote:

[snip]
>
>Maybe you can use something like
>
> zfs set readonly=on ...
>
>So it won't try to write. But I didn't actually try if it works.
>
>If you make it readonly, how will OSX add its ".Trashes" directory? :-)
>

Exactly! Can't live without my Trashes! :-)

re: linux, what about http://zfsonlinux.org/debian.html for example?

OS X and ZFS go back a bit - Apple was supporting it for a while, and then they stopped. Nice to know that the fine folks on the OpenZFS project for OS X have revived it - it works on Mt. Lion (10.8.5) up to the latest releases (Yosemite/10.10.x).

cheers.
Reply all
Reply to author
Forward
0 new messages