[SOLVED] stmfadm: view entry exists

RobFantini

Famous Member
May 24, 2012
2,041
107
133
Boston,Mass
Hello

I tried to add a kvm using zfs iscsi storage and the task failed :
Code:
stmfadm: view entry exists
TASK ERROR: create failed - command '/usr/bin/ssh -o 'BatchMode=yes' -i /etc/pve/priv/zfs/10.2.2.21_id_rsa root@10.2.2.21 /usr/sbin/stmfadm add-view 600144f0f8fbb122a1d3b24edd342b23' failed: exit code 1

from that node I can ssh in to 10.2.2.21 .

Any clues on how to debug and solve this?

PS:

our startssl key expired a few weeks ago and I replaced with a standard pve key.
 
What happens if you run the command manually?

the key is ok, this works.
Code:
ssh -i /etc/pve/priv/zfs/10.2.2.21_id_rsa root@10.2.2.21


however I do not know about iscsi yet to try this:
Code:
/usr/sbin/stmfadm add-view 600144f0f8fbb122a1d3b24edd342b23

is there a list view or something else not intrusive I could use from pve cli to test with?
 
First thing on the server would be a

Code:
ls -l  /usr/sbin/stmfadm
Code:
# ssh  10.2.2.21
OmniOS 5.11  omnios-aab7656  April 2016

SunOS sys5 5.11 omnios-aab7656 i86pc i386 i86pc
sys5 omnios  ~ # ls -l  /usr/sbin/stmfadm
-r-xr-xr-x 1 root bin 60496 Apr 21 16:45 /usr/sbin/stmfadm*
 
Hello

I tried to add a kvm using zfs iscsi storage and the task failed :
Code:
stmfadm: view entry exists
TASK ERROR: create failed - command '/usr/bin/ssh -o 'BatchMode=yes' -i /etc/pve/priv/zfs/10.2.2.21_id_rsa root@10.2.2.21 /usr/sbin/stmfadm add-view 600144f0f8fbb122a1d3b24edd342b23' failed: exit code 1

from that node I can ssh in to 10.2.2.21 .

Any clues on how to debug and solve this?

PS:

our startssl key expired a few weeks ago and I replaced with a standard pve key.
A view already exists for the LUN in question and likewise the LUN also exists. A view can be removed like:
/usr/sbin/stmfadm remove-view -l <LU-NAME>
In your case the LU-NAME is 600144f0f8fbb122a1d3b24edd342b23
 
A view already exists for the LUN in question and likewise the LUN also exists. A view can be removed like:
/usr/sbin/stmfadm remove-view -l <LU-NAME>
In your case the LU-NAME is 600144f0f8fbb122a1d3b24edd342b23


I've a question -

is the LU-NAME unique per every storage create?

Or does VM ID 106 disk 1 always get the same name at the target?
 
I've a question -

is the LU-NAME unique per every storage create?
The LU-NAME is actually a GUID.

guid=string
32 hexadecimal ASCII characters representing a valid NAA Registered
Extended Identifier. The default is set by the STMF to a generated
value.
Or does VM ID 106 disk 1 always get the same name at the target?
I don't understand this question?
 
The LU-NAME is actually a GUID.

guid=string
32 hexadecimal ASCII characters representing a valid NAA Registered
Extended Identifier. The default is set by the STMF to a generated
value.

I don't understand this question?

I am trying to understand when 600144f0f8fbb122a1d3b24edd342b23 got created .

so 600144f0f8fbb122a1d3b24edd342b23 must have got created when I was adding 106 ( and not left over from a prior 106 .).

maybe there was a network issue at the time causing some kind of delay in pve getting told by iscsi that the disk was ready.

Or something else.

I'll test making another vm on the iscsi storage.
 
No issue creating vm 108 on iscsi.

It could be that 106 was left over from a past issue.
Question - is there a command that can show when LU 106 was created at the iscsi host? some way to show file creation date.
 
Last edited:
I am trying to understand when 600144f0f8fbb122a1d3b24edd342b23 got created .

so 600144f0f8fbb122a1d3b24edd342b23 must have got created when I was adding 106 ( and not left over from a prior 106 .).

maybe there was a network issue at the time causing some kind of delay in pve getting told by iscsi that the disk was ready.

Or something else.

I'll test making another vm on the iscsi storage.
Whenever you create a disk in proxmox gui using zfs-over-iscsi a lun will be created on the storage backed by a zvol. A luname is created automatically in the same way a uuid is created for a filesystem.
 
Whenever you create a disk in proxmox gui using zfs-over-iscsi a lun will be created on the storage backed by a zvol. A luname is created automatically in the same way a uuid is created for a filesystem.

I agree with that.

However:
1- if vm-106-disk-1 already exists at zfs/iscsi [ and is not assigned to any VM ].
2- and you try to create a vm id 106 using zfs/iscsi storage
3- then the error will probably occur.

I'll test that sometime.

To help debug how vm-106-disk-1 got there:
is there a command that can show when LU 106 was created at the iscsi host?
 
Creating a disk through zfs-over-iscsi is a two-step operation involving two different protocols.
All zfs and comstar stuff is done through ssh but via two unrelated processes. Eg. creating a disk from proxmox gui is not an atomic process nor is it encapsulated inside a transaction. If the last process, the comstar process, fails you will likely have a zvol and/or a lun/viw hanging around which must be removed manually. I think this is the cause to your problem but when that happened you were informed by an error message.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!