Skip to content

Overprovisioning

Adam Schwalm edited this page Sep 3, 2018 · 1 revision

This page describes how storage is allocated for virtual drives on the SD card. In general, 'overprovisioning' is used to refer to the pISO's ability to create more virtual storage space than there is physical storage space. This is what enables a user to create multiple virtual drives that are all as large as the SD card. The capability is provided by the linux Logical Volume Manager (LVM). This same system is what enables the 'snapshot' system as well.

When it is first setup, the pISO will create a single 'pool' of storage. This pool will be as large as the SD card (minus about 70MB for the pISO OS). All virtual drives and snapshots occupy parts of this pool. However, physical storage is only required when data is written to the virtual drive. So the user can create hundreds of large drives, so long as they are not all actually full of data. In fact, the user can create virtual drives that are larger than the physical drive (though the pISO does not allow this, because it is not a useful thing to do).

One thing to remember here is that LVM is not aware of files. It operates at a 'block' level, so it is only aware when bytes on the virtual drive have changed. It has no way of knowing when a 'file' has been removed. This is useful, because it means that the user can format a virtual drive however they like without it interfering with the pISO. However, it can also lead to situations where the 'used' space for a drive keeps growing even when files are deleted. This happens because 'deleting' a file is actually just changing bytes on the disk, and because LVM is not aware of things at a 'file' level, it cannot see that there is now space available. Future versions of the pISO OS should help avoid this problem.