Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iohyve disks incorrectly showing #298

Open
the-vty opened this issue May 11, 2018 · 0 comments
Open

iohyve disks incorrectly showing #298

the-vty opened this issue May 11, 2018 · 0 comments

Comments

@the-vty
Copy link

the-vty commented May 11, 2018

Hi pr1ntf,

Thanks for excellent tool!
I noticed that "iohyve disks" displays wrong info if a vm name is used matches with other vms:

# iohyve list
Guest       VMM?  Running  rcboot?  Description
debian      YES   YES      YES      Thu May 10 13:59:08 CEST 2018
debian.old  NO    NO       NO       Sun Oct 16 18:47:12 CEST 2016
ubuntu      NO    NO       NO       Wed May  9 15:11:30 CEST 2018

# iohyve disks debian
Listing  disks  for  debian...
diskN    Size
disk0    60G
disk0    20G
disk1    40G

The first "disk0" is taken from debian.old because the regexp in ioh-disk matches both "debian" and "debian.old"
The easiest fix would be to change
zfs list -H -o name,volsize | grep -E "iohyve.*$name.*disk"
to:
zfs list -H -o name,volsize | grep -E "iohyve.*$name/disk"

# zfs list -H -o name,volsize | grep -E 'iohyve.*debian/disk'
zroot/iohyve/debian/disk0	20G
zroot/iohyve/debian/disk1	40G

/vty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant