enc@ 'path too long' sys/param.h patch

John jwd at FreeBSD.org
Sat Nov 15 05:50:34 UTC 2014


Hi Folks,

   I've been booting with verbose enabled and I've been getting many
msgs similar to the following:

kernel: WARNING: Unable to alias diskid/MULTIPATH-S3L0EX490000S349YJZ3 to enc at n500304800169db3d/type at 0/slot at 8/elmdesc at Slot07/diskid/MULTIPATH-S3L0EX490000S349YJZ3 - path too long

   SPECNAMELEN is 63 which is too small. The following small patch
and a rebuild of both world & kernel fixes the problem:

Index: sys/sys/param.h
===================================================================
--- sys/sys/param.h	(revision 274524)
+++ sys/sys/param.h	(working copy)
@@ -105,7 +105,7 @@
 #define	NOFILE		OPEN_MAX	/* max open files per process */
 #define	NOGROUP		65535		/* marker for empty group set member */
 #define MAXHOSTNAMELEN	256		/* max hostname size */
-#define SPECNAMELEN	63		/* max length of devicename */
+#define SPECNAMELEN	127		/* max length of devicename */
 
 /* More types and definitions used throughout the kernel. */
 #ifdef _KERNEL


   The directory structure now comes up:
   
enc at n500304800169db3d/type at 0/slot at 3/elmdesc at Slot02/da0
enc at n500304800169db3d/type at 0/slot at 3/elmdesc at Slot02/multipath/Z56
enc at n500304800169db3d/type at 0/slot at 3/elmdesc at Slot02/diskid/MULTIPATH-S3L03ASE0000M446F6CV

   However, the other disk in Z56 is not present:

# gmultipath status Z56
         Name   Status  Components
multipath/Z56  OPTIMAL  da0 (ACTIVE)
                        da87 (PASSIVE)

# find enc* | grep da87
#

   All the elements found in the current structure are under mpr0. Nothing
in mpr1 is present (the 2nd channel). The shelves are quad channeled with
two cables currently plugged in - so I was expecting to see two paths of disks.




   A second item is the symlink values are current directory only:

enc at n500304800169db3d/type at 0/slot at 3/elmdesc at Slot02/da0 -> da0
enc at n500304800169db3d/type at 0/slot at 3/elmdesc at Slot02/diskid/MULTIPATH-S3L03ASE0000M446F6CV -> diskid/MULTIPATH-S3L03ASE0000M446F6CV
enc at n500304800169db3d/type at 0/slot at 3/elmdesc at Slot02/multipath/Z56 -> multipath/Z56

   Thus the entries are not usable as is.

   Could da0 & da87 simply both show up in the same Slot02 structure?

# camcontrol smpphylist ses4 | grep da0
  2  0x5000c500767baa51   <SEAGATE ST1200MM0017 0002>       (da0,pass7)
# camcontrol smpphylist ses7 | grep da87
  2  0x5000c500767baa51   <SEAGATE ST1200MM0017 0002>       (da87,pass94)


   Thoughts?

Thanks!
John


More information about the freebsd-scsi mailing list