1

A common practice is to use non-preallocated virtual disks.

Since they only grow as needed, it makes them perfect for fast backup, overallocation and creation speed.

Since file systems are usually based on physical disks they have the tendency to use the whole area available1 in order to increase the speed2 or reliability3.

I'm searching a filesystem that does the exact opposite : try to touch the minimum blocks need by an aggressive block reuse.

I would happily trade some performance for space usage.

There is already a similar question, but it is rather general. I have very specific goal : space-efficiency.

1. Like page caching uses all the free physical memory
2. Canonical example : online defragmentation
3. Canonical example : snapshotting

3
  • I would think that this approach (at least under vmware) would cause your redo logs to grow at a larger than normal rate
    – Jim B
    May 7 '10 at 17:28
  • Are you talking about the filesystem on the host or in the guest? May 7 '10 at 20:27
  • I'm talking about the guest filesystem (as the title implied) May 8 '10 at 7:15
1

If you don't mind being on the edge, you can do this with the new btrfs filesystem. The backup target device will occupy no more space than is used by the copied data.

https://btrfs.wiki.kernel.org/index.php/Main_Page

  1. Create a partition (using LVM logical volume or regular)
  2. Format: mkfs -t btrfs
  3. Mount it: mount -t btrfs /mnt/btrfs
  4. Create a brts sub-volume: btrfsctl -S home_template /mnt/btrfs
  5. Umount /mnt/btrfs and mount the subvol: mount -t btrfs -o subvol=home_template /mnt/template
  6. Populate /mnt/template with files/folders if needed in the backup target
  7. Make a snapshot of the home_template subvol for each user. This occupies 0 space until mounted and written to. btrfsctl -s /mnt/joeblow /mnt/template 8 Mount the snapshot as needed and let the backups begin: mount -t btrfs -o subvol=joeblow /mnt/backup
1
  • Is it for the guest fs also ? May 15 '10 at 7:13
-1

you can also use LVM volumes, adding PVs as necessary to a VG in order to grow it, and using lvextend to grow LVs dedicated to VMs

4
  • But none of those is a filesystem. May 6 '10 at 11:47
  • That's why the word "also" is used. This approach allows better grained space management. The actual FS is in the VM anyway, not necessarily on the host
    – dyasny
    May 6 '10 at 12:32
  • the main purpose of the grow-as-needed is specifically to avoid this kind of space micro-management. May 6 '10 at 17:04
  • actually, vdsm does exactly that - lvextend as required.
    – dyasny
    May 6 '10 at 18:59

Not the answer you're looking for? Browse other questions tagged or ask your own question.