'Wiring down' iSCSI devices / stop swapping dev nodes...

Daniel Braniss danny at cs.huji.ac.il
Thu May 8 14:12:30 UTC 2014


On May 8, 2014, at 4:45 PM, Karl Pielorz <kpielorz_lst at tdx.co.uk> wrote:

> 
> Hi,
> 
> I'm using the new iSCSI stack on FreeBSD 10. Seems to work fine so far - but I've noticed an issue (which is probably not related to new/old stack).
> 
> I have a number of iSCSI targets setup - when they initially connect, they appear as '/dev/da[6/7/8/9/10/11/12/13]'
> 
> However, if the remote node dies - when the iSCSI targets reconnect some of the drives transpose positions.
> 
> I'm not specifically reconnecting them - just bringing the remote back up (when ctld / iscsid load up) - causes the local node to 'see' the drives have returned after a while (i.e. I don't run any iscsictl commands or anything).
> 
> e.g. This time round drive previously connected to '/dev/da11' has now transposed with the drive that was connected to '/dev/da12'
> 
> Is there any way I can prevent this? - i.e. by pre-alloctating / specifying '/dev/da' entries for devices or something?
> 
> It's easy to see it happening on this test system as the drives are a mix of 750Gb and 2Tb - so when a 2Tb switches places with a 750Gb it's pretty obvious :)
> 
> -Karl

one solution is to use gpart (8)
	gpart create -s GPT /dev/dan
	…
	gpart add -t freebsd-ufs -l d0/p1 /dev/dan

and you can use now
	/dev/gpt/d0/p1

which [should] be true whatever iscsi decides to call device.

danny




More information about the freebsd-scsi mailing list