From owner-freebsd-stable@FreeBSD.ORG Sat Jul 24 03:03:16 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB5CB1065673 for ; Sat, 24 Jul 2010 03:03:16 +0000 (UTC) (envelope-from dan@langille.org) Received: from nyi.unixathome.org (nyi.unixathome.org [64.147.113.42]) by mx1.freebsd.org (Postfix) with ESMTP id BD4608FC22 for ; Sat, 24 Jul 2010 03:03:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by nyi.unixathome.org (Postfix) with ESMTP id DE5845093D; Sat, 24 Jul 2010 04:03:15 +0100 (BST) X-Virus-Scanned: amavisd-new at unixathome.org Received: from nyi.unixathome.org ([127.0.0.1]) by localhost (nyi.unixathome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pvpaAZWz9mJh; Sat, 24 Jul 2010 04:03:15 +0100 (BST) Received: from smtp-auth.unixathome.org (smtp-auth.unixathome.org [10.4.7.7]) (Authenticated sender: hidden) by nyi.unixathome.org (Postfix) with ESMTPSA id 263DF5089E ; Sat, 24 Jul 2010 04:03:15 +0100 (BST) Message-ID: <4C4A57E9.7070108@langille.org> Date: Fri, 23 Jul 2010 23:03:05 -0400 From: Dan Langille Organization: The FreeBSD Diary User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1 MIME-Version: 1.0 To: Daniel O'Connor References: <4C47B57F.5020309@langille.org> <4C48E695.6030602@langille.org> <718046944.20100723032259@nitronet.pl> <4C4A42D5.7080805@langille.org> <4C4A5520.7060209@langille.org> In-Reply-To: <4C4A5520.7060209@langille.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org Subject: Re: Using GTP and glabel for ZFS arrays X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 03:03:17 -0000 On 7/23/2010 10:51 PM, Dan Langille wrote: > On 7/23/2010 10:42 PM, Daniel O'Connor wrote: >> >> On 24/07/2010, at 11:55, Freddie Cash wrote: >>> It's theoretical as I have not investigated how to create sparse >>> files on FreeBSD, nor have I done this. It's based on several >>> posts to the zfs-discuss mailing list where several people have >>> done this on OpenSolaris. >> >> FYI you would do.. truncate -s 1T /tmp/fake-disk1 mdconfig -a -t >> vnode -f /tmp/fake-disk1 >> >> etc.. >> >> Although you'd want to determine the exact size of your real disks >> from geom and use that. > > > $ dd if=/dev/zero of=/tmp/sparsefile1.img bs=1 count=0 oseek=2000G > 0+0 records in 0+0 records out 0 bytes transferred in 0.000025 secs > (0 bytes/sec) > > $ ls -l /tmp/sparsefile1.img -rw-r--r-- 1 dan wheel 2147483648000 > Jul 23 22:49 /tmp/sparsefile1.img > > $ ls -lh /tmp/sparsefile1.img -rw-r--r-- 1 dan wheel 2.0T Jul 23 > 22:49 /tmp/sparsefile1.img Going a bit further, and actually putting 30MB of data in there: $ rm sparsefile1.img $ dd if=/dev/zero of=/tmp/sparsefile1.img bs=1 count=0 oseek=2000G 0+0 records in 0+0 records out 0 bytes transferred in 0.000030 secs (0 bytes/sec) $ ls -lh /tmp/sparsefile1.img -rw-r--r-- 1 dan wheel 2.0T Jul 23 22:59 /tmp/sparsefile1.img $ dd if=/dev/zero of=sparsefile1.img bs=1M count=30 conv=notrunc 30+0 records in 30+0 records out 31457280 bytes transferred in 0.396570 secs (79323405 bytes/sec) $ ls -l sparsefile1.img -rw-r--r-- 1 dan wheel 2147483648000 Jul 23 23:00 sparsefile1.img $ ls -lh sparsefile1.img -rw-r--r-- 1 dan wheel 2.0T Jul 23 23:00 sparsefile1.img $ -- Dan Langille - http://langille.org/