mistifyio / go-zfs

Go wrappers for ZFS commands
Apache License 2.0
128 stars 66 forks source link

Add test cases for parsing fragmentation line #64

Closed Mic92 closed 2 years ago

Mic92 commented 7 years ago

Fixes #56

Boldie commented 7 years ago

As I remember I had to turn on the spacemap_histogram property to make it working. For now, I can see fragmentation, but I do not know exactly how to reproduce it. A pool created with spacemap_histogram=disabled will be displayed without fragmentation.

EDIT: Added description of how to create such a pool to https://github.com/moby/moby/issues/30551#issuecomment-341577934

avnish30jn commented 6 years ago

Are we handling this in the PR ?

zpool get -p "name,health,allocated,size,free,readonly,dedupratio,fragmentation,freeing,leaked" apporbit
NAME      PROPERTY       VALUE     SOURCE
apporbit  name           apporbit  -
apporbit  health         ONLINE    -
apporbit  allocated      540672    -
apporbit  size           106837311488  -
apporbit  free           106836770816  -
apporbit  readonly       off       -
apporbit  dedupratio     1.00      -
apporbit  fragmentation  0         -
apporbit  freeing        0         -
apporbit  leaked         0         -
Mic92 commented 6 years ago

Fragmentation is 0, so it should be fine even without this patch.

mmlb commented 2 years ago

Hey @Mic92 I've taken over the PR and changed it to add test for fragmentation. I can't reproduce this issue at all on master. I actually can't find a buggy commit at all, which sucks but this is so old that not worth worrying about I guess.