dd vs. truncate for creating vkernel root images

Nuno Antunes nuno.antunes at gmail.com
Wed Apr 11 16:46:36 PDT 2007


Forgot to copy to users at ...

On 4/12/07, Nuno Antunes <nuno.antunes at gmail.com> wrote:
On 4/12/07, Nuno Antunes <nuno.antunes at gmail.com> wrote:
> On 4/12/07, Justin C. Sherrill <justin at 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





More information about the Users mailing list