Brent Jones
2009-Nov-17 18:13 UTC
[zfs-discuss] Comstar thin provisioning space reclamation
I use several file-backed thin provisioned iSCSI volumes presented over Comstar. The initiators are Windows 2003/2008 systems with the MS MPIO initiator. The Windows systems only claim to be using about 4TB of space, but the ZFS volume says 7.12TB is used. Granted, I imagine ZFS allocates the blocks as soon as Windows needs space, and Windows will eventually not need that space again. Is there a way to reclaim un-used space on a thin provisioned iSCSI target? -- Brent Jones brent at servuhome.net
You can reclaim this space with the SDelete utility from Microsoft. With the -c option it will zero any free space on the volume. For example: C:\>sdelete -c C: I''ve tested this with xVM and with compression enabled for the zvol, but it worked very well. Ed Plese On Tue, Nov 17, 2009 at 12:13 PM, Brent Jones <brent at servuhome.net> wrote:> I use several file-backed thin provisioned iSCSI volumes presented over Comstar. > The initiators are Windows 2003/2008 systems with the MS MPIO initiator. > > The Windows systems only claim to be using about 4TB of space, but the > ZFS volume says 7.12TB is used. > Granted, I imagine ZFS allocates the blocks as soon as Windows needs > space, and Windows will eventually not need that space again. > Is there a way to reclaim un-used space on a thin provisioned iSCSI target? > > > > -- > Brent Jones > brent at servuhome.net > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >
Brent Jones
2009-Nov-19 00:09 UTC
[zfs-discuss] Comstar thin provisioning space reclamation
On Tue, Nov 17, 2009 at 10:32 AM, Ed Plese <ed at edplese.com> wrote:> You can reclaim this space with the SDelete utility from Microsoft. > With the -c option it will zero any free space on the volume. ?For > example: > > C:\>sdelete -c C: > > I''ve tested this with xVM and with compression enabled for the zvol, > but it worked very well. > > > Ed Plese > >It seems the compression setting on the zvol is key here. Tried without compression turned on, and the thin provisioned file grew to its maximum size. I''m re-running it on the same volume, this time with compression turned on to see how it behaves next :) -- Brent Jones brent at servuhome.net
Brent Jones
2009-Nov-20 03:59 UTC
[zfs-discuss] Comstar thin provisioning space reclamation
On Wed, Nov 18, 2009 at 4:09 PM, Brent Jones <brent at servuhome.net> wrote:> On Tue, Nov 17, 2009 at 10:32 AM, Ed Plese <ed at edplese.com> wrote: >> You can reclaim this space with the SDelete utility from Microsoft. >> With the -c option it will zero any free space on the volume. ?For >> example: >> >> C:\>sdelete -c C: >> >> I''ve tested this with xVM and with compression enabled for the zvol, >> but it worked very well. >> >> >> Ed Plese >> >> > > It seems the compression setting on the zvol is key here. Tried > without compression turned on, and the thin provisioned file grew to > its maximum size. > I''m re-running it on the same volume, this time with compression > turned on to see how it behaves next ?:) > > > > -- > Brent Jones > brent at servuhome.net >Turning compression on was the key. Reclaimed about 5TB of space running sdelete (though it takes a very long time) -- Brent Jones brent at servuhome.net
sdelete may be the easiest, but not the best tool here, since it`s made for secure deletion and not made for filling a disk with zeroes quickly. i have no windows around here for performance testing, but dd may perform better: http://www.chrysocome.net/dd you should try "dd if=/dev/zero of=largefile.dat bs=1M" and remove that file afterwards this should give the same effect as with sdelete, but it may perform better. if you like to try that, please report the results here. there are more tools like this around, but they are hard to find. -- This message posted from opensolaris.org