Informations on X4500 and X4540

Linux on the X4500 / X4540

udev rules

Pointer to UDEV rules for naming disks similar as in Solaris: http://wikitech-static.wikimedia.org/articles/s/u/n/Sun_Fire_X4500_and_X4540_cd48.html

Solaris device name symlinks can be made by udev. Put the following in /etc/udev/rules.d/99-thumper-disks.rules:

#
# /etc/udev/rules.d/99-thumper-disks.rules
# Written on 2009/08/15 by Mark Bergsma 
#

# Disk rules
SUBSYSTEM=="block", KERNEL=="sd*[a-z]", KERNELS=="*:0:0:0", PROGRAM="/etc/udev/scripts/solaris-name.sh %b", ENV{SOLARIS_NAME}="$result", SYMLINK+="disk/by-cntrl/$env{SOLARIS_NAME}"

# Partition rules
SUBSYSTEM=="block", KERNEL=="sd*[a-z][0-9]*", KERNELS=="*:0:0:0", PROGRAM="/etc/udev/scripts/solaris-name.sh %b %n", ENV{SOLARIS_NAME}="$result", SYMLINK+="disk/by-cntrl/$env{SOLARIS_NAME}"

And this (executable!) helper script in /etc/udev/scripts/solaris-name.sh:

#!/bin/bash

seq=$(echo $1 | cut -d':' -f 1)
controller=$(($seq / 8))
disk=$((seq % 8))

if [ -n "$2" ]; then
        echo "c${controller}t${disk}d0s$(($2 - 1))"
else
        echo "c${controller}t${disk}d0"
fi

-- DerekFeichtinger - 2009-10-30

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r2 - 2009-10-30 - DerekFeichtinger
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by Perl This site is powered by the TWiki collaboration platformCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback