Date: Fri, 23 Jul 2010 23:03:05 -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: <4C4A57E9.7070108@langille.org> In-Reply-To: <4C4A5520.7060209@langille.org> 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> <4C4A5520.7060209@langille.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C4A57E9.7070108>