You're welcome.

Three items:

1. I am Garrett, not Gary.

2. You don't necessarily "know" how much space a given vdev is "used".
 Because of the COW nature of ZFS, and the fact that the vdev is pretty
much wholly owned by ZFS, one should always assume that ZFS is using the
"whole" amount.   (NB: in some virtual environments, thin-provisioning and
compression means that logical allocation might not result in actual
physical blocks being allocated.  Tracking and reporting of that would be
done in the virtual host, though.)  Put another way, once you given a vdev
to ZFS, assume you're giving *all* of it.  In fact, I strongly urge that
thin-provisioning underneath a vdev is a bad idea, that can only lead to
pain and suffering; thick provisioning should be used with ZFS.

3. On illumos, ZFS never "gives back" blocks.  On some other platforms, it
may issue SCSI UNMAP or SATA TRIM to return blocks to a virtual host.  See
however my comments about why thin-provisioning is a bad idea.


On Fri, Aug 8, 2014 at 10:52 AM, Harry Putnam via illumos-discuss <
[email protected]> wrote:

> HarryP asked:
> >>> Is there some handy way on oi to tell at a glance what disk or device
> >>> the zfs filesystems are on.
>
> [...]
>
> GaryD responded:
> >> There is no command to get the list of vdevs under the pool that
> >> hosts the filesystem if that is what your after.  It would be a very
> >> short script to do that though.
>
>
> "Chris Mosetick via illumos-discuss" <[email protected]>
> writes:
>
> > I would try typing "zpool history MyPool | grep add" That should show
> > you all the add commands that helped create the pool.
>
> > Also grep for "create" to see the first vdevs of the pool to be added.
>
> > This assumes you are using a newer pool version, as history option
> > was not on the earlier releases.
>
> I'm not sure what would be gained by unearthing all that many lines of
> history.  I mean as regards acertaining quickly which vdevs underly
> which zfs fs.
>
> GaryD Summed up (quite well) what I was looking for.
>
> I'd guess he was suggesting scripting up something that first gets
> the list of pools and then iterates over it checking `zfs list -r' for
> each and grabbing the relevant bits from that as regards which vdevs
> underly whey zfs fs.  I think I'd probably want to extract the amount
> of space used on each vdev as well.
>
> That said,  I think the commands you suggest might prove useful anyway
> just to know them... I'd never had occassion to stumble over:
> `zpool history XXXXX'. So thanks
>
>
>
>
>
> -------------------------------------------
> illumos-discuss
> Archives: https://www.listbox.com/member/archive/182180/=now
> RSS Feed:
> https://www.listbox.com/member/archive/rss/182180/22003744-9012f59c
> Modify Your Subscription:
> https://www.listbox.com/member/?&;
> Powered by Listbox: http://www.listbox.com
>



-------------------------------------------
illumos-discuss
Archives: https://www.listbox.com/member/archive/182180/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182180/21175430-2e6923be
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=21175430&id_secret=21175430-6a77cda4
Powered by Listbox: http://www.listbox.com

Reply via email to