fish: New command 'sparse', like 'alloc' but to generate sparse files.
authorRichard Jones <rjones@redhat.com>
Wed, 4 Nov 2009 17:42:03 +0000 (17:42 +0000)
committerRichard Jones <rjones@redhat.com>
Wed, 4 Nov 2009 17:42:03 +0000 (17:42 +0000)
commit5ce72e039ca332ba19bb9122b7c93d257e745bb5
treeac68578590f834bda390b1fded7f6255321e2acb
parentfc2cce06ec537f3e6ddf153ffae389ab483e3809
fish: New command 'sparse', like 'alloc' but to generate sparse files.

With sparse you can make sparse files, which is fun because you
can experiment with really large devices:

  ><fs> sparse /tmp/test.img 100G
  ><fs> run
  ><fs> sfdiskM /dev/vda ,
  ><fs> mkfs ext2 /dev/vda1    # very long pause here ...
  ><fs> mount /dev/vda1 /

To see the real (ie. allocated) size of the sparse file, use the du
command, eg:

  ><fs> !du -h /tmp/test.img
  1.6G -rw-rw-r-- 1 rjones rjones 100G 2009-11-04 17:40 /tmp/test.img
fish/alloc.c
fish/fish.c
fish/fish.h
guestfish.pod