DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 25th January 2010
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default Mount OpenSolaris ZFS on FreeBSD

I have two disks, one with OpenSolaris (5.11 snv_111b) installed, the other with FreeBSD 8.0-RELEASE.

I'd like to mount the OpenSolaris ZFS drive (/dev/ad0) on FreeBSD, I've tried various things with zpool import, zpool add, and zpool attach. But none seem to work.

If anyone with more (i.e. any) experience with ZFS and/or ZFS OpenSolaris/FreeBSD has anything useful to say on the subject, then it would be much appreciated

On my OpenSolaris system:

Code:
[~]% zpool list                                              
NAME    SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
rpool    74G  25.4G  48.6G    34%  ONLINE  -
Code:
[~]% zfs list      
NAME                       USED  AVAIL  REFER  MOUNTPOINT
rpool                     27.3G  45.6G    79K  /rpool
rpool/ROOT                7.63G  45.6G    19K  legacy
rpool/ROOT/opensolaris    7.63G  45.6G  7.48G  /
rpool/dump                1.96G  45.6G  1.96G  -
rpool/export              15.7G  45.6G    21K  /export
rpool/export/home         15.7G  45.6G    21K  /export/home
rpool/export/home/martin  15.7G  45.6G  15.7G  /export/home/martin
rpool/swap                1.96G  47.4G   101M  -
Code:
[~]% mount     
/ on rpool/ROOT/opensolaris read/write/setuid/devices/dev=2d90002 on Thu Jan  1 01:00:00 1970
/devices on /devices read/write/setuid/devices/dev=4b00000 on Tue Jan 26 00:41:06 2010
/dev on /dev read/write/setuid/devices/dev=4b40000 on Tue Jan 26 00:41:06 2010
/system/contract on ctfs read/write/setuid/devices/dev=4bc0001 on Tue Jan 26 00:41:06 2010
/proc on proc read/write/setuid/devices/dev=4c00000 on Tue Jan 26 00:41:06 2010
/etc/mnttab on mnttab read/write/setuid/devices/dev=4c40001 on Tue Jan 26 00:41:06 2010
/etc/svc/volatile on swap read/write/setuid/devices/xattr/dev=4c80001 on Tue Jan 26 00:41:06 2010
/system/object on objfs read/write/setuid/devices/dev=4cc0001 on Tue Jan 26 00:41:06 2010
/etc/dfs/sharetab on sharefs read/write/setuid/devices/dev=4d00001 on Tue Jan 26 00:41:06 2010
/lib/libc.so.1 on /usr/lib/libc/libc_hwcap1.so.1 read/write/setuid/devices/dev=2d90002 on Tue Jan 26 00:41:18 2010
/dev/fd on fd read/write/setuid/devices/dev=4e00001 on Tue Jan 26 00:41:25 2010
/tmp on swap read/write/setuid/devices/xattr/dev=4c80002 on Tue Jan 26 00:41:25 2010
/var/run on swap read/write/setuid/devices/xattr/dev=4c80003 on Tue Jan 26 00:41:25 2010
/export on rpool/export read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=2d90006 on Tue Jan 26 00:41:29 2010
/export/home on rpool/export/home read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=2d90007 on Tue Jan 26 00:41:29 2010
/export/home/martin on rpool/export/home/martin read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=2d90008 on Tue Jan 26 00:41:29 2010
/rpool on rpool read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=2d90009 on Tue Jan 26 00:41:29 2010
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #2   (View Single Post)  
Old 25th January 2010
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,056
Default

Quote:
Originally Posted by Carpetsmoker View Post
I have two disks, one with OpenSolaris (5.11 snv_111b) installed, the other with FreeBSD 8.0-RELEASE.
FreeBSD 8.0-RELEASE uses ZFS version 13, while OpenSolaris build 111 uses ZFS version 14, you will be able to import FreeBSD's zpool on OpenSolaris, but not in the other direction.

ZFS version in near OpenSolaris builds:
http://hub.opensolaris.org/bin/view/...y+Group+zfs/13 (from build 98)
http://hub.opensolaris.org/bin/view/...y+Group+zfs/14 (from build 103)
http://hub.opensolaris.org/bin/view/...y+Group+zfs/15 (from build 114)

There are some works to get ZFS version 14 in 8-STAbBLE/9-CURRENT, maybe you will be albe to import it after upgrade to that bleeding edge.

Use zpool upgrade command to get info which zpool version you have:

freebsd 8.0 % zpool upgrade
This system is currently running ZFS pool version 13.

All pools are formatted using this version.
__________________
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd
Reply With Quote
  #3   (View Single Post)  
Old 26th January 2010
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 696
Default

8-STABLE, as of a week or so ago, includes ZFSv14 support.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
  #4   (View Single Post)  
Old 27th January 2010
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

Thanks!

Just upgraded to 8-STABLE:
Code:
FreeBSD thinkpad 8.0-STABLE FreeBSD 8.0-STABLE #0: Wed Jan 27 22:16:43 UTC 2010     carpetsmoker@thinkpad:/usr/src/obj/usr/src/sys/GENERIC  i386

[~]# zpool upgrade
This system is currently running ZFS pool version 14.

All pools are formatted using this version.
When I try to import:
Code:
[~]# zpool import -d /dev/  
Exit 1
Nice error message ... :-/

To be honest, it's not 100% clear to me which commands to use (import/add/attach/...?) From what I could find on the interwebz the above zpool import -d /dev/ command should work ...
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #5   (View Single Post)  
Old 29th January 2010
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 696
Default

"zpool list" should show the pools available for import. Same with "zpool import" by itself.

If you know the name of the pool, just "zpool import <poolname>". And you can try with -f as well.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
  #6   (View Single Post)  
Old 31st January 2010
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

That doesn't seem to work ...

I created two FreeBSD 8 VM's, attached a second virtual disk to the first VM and make did a "zpool create/zfs create" on it, after shutting down and starting the second FreeBSD 8 VM I could use the import/list commands as one would expect ...

Maybe there is some incompatibility between "OpenSolaris ZFS" and "FreeBSD ZFS"? If I have more time I'll try creating a osol VM so I can toy around with that ...
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #7   (View Single Post)  
Old 1st February 2010
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 696
Default

Hrm ... two possibilities:

* the O/Sol zpool version is greater than the FreeBSD zpool command supports (I believe I saw something that O/Sol was moving to ZFSv15), in which case you are SoL until a newer ZFS version is imported to FreeBSD

* the O/Sol pool uses a different GPT format that FreeBSD's gpart/glabel can't read correctly. I've read reports online where pools created in O/Sol were not importable in FreeBSD, but the inverse was possible (create pool under FreeBSD, fill with data in O/Sol, re-import into FreeBSD).
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
7 day with OpenSolaris gkontos Solaris 3 2nd December 2009 03:32 PM
what is real different between solaris and opensolaris mfaridi Solaris 11 3rd August 2008 02:52 PM
where all packages OpenSolaris whispersGhost Solaris 15 11th June 2008 09:55 AM
Xfce on OpenSolaris aleunix Solaris 0 4th June 2008 06:23 AM
Help me boot OpenSolaris again! Nobber Solaris 2 14th May 2008 10:49 PM


All times are GMT. The time now is 06:37 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick