Hi, I''m wondering if it''s possible to import a zpool on an iscsi-device LOCALLY. Following scenario: HostA (Sol10u4): - Pool-1 (a striped-raidz-pool) - iscsi-zvol on Pool-1 HostB (Sol10u3): - Pool-2 is a Mirror of one local device and the iscsi-vol of HostA Is ist possible to mount the iscsi-vol (or import Pool-2) on HostA? I know, this is (also) iSCSI-related, but mostly a ZFS-question. Thanks for your answers, Jan Dreyer
Jan,> I''m wondering if it''s possible to import a zpool on an iscsi-device > LOCALLY. > > Following scenario: > > HostA (Sol10u4): > - Pool-1 (a striped-raidz-pool) > - iscsi-zvol on Pool-1 > > HostB (Sol10u3): > - Pool-2 is a Mirror of one local device and the iscsi-vol of HostA > > Is ist possible to mount the iscsi-vol (or import Pool-2) on HostA?No, due to a common misconception in the iSCSI space, spanning an iSCSI Target''s backing store, to the resulting LUN as seen by iSCSI Initiators. On HostA, the ZVOL called iscsi-zvol has a volume size, a size specified in the "zfs create -V <size> Pool-1/iscsi-zvol". When an iSCSI Target is created out of this ZVOL, then the iSCSI Initiator discovers and enables this LUN on HostB, but this LUN is unformatted. In other words, this LUN does not contain a Solaris VTOC or an Intel EFI disk label, as its just a bunch of blocks. When issuing the "zpool create Pool-2 mirror <local-disk> <iscsi-vol>", an Intel EFI disk label is placed on the disk (consuming some of the blocks), then all the remaining space is placed in partition (or slice 0), after which ZFS lays down its filesystem metadata in the space occupied by partition 0. Now back on HostA, the ZVOL ( /dev/zvol/rdsk/Pool-1/iscsi-zvol ) looks like a bunch of blocks. Since this is a ZVOL, not a SCSI or iSCSI LUN, Solaris does not see the Intel EFI disk label, thus ZFS will not be able to see the ZFS filesystem metadata. So even though the ZVOL contains all the right data, from the point of view of Solaris, this disk is not a LUN, and thus can not be accessed as such. Jim> > > I know, this is (also) iSCSI-related, but mostly a ZFS-question. > > Thanks for your answers, > Jan Dreyer > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discussJim Dunham Storage Platform Software Group Sun Microsystems, Inc. wk: 781.442.4042 http://blogs.sun.com/avs http://www.opensolaris.org/os/project/avs/ http://www.opensolaris.org/os/project/iscsitgt/ http://www.opensolaris.org/os/community/storage/
After posting my reply to the initial note on this thread, and then reading it again, I have some followup comments: The following statement should have said " ... this ZVOL in not a LUN, ....".> > So even though the ZVOL contains all the right data, from the point of > view of Solaris, this disk is not a LUN, and thus can not be accessed > as such.But then could it be? On HostA, where the ZVOL (iscsi-zvol) is served out as an iSCSI Target, there is nothing to prevent the iSCSI Initiator on HostA to discover the iSCSI Target on its own node. Doing so it will create an iSCSI LUN, which will be seen by Solaris. This is an example of iSCSI loopback, which works quite well. This raises a key point that that you should be aware of. ZFS does not support shared access to the same ZFS filesystem. If the ZFS storage pool Pool-2, is currently imported on HostB, an attempt to zpool import the iSCSI LUN on HostA, ZFS will report that this ZPOOL is being access on another host, which it is, HostB. Do not try to force a zpool import of this iSCSI LUN, or a Solaris panic will soon follow. (See key point above). If the ZFS storage pool Pool-2 is currently exported on HostB, an attempt to zpool import the iSCSI LUN on HostA will work, except that now 1/2 of the mirrored zpool will not be accessible, since its a local device on HostB, and therefore not accessible. Maybe the local device on HostB should also be an iSCSI Target too. One more thing. ZFS and iSCSI start and stop at different times during Solaris boot and shutdown, so I would recommend using legacy mount points, or manual zpool import / exports when trying configurations at this level. Jim Dunham Storage Platform Software Group Sun Microsystems, Inc. wk: 781.442.4042 http://blogs.sun.com/avs http://www.opensolaris.org/os/project/avs/ http://www.opensolaris.org/os/project/iscsitgt/ http://www.opensolaris.org/os/community/storage/
Jim Dunham wrote:> > This raises a key point that that you should be aware of. ZFS does not > support shared access to the same ZFS filesystem..... unless you put NFS or something on top of it. (I always forget that part myself.)