Page 1 of 2

Reclamation for thin-provisioned volumes with linux

Posted: Fri Aug 23, 2013 7:46 am
by kkhavn
Hi,

we're testing space reclamation for virtual volumes which are presented to Linux (SLES 11 SP2) hosts.
Zero detect is activated and we're running 3.1.2 MU1.
We generated some random files to fill up the volume, then deleted the files and wrote zeros to the disk.
We could see the increase of user space, but there was no decrease after writing zeros.
For VMDK-VVs this is working fine using vmdktools, but we didn't see it working with native Linux hosts.
Did we miss any detail?

Re: Reclamation for thin-provisioned volumes with linux

Posted: Fri Aug 23, 2013 11:51 am
by trireed
See Attachment, document provides insight on Linux Thin provisioning and Zero Detect.

Re: Reclamation for thin-provisioned volumes with linux

Posted: Fri Aug 23, 2013 2:15 pm
by Richard Siemers
Have you confirmed that the linux VVs have the zero_detect policy enabled and not no_zero_detect?

showvv -pol <name of linux VV>

Re: Reclamation for thin-provisioned volumes with linux

Posted: Mon Aug 26, 2013 3:18 am
by kkhavn
Hi,

I understand the attached guide for migration volumes from thick to thin, but that's not the problem - we have already thin-provisioned volumes with zero-detect enabled.
So we want to reclaim free space from the host OS (SLES11 SP3).
I checked the policy for the VV, zero-detect is enabled:

Code: Select all

showvv -pol tpvv_pv_test01
 Id Name           --------------------Policies--------------------
157 tpvv_pv_test01 stale_ss,no_system,no_one_host,cache,zero_detect
-------------------------------------------------------------------
  1 total


Writing zeros to the (empty) filesystem (ext3) has no effect.

Re: Reclamation for thin-provisioned volumes with linux

Posted: Thu Aug 29, 2013 7:47 am
by kkhavn
Any ideas?
Btw.: same problem with Windows 2008 R2 Hosts - freed space doesn't show up in VV :(

Re: Reclamation for thin-provisioned volumes with linux

Posted: Mon Sep 09, 2013 2:44 pm
by Richard Siemers
I just ran through this excersize on an AIX host, we skipped the Oracle ASM luns, and just ran through the LVM space.

Before and after, recovered 490 gb:

Code: Select all

ESFWT800-1 cli% showvv R6KWMSTST*
                                                               ----Rsvd(MB)---- -(MB)--
  Id Name            Prov Type CopyOf BsId Rd -Detailed_State-  Adm Snp     Usr   VSize
660 R6KWMSTST_0     tpvv base ---     660 RW normal            768   0  889856  921600
661 R6KWMSTST_1     tpvv base ---     661 RW normal            256   0  153600  153600
662 R6KWMSTST_2     tpvv base ---     662 RW normal            256   0  153600  153600
663 R6KWMSTST_3     tpvv base ---     663 RW normal            256   0   45056  102400
3815 R6KWMSTST_4_ASM tpvv base ---    3815 RW normal            512   0  153600  153600
3976 R6KWMSTST_5     tpvv base ---    3976 RW normal            512   0  311296  512000
4001 R6KWMSTST_6     tpvv base ---    4001 RW normal            256   0  121856  153600
---------------------------------------------------------------------------------------
   7 total                                                     2816   0 1828864 2150400
ESFWT800-1 cli% showvv R6KWMSTST*
                                                               ----Rsvd(MB)---- -(MB)--
  Id Name            Prov Type CopyOf BsId Rd -Detailed_State-  Adm Snp     Usr   VSize
660 R6KWMSTST_0     tpvv base ---     660 RW normal           1024   0  655360  921600
661 R6KWMSTST_1_ASM tpvv base ---     661 RW normal            256   0  153600  153600
662 R6KWMSTST_2_ASM tpvv base ---     662 RW normal            256   0  153600  153600
663 R6KWMSTST_3     tpvv base ---     663 RW normal            512   0   44160  102400
3815 R6KWMSTST_4_ASM tpvv base ---    3815 RW normal            512   0  153600  153600
3976 R6KWMSTST_5     tpvv base ---    3976 RW normal            512   0   55424  512000
4001 R6KWMSTST_6     tpvv base ---    4001 RW normal            256   0  121856  153600
---------------------------------------------------------------------------------------
   7 total                                                     3328   0 1337600 2150400

Re: Reclamation for thin-provisioned volumes with linux

Posted: Thu Sep 12, 2013 6:06 pm
by alexnovik
ASIC detects zeroes at writes and do not place them to discs. So your zeroing must be offloaded to array. VMware uses Write-same instructions to write zeroes.
How do you write zeroes to filesystem?

Re: Reclamation for thin-provisioned volumes with linux

Posted: Fri Sep 13, 2013 1:52 am
by ascheale
Is zero reclaiming instant , or is there a system task ?

Zero detction goes through the ASIC same as zero reclaiming.
But what process wipes out the perviously written hard disk blocks ?

I´m not familiar with linux - in windows i would use sdelete.exe -z

Best regards
Alex

Re: Reclamation for thin-provisioned volumes with linux

Posted: Sun Sep 15, 2013 11:13 am
by alexnovik
ascheale wrote:Is zero reclaiming instant , or is there a system task ?

Zero detction goes through the ASIC same as zero reclaiming.
But what process wipes out the perviously written hard disk blocks ?

I´m not familiar with linux - in windows i would use sdelete.exe -z

Best regards
Alex


"compactcpg", "compactlds" commands from CLI does the job.
In 7x00 series it comes as preconfigured job in scheduler to perform reclaim once in a month.
On other 3PAR arrays you can manually assign desired time and date to reclaim space and also add this job to scheduler.

Re: Reclamation for thin-provisioned volumes with linux

Posted: Sun Sep 15, 2013 1:11 pm
by Richard Siemers
In linux we use the dd command in a for loop, inputs from dev/zero and outputs to 2g files until the volume reaches 95% full, then deletes the files it created. There are some example scripts posted in these forums.

It can be considered instant, depends on where you are looking for the free space. In my examples above, I was watching the reserved space of the vv with the showvv command, these results are realtime/instant. If you want our cpgs to let go of that free space and give it back to the physical disk's free pool, then compactcpg is the answer.