Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jul 2010 22:51:12 -0400
From:      Dan Langille <dan@langille.org>
To:        Daniel O'Connor <doconnor@gsoft.com.au>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Using GTP and glabel for ZFS arrays
Message-ID:  <4C4A5520.7060209@langille.org>
In-Reply-To: <D9C98D21-E43E-4747-8D39-71A195B6C8C6@gsoft.com.au>
References:  <4C47B57F.5020309@langille.org> <4C48E695.6030602@langille.org>	<718046944.20100723032259@nitronet.pl>	<4C4A42D5.7080805@langille.org>	<AANLkTi=fMR1pQj11qCqMWwCM9nsovsm_PVh7%2BJeWF0ED@mail.gmail.com> <D9C98D21-E43E-4747-8D39-71A195B6C8C6@gsoft.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
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


-- 
Dan Langille - http://langille.org/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C4A5520.7060209>