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: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 11 Apr 2007 21:20:17 -0700 (PDT)

: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?
:
:Thanks,
:Nuno

    It's not a good idea to use truncate.  The problem is that no actual
    disk space is reserved for the image file when you just truncate it to
    the desired size.  Blocks on disk are then allocated on the fly, as
    the vkernel is running, and thus can wind up being severely fragmented
    on disk.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



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