From owner-freebsd-fs@FreeBSD.ORG Sat Nov 26 07:26:26 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18F16106566C for ; Sat, 26 Nov 2011 07:26:26 +0000 (UTC) (envelope-from joh.hendriks@gmail.com) Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mx1.freebsd.org (Postfix) with ESMTP id 76AA18FC28 for ; Sat, 26 Nov 2011 07:26:25 +0000 (UTC) Received: by wwo28 with SMTP id 28so3645870wwo.1 for ; Fri, 25 Nov 2011 23:26:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=/53/Sn0EmeYFabJxyDYMWPjF27pGWvacBOWnccNVRcU=; b=NtoAGHraagkCTCcGdxjkqWyb8UcOnqOQqqbVZDWrmZ3bi2J1csao2ofJHJSV8LVnB1 S/UfWyKvE14s39ZDY6ak6GHWQq3DdKvPleKoP7RT+DktBROyHYzmg+T+uDqXmZZvndSr P1+30fGjB2wo+D+Iauk90Gtj5IbhqumBe50MM= Received: by 10.180.91.8 with SMTP id ca8mr36935090wib.22.1322292384513; Fri, 25 Nov 2011 23:26:24 -0800 (PST) Received: from [192.168.1.11] (5ED0E470.cm-7-1d.dynamic.ziggo.nl. [94.208.228.112]) by mx.google.com with ESMTPS id em4sm30545057wbb.20.2011.11.25.23.26.23 (version=SSLv3 cipher=OTHER); Fri, 25 Nov 2011 23:26:24 -0800 (PST) Message-ID: <4ED0949A.8080602@gmail.com> Date: Sat, 26 Nov 2011 08:26:18 +0100 From: Johan Hendriks User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: zvol and zfs send no file on the receiving side. X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2011 07:26:26 -0000 Hello all! After some reluctance using zfs i decided it was time to just use it, and it make my life a lot easier. Thank you all ! One thing i can not get to work however is sending and receiving a zfs volume. I have a master so to say, and a bacup server. On the master the pool is named storage, on the backup machine the pool is called tank. on the master i did the following. # zfs create -V10G storage/iscsitest if i do a zfs list -t volume, i see that the volume is there. # zfs list -t volume NAME USED AVAIL REFER MOUNTPOINT storage/iscsitest 10.3G 65.9G 16K - If i go to the directory /storage and do a ls -al i see my zvol file. # ls -al total 1901416 drwxr-xr-x 4 root wheel 5 Nov 25 17:44 . drwxr-xr-x 19 root wheel 1024 Nov 25 11:33 .. -rw-r--r-- 1 root wheel 10737418240 Nov 25 20:46 iscsitest Ok all is fine, i can create a scsi target pointing to storage/iscsitest, and it works, and i use a esxi host to mount it. I did put a virtual machine on it so i have some data in the zvol. Works great. Now i want to make a backup of that zvol so i can create a kind of cold standby server. This way when the master dies for what ever reason, my zvols are on another server as a backup, but if things really get troublesome i can share them as iscsi target! So on the master i create a snapshot of my zvol. #zfs snapshot storage/iscsitest@snap1 Check with zfs list -t snapshot to see if i have a snapshot. #zfs list -t snapshot NAME USED AVAIL REFER MOUNTPOINT storage/iscsitest@snap1 0 - 16K - Well there it is. now i send that zvol to my backup server. So the following command should do it. # zfs send -R storage/iscsitest@snap1 | ssh root@192.168.50.200 zfs recv -v tank/iscsitest Password: mypasss receiving full stream of storage/iscsitest@snap1 into tank/iscsitest@snap1 received 3.85KB stream in 1 seconds (3.85KB/sec) on my backup server, i now have the following #zfs list NAME USED AVAIL REFER MOUNTPOINT tank 159G 427G 31K /tank tank/iscsitest 10.3G 438G 16K - tank/share 149G 427G 136G /mnt Ok that looks fine, lets see if i have some snapshots here. #zfs list -t snapshot NAME USED AVAIL REFER MOUNTPOINT tank/iscsitest@snap1 0 - 16K - Ok that looks good. Let see if there is a volume # zfs list -t volume NAME USED AVAIL REFER MOUNTPOINT tank/iscsitest 10.3G 438G 16K - Well all looks good, now lets look at the file so i can share this over iscsi. cd /tank #ls -al total 4 drwxr-xr-x 2 root wheel 2 Nov 25 21:45 ./ drwxr-xr-x 22 root wheel 512 Nov 25 21:54 ../ Where is my file??? I am trying to get this done for a long time now, and i can not get it to work!! i did do a export / import, but no file! Also tried doing a rollback on the backup server. Also a local backup does not work. # zfs send -R storage/iscsitest@snap1 | zfs recv -v storage/iscsitest-bck receiving full stream of storage/iscsitest@snap1 into storage/iscsitest-bck@snap1 received 3.85KB stream in 1 seconds (3.85KB/sec) # zfs list NAME USED AVAIL REFER MOUNTPOINT storage 411G 45.3G 1.81G /storage storage/iscsitest 10.3G 55.6G 16K - storage/iscsitest-bck 10.3G 55.6G 16K - # zfs list -t volume NAME USED AVAIL REFER MOUNTPOINT storage/iscsitest 10.3G 55.6G 16K - storage/iscsitest-bck 10.3G 55.6G 16K - # zfs list NAME USED AVAIL REFER MOUNTPOINT storage/iscsitest 10.3G 55.6G 16K - storage/iscsitest-bck 10.3G 55.6G 16K - # ls -al total 1901416 drwxr-xr-x 4 root wheel 5 Nov 25 17:44 . drwxr-xr-x 19 root wheel 1024 Nov 25 11:33 .. -rw-r--r-- 1 root wheel 10737418240 Nov 25 20:46 iscsitest So again no file iscsitest-bck What am i missing.! This is on FreeBSD 9.0 RC2 AMD64 Thanks again for the wonderful work on ZFS. regards Johan