B: Reclaiming Storage from Disk Pools
How Much Storage will be Reclaimed?
This is impossible to predict.
SANsymphony can only reclaim Storage Allocation Units that have no block-level data on them. If a host write its data ‘all over’ its own filesystem, rather than contiguously, the amount of storage that can be reclaimed may be significantly less than expected.
Defragmenting data on virtual disks
It may be possible to use a host’s own defragmentation tools to consolidate data spread out all over the host’s filesystem, but care should be taken as even more storage may be allocated while the existing data is defragmented.
Once any defragmentation is completed then additional steps will need to wipe the ‘free’ filesystem space on the host and then use SANsymphony’s ‘Manual Reclamation’ feature.
Notes on SANsymphony's Reclamation Feature
Automatic Reclamation
SANsymphony checks for any ‘zero’ write I/O as it is received by the disk pool and keeps track of which block’s addresses they were sent to. When all the blocks of an allocated SAU have received ‘zero’ write I/O, the storage used by the SAU is then reclaimed.
Mirrored and replicated virtual disks will mirror/replicate the ‘zero’ write I/O so that storage can be reclaimed on the mirror/replication destination DataCore Server in the same way.
Manual Reclamation
SANsymphony checks for ‘zero’ block data by sending read I/O to the storage. When all the blocks of an allocated SAU are detected as having ‘zero’ data on them, the storage used by the SAU is then reclaimed.
Mirrored virtual disks will receive the manual reclamation ‘request’ on all DataCore Servers involved in the mirror configuration at the same time and each DataCore Server will read from its own storage.
The Manual reclamation ‘request’ is not sent to replication destination DataCore Servers from the source. Replication destinations will need to be manually reclaimed separately.
Reclaiming Storage on the Host Manually
Using ‘fstrim’ or ‘mount –o discard’ command
SANsymphony's support for SCSI UNMAP when used in conjunction the Linux fstrim command or the ‘mount –o discard’ option on certain file system types and allows hosts to send 'all-zero' write I/O to a virtual disk and trigger SANsymphony's Automatic Reclamation feature. Refer to Compatibility Lists to see if your distribution of Linux will work with SANsymphony’s SCSI UNMAP support.
Also see:
The Linux man-pages project:
RedHat’s Storage Administration Guide - 2.4. Discard unused blocks
Using the ‘dd’ command
A suggestion would be to create a sparse file of an appropriate size and then use the dd command to send zeros to the file.
Example:
From within the file system on the Disk Device create an ‘empty’ 2GB file called ‘my_file’:
fallocate --length 2147483648 my_file
Then use the dd command to write 'all-zero' I/O.
dd if=/dev/zero of=my_file bs=1024 count=2097152
This I/O will then be detected by SANsymphony's Automatic Reclamation function.
Also see: