Suggestion for Handbook

Benjamin Kaduk kaduk at MIT.EDU
Sat Jan 7 05:17:49 UTC 2012


On Thu, 5 Jan 2012, Adam Vande More wrote:

> This page contain info on creating a disk image:
>
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/disks-virtual.html
>
> Of course the dd method works, but it might be better to use truncate(1)
> instead of dd because it creates sparse files and is nearly as universal as
> dd.
>
> E.g. "truncate -s 5k file.img"

I think dd would be preferred precisely because it does not use sparse 
files -- all blocks for the image will be allocated.

If a sparse file was used, and the physical disk became close to full, 
then when the system goes to make a write to the image and the backing 
file cannot be grown, things are unlikely to fail gracefully.

-Ben Kaduk



More information about the freebsd-doc mailing list