Project

General

Profile

Bug #29265

Generate a unique serial for each LUN

Added by Gagandeep Arora over 1 year ago. Updated about 1 year ago.

Status:
Done
Priority:
No priority
Assignee:
Waqar Ahmed
Category:
Middleware
Target version:
Seen in:
Severity:
High
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:

Dell PowerEdge R620

ChangeLog Required:
No

Description

When exposing zvols using iscsi, all luns(extents in gui) are using same serial number "10000001" instead of generating a unique serial with system's mac address. I am seeing this bug in freenas versions 11.0-u4, 11.1, 11.1-u2. This causes the esxi servers to not recognise luns as they are not unique even though luns are being exposed from different freenas machines with different zvols. Please see below an e.q. /etc/ctl.conf generated by freenas:

root@freenas6:~ # cat /etc/ctl.conf
portal-group default {
}

portal-group pg1 {
tag 0x0001
discovery-filter portal-name
discovery-auth-group no-authentication
listen 10.6.14.56:3260
option ha_shared on
}

lun "freenas6-datastore1" {
ctl-lun 0
path "/dev/zvol/tank/freenas6-datastore1"
blocksize 512
serial "10000001"
device-id "iSCSI Disk 10000001 "
option vendor "FreeNAS"
option product "iSCSI Disk"
option revision "0123"
option naa 0x6589cfc0000001e5133ee0467f185a84
option insecure_tpc on
option rpm 1
}

auth-group ag4tg1_1 {
initiator-name "iqn.1998-01.com.vmware:vmsrv05-031dd103"
initiator-name "iqn.1998-01.com.vmware:vmsrv09-0875bfad"
initiator-name "iqn.1998-01.com.vmware:vmsrv11-184dde26"
initiator-name "iqn.1998-01.com.vmware:vmsrv13-26182574"
initiator-name "iqn.1998-01.com.vmware:vmsrv14-5ca7c34c"
initiator-name "iqn.1998-01.com.vmware:vmsrv21-0fbad3a0"
initiator-name "iqn.1998-01.com.vmware:vmsrv22-2ead19ef"
initiator-name "iqn.1998-01.com.vmware:vmsrv23-60979ae3"
initiator-name "iqn.1998-01.com.vmware:vmsrv24-64a62751"
initiator-name "iqn.1998-01.com.vmware:vmsrv30-642dd7e1"
initiator-name "iqn.1998-01.com.vmware:vmsrv31-1f1c1926"
initiator-name "iqn.1998-01.com.vmware:vmsrv32-33bcfb7f"
initiator-name "iqn.1998-01.com.vmware:vmsrv33-35edb0bf"
initiator-name "iqn.1998-01.com.vmware:vmsrv34-677111aa"
initiator-name "iqn.1998-01.com.vmware:vmsrv37-74ea2da3"
initiator-name "iqn.1998-01.com.vmware:vmsrv35-2b5ce4f8"
initiator-name "iqn.1998-01.com.vmware:vmsrv06-1ef0140a"
auth-type "none"
}

target iqn.2017-10.local.gps.freenas6:vmware {
alias "vmware"
portal-group pg1 ag4tg1_1

lun 5 "freenas6-datastore1" 
}
debug-freenas6-20180312071800.tgz (566 KB) debug-freenas6-20180312071800.tgz Gagandeep Arora, 03/11/2018 02:19 PM
2.png (168 KB) 2.png I added a .tmp in the end to change the base name Waqar Ahmed, 04/03/2018 07:54 AM
1.png (180 KB) 1.png Waqar Ahmed, 04/03/2018 07:54 AM
4.png (162 KB) 4.png Waqar Ahmed, 04/03/2018 07:54 AM
3.png (165 KB) 3.png Waqar Ahmed, 04/03/2018 07:54 AM
5.png (182 KB) 5.png Waqar Ahmed, 04/03/2018 07:54 AM
6.png (199 KB) 6.png Waqar Ahmed, 04/03/2018 07:55 AM
Screen Shot 2018-06-26 at 5.13.51 PM.png (47.1 KB) Screen Shot 2018-06-26 at 5.13.51 PM.png Paul Walker, 06/26/2018 02:14 PM
16038
16041
16044
16047
16050
16053
19628

History

#1 Updated by Dru Lavigne over 1 year ago

Gagandeep: to clarify, is this in the old UI or the new UI?

#2 Updated by Gagandeep Arora over 1 year ago

I am using old UI.

#3 Updated by Dru Lavigne over 1 year ago

  • Private changed from No to Yes

Gagandeep, please attach a debug (System -> Advanced -> Save Debug).

#4 Updated by Gagandeep Arora over 1 year ago

Hi Dru,

Please see the attached debug as requested. As a workaround, I am appending the lun number to the mac address of first nic and using it as a serial number.

Regards,
Gagan

#5 Updated by Dru Lavigne over 1 year ago

  • Category changed from GUI (new) to Middleware
  • Assignee changed from Release Council to William Grzybowski
  • Target version set to 11.2-RC2

#6 Updated by William Grzybowski over 1 year ago

  • Assignee changed from William Grzybowski to Waqar Ahmed

Waqar, this may have a learning curve for you but I think you can handle it, no hurry though.

#7 Updated by Waqar Ahmed over 1 year ago

  • Status changed from Unscreened to Not Started

#8 Updated by Waqar Ahmed over 1 year ago

  • Status changed from Not Started to In Progress

#9 Updated by Waqar Ahmed over 1 year ago

Hi Gagan! So I wasn't able to reproduce the issue outlined. Could you kindly confirm the steps you took to produce this and the output of " ifconfig em0 ether| grep ether | awk '{print $2}'|tr -d : " - em0 in the command is a network interface and if it's different for you kindly replace with the appropriate name using ifconfig command which will tell you your NIC's ( Don't use the lo0 one please ). Apparently some kind of exception is being raised when the system tries to generate an extent_serial for you and then it defaults to the one you mentioned. The steps I took to recreate this issue was that I created a portal first, then I added extent and it automatically configured the serial for the extent by adding "mac addres" + "no_of_extent(like 1 or 2 or 3 )". I then started the ISCSI service and the ctl.conf file also relates to what I have in the UI. Looking forward to hearing from you. Thank you!

#10 Updated by Gagandeep Arora over 1 year ago

Hi Waqar,

The MAC address of first NIC:
root@freenas6:~ # ifconfig bxe0 ether | grep ether | awk '{print $2}' | tr -d :
b82a72d15075

Following are the steps to reproduce:
Step0: Create a zvol for sharing using iSCSI
Step1: Go to Sharing -> Block (iSCSI)
Step2: Under Target Configuration: Change the Base Name
Step3: Under Portals: Create a portal group ID and Change Listen field to listen on one of the configured addresses.
Step4: Under Initiators: Create initiators group with authorized ALL network and a bunch of initiators
Step5: Under Targets: Create a target and associate it with portal group ID and initiator group ID created above
Step6: Under Extents: Click Add Extent to add an extent and this is the screen(Add Extent form) the number 10000001 is in Serial field by default.

Regards,
gagan

#11 Updated by Waqar Ahmed over 1 year ago

16038
16041
16044
16047
16050
16053

Hi Gagan! I executed the steps in the order you mentioned. Please have a look at the screenshots. They are in order wrt their file names. So in the end you'll see that the serial no is being correctly generated. Kindly let me know if I overlooked something. Thank you!

#12 Updated by Waqar Ahmed over 1 year ago

Gagan, is it possible if we can schedule a team viewer session to see what's going on with your system ? Thank you

#13 Updated by Gagandeep Arora over 1 year ago

Hi Waqar,

Let me know what time suits you for teamviewer session. I am in AEST (Australian Eastern Standard Time= GMT+10) timezone.

Regards,
Gagan

#14 Updated by Waqar Ahmed over 1 year ago

Gagan please list down the time slots when you're available in UTC and we can co-ordinate then. Thanks!

#15 Updated by Gagandeep Arora over 1 year ago

I am available from 9:00 PM to 6:30 AM UTC.

#16 Updated by Waqar Ahmed over 1 year ago

We can try a session in exactly two hours 12 minutes ? Does that work for you ?

#17 Updated by Gagandeep Arora over 1 year ago

Yes, it suits me.

#18 Updated by Waqar Ahmed over 1 year ago

Perfect. Talk to you then!

#19 Updated by Waqar Ahmed over 1 year ago

Gagan are you available ?

#20 Updated by Gagandeep Arora over 1 year ago

I am ready. Please let me know how do you want me to provide you the id and password for teamviewer?

#21 Updated by Waqar Ahmed over 1 year ago

Now would be good

#23 Updated by Gagandeep Arora over 1 year ago

Do you want to setup team viewer session again? I have emailed you the details.

#24 Updated by Waqar Ahmed over 1 year ago

  • % Done changed from 0 to 90

#25 Updated by Waqar Ahmed over 1 year ago

  • Status changed from In Progress to Done
  • % Done changed from 90 to 100

#26 Updated by Dru Lavigne over 1 year ago

  • Subject changed from The iscsi serall numbers are defaulting to number 10000001 instead of being uniquley generated to Generate a unique serial for each LUN
  • Target version changed from 11.2-RC2 to 11.2-BETA1
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

#27 Updated by Dru Lavigne about 1 year ago

  • Status changed from Done to Ready for Testing

#28 Updated by Paul Walker about 1 year ago

19628

This is working as expected now.

#29 Updated by Paul Walker about 1 year ago

  • Status changed from Ready for Testing to Passed Testing

#30 Updated by Dru Lavigne about 1 year ago

  • Status changed from Passed Testing to Done

Also available in: Atom PDF