DragonFly users List (threaded) for 2007-04
DragonFly BSD
DragonFly users List (threaded) for 2007-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: dd vs. truncate for creating vkernel root images


From: "Nuno Antunes" <nuno.antunes@xxxxxxxxx>
Date: Thu, 12 Apr 2007 00:43:25 +0100

Forgot to copy to users@...

On 4/12/07, Nuno Antunes <nuno.antunes@gmail.com> wrote:
On 4/12/07, Nuno Antunes <nuno.antunes@gmail.com> wrote:
> On 4/12/07, Justin C. Sherrill <justin@shiningsilence.com> wrote:
> > On Wed, April 11, 2007 6:00 pm, Nuno Antunes wrote:
> > > Hi all,
> > >
> > > Is there any advantage in using
> > > 'dd if=/dev/zero of=/var/vkernel/rootimg.01 bs=1m count=2048'
> > > over the much quicker
> > > 'truncate -s 2G /var/vkernel/rootimg.01'
> > > other than getting a root image filled with zeros?
> >
> > Have you tried it?  What happened?
> >
> >
>
> Yes I have, and it works. Vkernels can use a root image created this
> way. So does it mean that the file will grow on demand (up to the
> established size, of course)?
>
> Thanks,
> Nuno
>

Here are my image sizes:

whitewidow# ll -h /var/vkernel/devel.rootimg.01
-rw-rw-r--  1 root  wheel   512M Apr 12 00:32 /var/vkernel/devel.rootimg.01
whitewidow# du -sh /var/vkernel/devel.rootimg.01
339M    /var/vkernel/devel.rootimg.01

And inside the vkernel:
# df -h
Filesystem   Size   Used  Avail Capacity  Mounted on
/dev/vkd0a   496M   186M   270M    41%    /

Cheers,
Nuno




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]