11

I've seen a lot of information about how IQN's should be formatted, but there's not a lot of information on how to build them. I'm kind of a newb when it comes to iSCSI, and i have it working, but I'm wondering if i should just be making this stuff up, or if there's good reason to follow some sort of standard.

As an example, this is how (wikipedia http://en.wikipedia.org/wiki/ISCSI#Addressing) says you should format IQNs.

              Naming     String defined by
 Type  Date    Auth      "example.com" naming authority
+--++-----+ +---------+ +-----------------------------+
|  ||     | |         | |                             |     

iqn.1992-01.com.example:storage:diskarrays-sn-a8675309
iqn.1992-01.com.example
iqn.1992-01.com.example:storage.tape1.sys1.xyz
iqn.1992-01.com.example:storage.disk2.sys1.xyz[10]

My question is particularly, Why the date? Can it be anything, Does it mean anything? Are there any enforcements here? Will i ever run into a point where putting the 'wrong' date in will bite me?

Is the domain example reversed(like dns is) for a reason? If i have a domain name like starkindustries.pri would my iqn look like:

iqn.2006-05.pri.starkindustries:Linux:array0

Does this depend on DNS? (experience tells me it isn't, but it could be failing in sublte ways) And if it is dependent on DNS, do i use a host name, or just my domain name? i.e. Jarvis.starkindustries.pri or just starkindustries.pri ?

Also If i use an IP address(which some suggest if you're not using DNS which is more confusing because it works without DNS) do you reverse it like you do dns? i.e. 10.1.2.0

iqn.2006-05.0.2.1.10:Linux:array0 

Also, do you use a host address (of the iSCSI target?) or a network address.

Is there any enforcement of the 'string defined by "example.com" naming authority' i.e. is there a reason i can't use blahblahblah vs something useful? I realize a useful name is more descriptive, but are there any technical reasons for this? I also take a huge leap of faith that I'm the 'naming authority'.

I guess more than anything, I'm making up a bunch of stuff for these IQNs, and they appear to be working. I just want to know at least where to find some best practices when it comes to the actual generation of the iqns. I'm just considering that someday I'm going to not be the only one in charge of storage, so i need to pass down some standards, or i'm either going to make a mess, or have someone else make a mess when a new block of IQNs are needed.

Steve Butler
  • 1,016

1 Answers1

10

The rationale behind this in RFC 3720 is that above all, IQNs should be unique. The date prepended is a reasonable guarantee that the entity that controlled the domain name represented (in the naming auth field) at that time a "naming authority" who could ensure uniqueness - domain names change hands all the time and since the only other unique stuff going on is to the RHS of that first : (which is a free-for-all) there might already be a Linux:array0 or something similarly imaginative floating around.

RFC 3720 uses the (often amusing) MUST to define the date as YYYY-MM and goes into pernicious detail about the precise format and time of use etc. I imagine this is simply to make parsing and sorting simpler (fixed field lengths, always increasing). Are the RFC cops going to break your door down if you call your target iqn.screwyouRFC3720? Will it break the internet? No.

It has absolutely nothing to do with DNS, DNS is merely a handy, delegated, hierarchical system that already gets you from any TLD to a single device, if you like, so it's an easy way to identify responsible parties.

Personally, I like to make sure the IQN says something about when, who, what, why, and how important the data is, so when I'm hunting for space somewhere I know who to ask.

Like it or not, you're the naming authority.

quadruplebucky
  • 5,314
  • 24
  • 24