Custom HL15 with X11SPi-TF and LSI 9300/9400-16i HBA unable to use 45Drive Disk Feature

Is there a way to manually map the HBA port to HL15 slot in the Houston 45Drive Disk?

I donā€™t know if this thread will help. It talks about using the dalias tool, and also if you go down to post #19 from pxpunx he describes how he created the config file without using dalias.

1 Like

I am getting this error after setting up dalias.
Unknown Alias Style ā€˜?ā€™ encountered.
vdev_id.config is there.

Iā€™m not sure. Maybe @Hutch-45Drives can help.

When you have a moment, more details including operating system, file contents, logs, screenshots, etc. would be very helpful here. Doubly so since you called out this a custom HL15 so we lack in common understanding.

1 Like

OS is Ubuntu 20.04 LTS.
Motherboard X11SPi-TF
HBA: LSI 9300-16i - All Drives are on there.
Here is the vdev_id.cof

# This file was generated using dalias (2.0.0)
alias 1-1 /dev/disk/by-path/pci-0000:b7:00.0-sas-phy2-lun-0
alias 1-2 /dev/disk/by-path/pci-0000:b7:00.0-sas-phy3-lun-0
alias 1-3 /dev/disk/by-path/pci-0000:b7:00.0-sas-phy1-lun-0
alias 1-4 /dev/disk/by-path/pci-0000:b7:00.0-sas-phy0-lun-0
alias 1-5 /dev/disk/by-path/pci-0000:b7:00.0-sas-phy6-lun-0
alias 1-6 /dev/disk/by-path/pci-0000:b7:00.0-sas-phy7-lun-0
alias 1-7 /dev/disk/by-path/pci-0000:b7:00.0-sas-phy5-lun-0
alias 1-8 /dev/disk/by-path/pci-0000:b7:00.0-sas-phy4-lun-0
alias 1-9 /dev/disk/by-path/pci-0000:b5:00.0-sas-phy2-lun-0
alias 1-10 /dev/disk/by-path/pci-0000:b5:00.0-sas-phy3-lun-0
alias 1-11 /dev/disk/by-path/pci-0000:b5:00.0-sas-phy1-lun-0
alias 1-12 /dev/disk/by-path/pci-0000:b5:00.0-sas-phy0-lun-0
alias 1-13 /dev/disk/by-path/pci-0000:b5:00.0-sas-phy6-lun-0
alias 1-14 /dev/disk/by-path/pci-0000:b5:00.0-sas-phy7-lun-0
alias 1-15 /dev/disk/by-path/pci-0000:b5:00.0-sas-phy5-lun-0

Let me know what log or other information is needed.

Great - Thank you. Thereā€™s a more files to check that exist and have the appropriate contents: /usr/lib/udev/rules.d/68-vdev.rules and /usr/lib/udev/vdev_id_45drives.

The other helpful step will be reproducing the error and then checking the cockpit logs. This can be done via sudo journalctl --since "5 minutes ago" per Frequently Asked Questions (FAQ) ā€” Cockpit Project. I think you add --unit cockpit to this to just get entries from the cockpit service.

1 Like

68-vdev.rules

#
# /usr/lib/udev/rules.d/68-vdev.rules
#

# skip these rules if disk was handled by 67-ubm.rules
ENV{DEVTYPE}=="disk", ENV{DISK_HANDLED_BY_UBM}=="1", GOTO="68-vdev_end"

ENV{DEVTYPE}=="disk", IMPORT{program}="/usr/lib/udev/vdev_id_45drives -d %k -c /etc/vdev_id.conf"

KERNEL=="*[!0-9]", ENV{SUBSYSTEM}=="block", ENV{ID_VDEV}=="?*", SYMLINK+="$env{ID_VDEV_PATH}"
KERNEL=="*[!0-9]", ENV{SUBSYSTEM}=="block", ENV{ID_VDEV}=="?*", SYMLINK+="$env{ID_VDEV_ALT_PATH}"
KERNEL=="*[0-9]", ENV{SUBSYSTEM}=="block", ENV{DEVTYPE}=="partition", ENV{ID_VDEV}=="?*", SYMLINK+="$env{ID_VDEV_PATH}-part%n"
KERNEL=="*[0-9]", ENV{SUBSYSTEM}=="block", ENV{DEVTYPE}=="partition", ENV{ID_VDEV}=="?*", SYMLINK+="$env{ID_VDEV_ALT_PATH}-part%n"
KERNEL=="dm-[0-9]*", ENV{SUBSYSTEM}=="block", ENV{ID_VDEV}=="?*", SYMLINK+="$env{ID_VDEV_PATH}"
KERNEL=="dm-[0-9]*", ENV{SUBSYSTEM}=="block", ENV{ID_VDEV}=="?*", SYMLINK+="$env{ID_VDEV_ALT_PATH}"

