Reclamation for thin-provisioned volumes with linux

kkhavn
Posts: 15
Joined: Thu Apr 11, 2013 2:41 am

Reclamation for thin-provisioned volumes with linux

Post 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?
trireed
Posts: 30
Joined: Wed Aug 21, 2013 11:40 pm

Re: Reclamation for thin-provisioned volumes with linux

Post by trireed »

See Attachment, document provides insight on Linux Thin provisioning and Zero Detect.
Attachments
3PAR Thin Conversion Linux and Unix.pdf
(76.32 KiB) Downloaded 2424 times
User avatar
Richard Siemers
Site Admin
Posts: 1333
Joined: Tue Aug 18, 2009 10:35 pm
Location: Dallas, Texas

Re: Reclamation for thin-provisioned volumes with linux

Post 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>
Richard Siemers
The views and opinions expressed are my own and do not necessarily reflect those of my employer.
kkhavn
Posts: 15
Joined: Thu Apr 11, 2013 2:41 am

Re: Reclamation for thin-provisioned volumes with linux

Post 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.
kkhavn
Posts: 15
Joined: Thu Apr 11, 2013 2:41 am

Re: Reclamation for thin-provisioned volumes with linux

Post by kkhavn »

Any ideas?
Btw.: same problem with Windows 2008 R2 Hosts - freed space doesn't show up in VV :(
User avatar
Richard Siemers
Site Admin
Posts: 1333
Joined: Tue Aug 18, 2009 10:35 pm
Location: Dallas, Texas

Re: Reclamation for thin-provisioned volumes with linux

Post 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
Richard Siemers
The views and opinions expressed are my own and do not necessarily reflect those of my employer.
alexnovik
Posts: 2
Joined: Thu Sep 12, 2013 6:03 pm
Location: Minsk, Belarus

Re: Reclamation for thin-provisioned volumes with linux

Post 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?
ascheale
Posts: 29
Joined: Thu May 30, 2013 7:48 am

Re: Reclamation for thin-provisioned volumes with linux

Post 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
HP MASTER ASE STORAGE
alexnovik
Posts: 2
Joined: Thu Sep 12, 2013 6:03 pm
Location: Minsk, Belarus

Re: Reclamation for thin-provisioned volumes with linux

Post 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.
User avatar
Richard Siemers
Site Admin
Posts: 1333
Joined: Tue Aug 18, 2009 10:35 pm
Location: Dallas, Texas

Re: Reclamation for thin-provisioned volumes with linux

Post 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.
Richard Siemers
The views and opinions expressed are my own and do not necessarily reflect those of my employer.
Post Reply