[Users] *SAN LUNs* thin-provisioning : Reclaiming block device storage

[This post is *not* about *VM* thin-provisioning] Hi, Our setup is made of an Equalogic SAN (PS6100) connected via a dedicated iSCSI network, an oVirt 3.3.0-4.el6 manager and CentOS nodes. This is working fine (thank you all). I usually create a LUN for the master storage domain, configure in thin-provisioned mode on the SAN side, and fill it with VMs until it reaches some 90%. Then I create another LUN the same way, add it as an additional storage domain, move some VM on it from the first domain and it's OK. The issue there is I have no mean to reclaim any freed storage on the master storage LUN. So the question (not *master* domain specific - any storage domain is concerned) is how to reclaim space on these domains. I began to have a closer look at how a storage domain is setup (PV, VG, LVs). I also found some hints about some mount option (unmap) that could be passed when mounting ext4 filesystems. But I guess the issue is way more complex, as LVM may add a layer between ext4 and the block device. How is the LVM setup working? I saw there was one LV by disk (and some metadata LVs), in one big VG in one big PV. Is the entire disk space allocated for the PV, or is only a partial of it is used first, then an extension (growing) is made each time some more space is needed by adding VMs? I have the opportunity to test and play with a test LUN in a test oVirt, so I fear no crash. If the only answer is "Unavailable feature", it's ok, but I just have to know. -- Nicolas Ecarnot

On 11/05/2013 09:49 AM, Nicolas Ecarnot wrote:
[This post is *not* about *VM* thin-provisioning]
Hi,
Our setup is made of an Equalogic SAN (PS6100) connected via a dedicated iSCSI network, an oVirt 3.3.0-4.el6 manager and CentOS nodes. This is working fine (thank you all).
I usually create a LUN for the master storage domain, configure in thin-provisioned mode on the SAN side, and fill it with VMs until it reaches some 90%. Then I create another LUN the same way, add it as an additional storage domain, move some VM on it from the first domain and it's OK.
The issue there is I have no mean to reclaim any freed storage on the master storage LUN. So the question (not *master* domain specific - any storage domain is concerned) is how to reclaim space on these domains.
I began to have a closer look at how a storage domain is setup (PV, VG, LVs). I also found some hints about some mount option (unmap) that could be passed when mounting ext4 filesystems. But I guess the issue is way more complex, as LVM may add a layer between ext4 and the block device. How is the LVM setup working? I saw there was one LV by disk (and some metadata LVs), in one big VG in one big PV. Is the entire disk space allocated for the PV, or is only a partial of it is used first, then an extension (growing) is made each time some more space is needed by adding VMs?
I have the opportunity to test and play with a test LUN in a test oVirt, so I fear no crash. If the only answer is "Unavailable feature", it's ok, but I just have to know.
other than the LV for the masterfs, there is a disk for each "volume" (disk or snapshot). a snapshot is copy-on-write and usually thinly-provisioned. a disk can be pre-allocated or thinly provisioned. a thinly provisioned is done by creating a small LV, then extending it as-needed while the VM is running.
participants (2)
-
Itamar Heim
-
Nicolas Ecarnot