LABEL="68-vdev_end"

vdev_id_45drives

#!/bin/sh

PATH=/bin:/sbin:/usr/bin:/usr/sbin
CONFIG=/etc/vdev_id.conf
PHYS_PER_PORT=
DEV=
MULTIPATH=
TOPOLOGY=
BAY=

usage() {
        cat << EOF
Usage: vdev_id [-h]
       vdev_id <-d device> [-c config_file]

  -c    specify name of alernate config file [default=$CONFIG]
  -d    specify basename of device (i.e. sda)
  -h    show this summary
EOF
        exit 0
}

alias_handler () {
        local DM_PART=
        if echo $DM_NAME | grep -q -E 'p[0-9][0-9]*$' ; then
                if [ "$DEVTYPE" != "partition" ] ; then
                        DM_PART=`echo $DM_NAME | awk -Fp '/p/{print "-part"$2}'`
                fi
        fi

        # DEVLINKS attribute must have been populated by already-run udev rules.
        for link in $DEVLINKS ; do
                # Remove partition information to match key of top-level device.
                if [ -n "$DM_PART" ] ; then
                        link=`echo $link | sed 's/p[0-9][0-9]*$//'`
                fi
                # Check both the fully qualified and the base name of link.
                for l in $link `basename $link` ; do
                        alias=`awk "\\$1 == \"alias\" && \\$3 == \"${l}\" \
                                        { print \\$2; exit }" $CONFIG`
                        if [ -n "$alias" ] ; then
                                echo ${alias}${DM_PART}
                                return
                        fi
                done
        done
}

while getopts 'c:d:g:mp:h' OPTION; do
        case ${OPTION} in
        c)
                CONFIG=${OPTARG}
                ;;
        d)
                DEV=${OPTARG}
                ;;
        h)
                usage
                ;;
        esac
done

if [ ! -r $CONFIG ] ; then
        exit 0
fi

if [ -z "$DEV" ] ; then
        echo "Error: missing required option -d"
        exit 1
fi
# First check if an alias was defined for this device.
ID_VDEV=`alias_handler`

if [ -n "$ID_VDEV" ] ; then
        echo "ID_VDEV=${ID_VDEV}"
        echo "ID_VDEV_PATH=disk/by-vdev/${ID_VDEV}"
        echo "ID_VDEV_ALT_PATH=${ID_VDEV}"
fi

For the log, when I run sudo journalctl --since "5 minutes ago" --unit cockpit all I get is TLS alerts. And sudo journalctl --since "5 minutes ago" only shows my session logs.

Ok so I think you have all the important files which is a good sign dalias did its job. No errors in cockpit logs is most likely also a good thing. That tells us that the error is probably coming from the console.

Question: are you planning to use ZFS with all those drives? If so, did you happen to setup the pool before aliasing?

The 45Drives Disks cockpit module will also try to detect ZFS and display some that information. If the pool was created without using aliases then the module will have issue. Probably easiest way to check is to run zpool status -v and see if aliases or device names show up.

Also what output do you get when you run lsdev?

Here is the zpool status -v result

  pool: TestPool
 state: ONLINE
config:

        NAME        STATE     READ WRITE CKSUM
        TestPool    ONLINE       0     0     0
          raidz2-0  ONLINE       0     0     0
            1-12    ONLINE       0     0     0
            1-15    ONLINE       0     0     0
            1-13    ONLINE       0     0     0
            1-3     ONLINE       0     0     0
            1-4     ONLINE       0     0     0
            1-14    ONLINE       0     0     0
            1-1     ONLINE       0     0     0
            1-2     ONLINE       0     0     0
            1-5     ONLINE       0     0     0
            1-8     ONLINE       0     0     0

lsdev result is Unknown Alias Style '?' encountered.

I have tried to recreate the pool after the aliases were created. No difference

Hey - we are getting closer! Looks like lsdev might be our culprit for the error message. Code is available on 45Drives GitHub. I think the section stating at line 289 is whatā€™s producing this error.

https://raw.githubusercontent.com/45Drives/tools/refs/heads/master/tools/lsdev

Looks to me maybe something is going wrong checking against server_info.json. What do you have in your /etc/45drives/server_info/server_info.json?

1 Like

I found the issue. it was "Alias Style": "?", . Changed it to STORINATOR now itā€™s working.

2 Likes

Thatā€™s great to hear! Looking at the lsdev code, it looks like HOMELAB would also work as itā€™s listed under both templates.

