From owner-freebsd-fs@freebsd.org Mon Jul 31 12:10:07 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94008DAB211 for ; Mon, 31 Jul 2017 12:10:07 +0000 (UTC) (envelope-from kayasaman@gmail.com) Received: from mail-wr0-x234.google.com (mail-wr0-x234.google.com [IPv6:2a00:1450:400c:c0c::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F2F774AD9 for ; Mon, 31 Jul 2017 12:10:07 +0000 (UTC) (envelope-from kayasaman@gmail.com) Received: by mail-wr0-x234.google.com with SMTP id k71so124766551wrc.2 for ; Mon, 31 Jul 2017 05:10:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=KaJ/vISiXoeOT6RA00SwLuDtfDq2FA4ALAw0nJivaq8=; b=gm/gKbLly9vgS8r9Txw29o0r8A/GwUpxOUu5/XOua6U22+CZkFCI34JPlbPCd/Z5p+ yQrZprfiMkFkLWUT5EmgKhplXGSj8ofbgsp/ZOb7H4iVegUWrCfMyjlg4OdwK3pC0ZzS xmGjWaSegZfcmoNpGzmvCsdoC9qpkKuZHrdgLDkpRcW9l0EDDPNYv/3j8gCcd4qKVp7h TkSSnTZMrn6riOPLF9W8xhWi1OaW8/nnDpD+Vk4w0baM9t3ErylpK/uosmLm1HYmRr25 SpaO9CF8zF6qq983ehCXUGoBv85PKk++4P/gENxn2CCL+9f8lHPkD1MLTyT5G1eapEIC nzqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=KaJ/vISiXoeOT6RA00SwLuDtfDq2FA4ALAw0nJivaq8=; b=f4vYMC/rMssLOuqte1udq+LLM4MLc0GLm6nF6cuwzBNjctYZgWR89gm0GSK3P2qmdY jHl0aDcoU+5wo3cvN7dYvIjLvS7FLp3/1K5dndlWsGZ6vhIqjEIps0Rlf6diw0N/Jmjq YWYngz+RmNxX7iWGhVQIh4it5HSqS+QvpV/txe2VW6sfQSVsZyAKZxZzCYLEMNW5BNQp fNlVPQnLCo5hWZDqind42hSKzoWncqidf1tM/K+jKTHMvjm/IwSYphHldGjnVt5p9ddL L9Q3B5ByFPC/9eFWVdkGYxSBKgGUgClenUgKCJtcsP3KaitAEvQY/CxYto3yw2X1tiQD YIsg== X-Gm-Message-State: AIVw113L/BW3vPAL/AAWjgOkWnzuIzYsHNcIf4lfIk5ashNbj2sMcZLK MmppINlDvhrn64RheSE= X-Received: by 10.223.165.129 with SMTP id g1mr11348218wrc.167.1501503004037; Mon, 31 Jul 2017 05:10:04 -0700 (PDT) Received: from x220.optiplex-networks.com (optiplexnetworks.plus.com. [212.159.80.17]) by smtp.gmail.com with ESMTPSA id r128sm582328wmb.27.2017.07.31.05.10.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 31 Jul 2017 05:10:02 -0700 (PDT) Subject: Re: ZFS and ISCSI question To: freebsd-fs@freebsd.org References: <0f4905d2-6567-a83c-45f8-435c7c987d5b@gmail.com> <27221f18-07d7-64c6-289a-81e839b10d67@norma.perm.ru> From: Kaya Saman Message-ID: Date: Mon, 31 Jul 2017 13:10:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <27221f18-07d7-64c6-289a-81e839b10d67@norma.perm.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 12:10:07 -0000 On 07/31/2017 11:05 AM, Eugene M. Zheganin wrote: > Hi. > > On 30.07.2017 17:19, Kaya Saman wrote: >> >> >> I understand that iscsi works at the "block device" level but how >> would one go about using ZFS on the initiator? >> >> The standard ZFS commands can be run: >> >> zpool followed by zfs FS-set on the Initiator machine >> >> however, it doesn't seem right to first create a ZFS pool on the >> Target system then create another one on the same pool on the Initiator. >> >> >> >> Would zpool import/export work or does something else need to be done >> to get the Initiator to create a ZFS data set? > Zvol is a block device indeed, but, even it is an entity from a parent > zfs pool, it doesn't contain any filesystem, including zfs. Thus the > kernel won't see anything. So you have to create a zpool first with > 'zpool create'. > > Eugene. > _______________________________________________ > freebsd-fs@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" Hmm.... basically what I am trying to acheive is to be able to create a zpool and zfs file system on the Initiator system. Of course on the Target one could run: zpool create pool_1 zfs -V pool_1/zvol and on the Initiator: zpool create pool zfs create pool/fs-set but would that be recommended as one would be using 2x zpools on the same "device list"? As an alternative I have tried something like this: /etc/ctl.conf portal-group pg0 { discovery-auth-group no-authentication listen 0.0.0.0 listen [::] } target iqn.2012-06.com.example:target0 { auth-group no-authentication portal-group pg0 lun 0 { # path /dev/zvol/iscsi-tst/tank # size 900M path /data/disk1 size 200M } lun 1 { path /data/disk2 size 200M } # lun 2 { # path /data/disk3 # size 500M # } # lun 3 { # path /data/disk4 # size 500M # } } target iqn.2012-06.com.example:target1 { auth-group no-authentication portal-group pg0 lun 2 { path /data/disk3 size 500M } lun 3 { path /data/disk4 size 500M } } Then on Initiator: # iscsictl -L Target name Target portal State iqn.2012-06.com.example:target0 Connected: da24 da25 iqn.2012-06.com.example:target1 Connected: da26 da27 so then the zpool becomes: iscsi-tst 672M 936K 671M - 0% 0% 1.00x ONLINE - # zpool status iscsi-tst pool: iscsi-tst state: ONLINE status: One or more devices are configured to use a non-native block size. Expect reduced performance. action: Replace affected devices with devices that support the configured block size, or migrate data to a properly configured pool. scan: none requested config: NAME STATE READ WRITE CKSUM iscsi-tst ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 da24 ONLINE 0 0 0 block size: 8192B configured, 16384B native da25 ONLINE 0 0 0 block size: 8192B configured, 16384B native mirror-1 ONLINE 0 0 0 da26 ONLINE 0 0 0 block size: 8192B configured, 16384B native da27 ONLINE 0 0 0 block size: 8192B configured, 16384B native errors: No known data errors Then zfs dataset: # zfs list iscsi-tst NAME USED AVAIL REFER MOUNTPOINT iscsi-tst 816K 639M 192K /iscsi-tst # zfs list iscsi-tst/tank NAME USED AVAIL REFER MOUNTPOINT iscsi-tst/tank 192K 639M 192K /iscsi-tst/tank So for best redundancy like "hot swap" etc... what would be the best solution or is there an ISCSI "Best Practice" to not get totally burned if something goes wrong with an iscsi attached drive? <-- taking backups of data excluded of course :-) Regards, Kaya