[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Clean deleted space in linux diks?



On Thu, Jan 19, 2012 at 5:38 AM, James Pifer <jep@xxxxxxxxxxxxxxxx> wrote:
>> If there isn't a huge amount of free space and/or making one big file
>> isn't an issue.
>> dd if=/dev/zero of=null-file bs=1024k ; rm null-file
>> or
>> cat /dev/zero > null-file ; rm null-file
>
> I tried this today and although the creation and deleting of the file
> worked fine, the SAN reclamation did not free any space, or make the
> disk sparse/thin. I'll let you know if something turns up with support
> on the matter.

The big question is how does your SAN do reclamation? For example:
- Does it search for zero blocks and replace them with just pointers?
- Does it perform deduplication of some sorts?
- Does it do compression?
- Does snapshot involved here?

IIRC the easiest way to do this with zfs-based SAN is to just enable
compression, and then write zeroes. zfs will treat zero-blocks
specially, using no space at all to store them. However that only
works when there's no snapshot/clone. If there's snapshot, old
snapshot may still refer to the original non-zero block, thus no space
is freed until I delete the snapshot/clone.

If the SAN uses some virtual disk format (e.g. VDI, VMDK) to store
block device, the "reclamation" process must be done manually after
you zero-out the blocks.

So again, it depends on how the SAN does reclamation process.

-- 
Fajar

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.