alias_template = {
		"H16":{
			"AV15":[23],
			"Q30":[15,23],
			"S45":[15,15,23],
			"XL60":[15,15,15,23]
		},
		"H32":{
			"Q30":[15,32],
			"S45":[15,15,32],
			"XL60":[15,15,15,32]
		},
		"STORINATOR":{
			"AV15":[15],
			"Q30":[15,15],
			"S45":[15,15,15],
			"XL60":[15,15,15,15],
			"C8":[4,4],
			"MI4":[4],
			"HL15":[15]
		},
		"HOMELAB":{
			"HL15":[15],
			"HL4":[4],
			"HL8":[4,4],
		},
  		"PROFESSIONAL":{
			"PRO15":[15],
			"PRO4":[4],
			"PRO8":[4,4],
		},
		"STORNADO":{
			"AV15":[32],
			"F32":[32]
		},
		"2USTORNADO":{
			"2U":[32]
		},
		"F2STORNADO":{
			"F2":[32],
			"VM8":[8],
			"VM16":[16],
			"VM32":[32]
		},
		"AV15-BASE":{
			"AV15":[15]
		},
		"DESTROYINATOR":{
			"AV15":[15],
			"Q30":[15,15],
			"S45":[15,15,15],
			"XL60":[15,15,15,15]
		},
		"F8":{
			"F8X1":[20],
			"F8X2":[20,20],
			"F8X3":[20,20,20]
		},
		"SSG-6048R-E1CR24H":{
			"SSG-6048R-E1CR24H":[4,4,4,4,4,4]
		},
		"HBA16":{
			"1X":[16],
			"2X":[16,16],
			"3X":[16,16,16],
			"4X":[16,16,16,16]
		}
	}

I tried HOMELAB, but didnā€™t work.
Unknown Alias Style ā€˜HOMELABā€™ encountered.

The lines;

	"HL8":[4,4],

and

	"PRO8":[4,4],

may be causing a problem parsing the JSON. As the last items between the curly braces those shouldnā€™t have commas after them.

Just a guess.

Seems like an error someone may have introduced with the release of the HL4/8.

1 Like

I think youā€™re right David - Good Catch! One of us should probably move this over to a GitHub issue get that corrected.

I do have a github account but donā€™t use it much. Although the fix is simple I think you can describe how the error is presenting better. (Does dalias call lsdev? rhetorical)

I donā€™t know how their source is managed, but I would imagine this must already be fixed in a production line copy?

1 Like

I got no problem opening one. Iā€™ll put in some details and reference this post.

If they already working on this, it hasnā€™t made it to the production branch. HomeLab was added back in October and Professional line added earlier this month. I have to imagine they use a master hard drive image with Rocky and the utilities all
Installed that they update periodically and not tied to their GitHub repo at all.

@dango can you cat out of the contents of ldev for us and check to see if HOMELAB is indeed included in that part of the code? I think it should be located at /opt/tools/lsdev but if that doesnā€™t work you can use which lsdev to find the full path to the file.

HOMLAB is not on my template list


        alias_template = {
                "H16":{
                        "AV15":[23],
                        "Q30":[15,23],
                        "S45":[15,15,23],
                        "XL60":[15,15,15,23]
                },
                "H32":{
                        "Q30":[15,32],
                        "S45":[15,15,32],
                        "XL60":[15,15,15,32]
                },
                "STORINATOR":{
                        "AV15":[15],
                        "Q30":[15,15],
                        "S45":[15,15,15],
                        "XL60":[15,15,15,15],
                        "C8":[4,4],
                        "MI4":[4],
                        "HL15":[15]
                },
                "STORNADO":{
                        "AV15":[32],
                        "F32":[32]
                },
                "2USTORNADO":{
                        "2U":[32]
                },
                "F2STORNADO":{
                        "F2":[32],
                        "VM8":[8],
                        "VM16":[16],
                        "VM32":[32]
                },
                "AV15-BASE":{
                        "AV15":[15]
                },
                "DESTROYINATOR":{
                        "AV15":[15],
                        "Q30":[15,15],
                        "S45":[15,15,15],
                        "XL60":[15,15,15,15]
                },
                "F8":{
                        "F8X1":[20],
                        "F8X2":[20,20],
                        "F8X3":[20,20,20]
                },
                "SSG-6048R-E1CR24H":{
                        "SSG-6048R-E1CR24H":[4,4,4,4,4,4]
                },
                "HBA16":{
                        "1X":[16],
                        "2X":[16,16],
                        "3X":[16,16,16],
                        "4X":[16,16,16,16]
                }
        }