HPE Storage Users Group
https://3parug.net/

Reclamation for thin-provisioned volumes with linux
https://3parug.net/viewtopic.php?f=18&t=401
Page 1 of 2

Author:  kkhavn [ Fri Aug 23, 2013 7:46 am ]
Post subject:  Reclamation for thin-provisioned volumes with linux

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?

Author:  trireed [ Fri Aug 23, 2013 11:51 am ]
Post subject:  Re: Reclamation for thin-provisioned volumes with linux

See Attachment, document provides insight on Linux Thin provisioning and Zero Detect.

Attachments:
3PAR Thin Conversion Linux and Unix.pdf [76.32 KiB]
Downloaded 2011 times

Author:  Richard Siemers [ Fri Aug 23, 2013 2:15 pm ]
Post subject:  Re: Reclamation for thin-provisioned volumes with linux

Have you confirmed that the linux VVs have the zero_detect policy enabled and not no_zero_detect?

showvv -pol <name of linux VV>

Author:  kkhavn [ Mon Aug 26, 2013 3:18 am ]
Post subject:  Re: Reclamation for thin-provisioned volumes with linux

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:
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.

Author:  kkhavn [ Thu Aug 29, 2013 7:47 am ]
Post subject:  Re: Reclamation for thin-provisioned volumes with linux

Any ideas?
Btw.: same problem with Windows 2008 R2 Hosts - freed space doesn't show up in VV :(

Author:  Richard Siemers [ Mon Sep 09, 2013 2:44 pm ]
Post subject:  Re: Reclamation for thin-provisioned volumes with linux

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:
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

Author:  alexnovik [ Thu Sep 12, 2013 6:06 pm ]
Post subject:  Re: Reclamation for thin-provisioned volumes with linux

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?

Author:  ascheale [ Fri Sep 13, 2013 1:52 am ]
Post subject:  Re: Reclamation for thin-provisioned volumes with linux

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

Author:  alexnovik [ Sun Sep 15, 2013 11:13 am ]
Post subject:  Re: Reclamation for thin-provisioned volumes with linux

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.

Author:  Richard Siemers [ Sun Sep 15, 2013 1:11 pm ]
Post subject:  Re: Reclamation for thin-provisioned volumes with linux

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.

Page 1 of 2 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/