[OpenIndiana-discuss] Question about disk space usage on iSCSI volumes

Randy S sim.ple at live.nl
Thu Feb 7 01:38:28 UTC 2013


Hi, 

although I am still trying to fix my multipath problem mentioned in another post I also have the following matter which maybe one of you guys can explain.

I have created a zpool and a volume which has been exported via iSCSI. I want te create a script which shows me the exact free space on that particular volume. (OI 7)


Using zfs get reservation,volsize,usedbydataset,written,usedbysnapshots <name of volume> you get all these nice numbers while filling up the drive from a client machine.

As long as you are filling up the drive, calculations seem to be parallel with the actual situation.
As soon as you start deleting files and snapshots, it all becomes fuzzy, at least to me.

Example, when you delete a snapshot, or all snapshots , the usedbysnapshots drops to 0 as it should.
When you delete files from the iscsi volume with the client, the "usedbydataset" number stays the same, rendering the calculation: 

freespace = volsize - usedbysnapshots - usedbydataset rather useless.

Now I read somewhere (a long time ago) that zfs has a certain mechanism to release free space to the system, I just cannot find the article anywhere now.

So that is why I want to ask anybody here to explain to me how I could go about this.

Just trying to understand this zfs thing...;-)

Regards,

Randy
 		 	   		  


More information about the OpenIndiana-discuss mailing list