Documente Academic
Documente Profesional
Documente Cultură
MDADM
HDLM
RAIDTOOLS
• HDS Support
• Well tested
• Free of charge
• Stable
• Updates from Internet
• Standard interface
• SAN Boot
• Many algorithms
• Kernel-independent
• Path Health Checking
• Distributions-independent
• Auto Failback
• Processor-independent
• Recognises 9500V Default-Ctlr
• Supports Emulex and Qlogic
• Autoscan
• Supports Emulex and Qlogic
• SuSE/NOVELL Support as of
SLES 9 SP2 for HDS Storage • SAN Boot
• Free of charge • Several Algorithms
• Updates from Internet • Kernel-independent
• SAN Boot • Distribution-independent
• Several Algorithms • Processor-independent
• Kernel-independent • Autoscan
• Distribution-independent • AutoFailback
• Processor-independent • LVM transparence
• Autoscan
• Supports Emulex and Qlogic
• Only Active/Passive
• SuSE Support as of SLES 9 SP 2 • Path priority only with SANSurfer
• Badly documented • Only Qlogic HBA
• Errors in documentation •Static Load-Balancing parameters
• Reboot needed after partitioning do not work
• Problems with Partitioned • A stable path recognition only possible
Devices After reboot
• Stable
• OS transparent
• No Experience
• Very stable
• SuSE Support
Basic Qlogic Setup
SLES 9
Module parameters • Qlogic driver is installed and automatically started
• Module parameters:
# vi /etc/modprobe.conf.local
# modinfo –p qla2300
add: options qla2xxx qlport_down_retry=1 ql2xfailover=0
-> show possible parameters
ql2xretrycount=5 ql2xplogiabsentdevice=1
• in YAST / Hardware / Harddisk-Controller / Qlogic “Load module in initrd”
# cat /proc/scsi/qla2300/1
Deactivate
-> show active parameters
• Start module from RAMdisk automatically at boot:
# vi /etc/sysconfig/kernel
INITRD_MODULES=„mptscsih reiserfs qla2xxx qla2300“
SLES 8 # mkinitrd
• Qlogic module is installed, but not automatically started
• Module parameters:
# vi /etc/modules.conf
add: options qla2300 qlport_down_retry=1
Scannen
• Manual Start (check modules.conf): # echo „scsi-qlascan“ >
# depmod -a
/proc/scsi/driver-name/adapter-id
# modprobe qla2300
Check in „/var/log/messages“ after „RESCAN“
• Automatic Start (check modules.conf):
# vi /etc/init.d/boot.local
# cat /proc/scsi/scsi
add: modprobe qla2300 qlport_down_retry=1
# echo "scsi add-single-device 0 1 2 3" >
• Automatisches Starten in RD (check modules.conf): /proc/scsi/scsi
# vi /etc/sysconfig/kernel
-> scsi mid layer re-scans
INITRD_MODULES=„mptscsih reiserfs qla2300“
-> "0 1 2 3" = "HOST CHANNEL ID LUN"
# mk_initrd
# reboot
LVM
• MDs and LVM VGs are only started automatically at reboot in SLES 8 and 9
if the Qlogic Driver in RAMDisk is used. Otherwise the MDs
and VGs have to be started manually.
HDLM Installation/Configuration HDLM for Kernel 2.4
# mkdir /etc/opt/DynamicLinkManager
# mount /media/cdrom (License CD)
# cp /media/cdrom/*.plk /var/tmp/hdlm_license
OR
# echo "A8GPQRS3CDEIJK012C73" > /etc/opt/DynamicLinkManager/dlm.lic_key
# umount /media/cdrom
a) # insmod sddlmadrv
b) # insmod sddlmfdrv
c) # /etc/init.d/DLMManager start
d) # /opt/DynamicLinkManager/bin/dlmcfgmgr –r
a) To d) a reboot is better
# fdisk /dev/sddlmad
-> Set Linux Partition ID to 0x83
# vi /etc/raidtab
raiddev /dev/md0
raid-level linear
chunk-size 32
nr-raid-disks 1
persistent-superblock 1
device /dev/sddlmad1
raid-disk 0
# mkraid –R /dev/md0
# vgscan
# pvcreate /dev/md0
# vgcreate vg01 /dev/md0
# vgchange –an vg01
# raidstop /dev/md0
# raidstart /dev/md0
# vgchange –ay vg01
# lvcreate –L 1G –n lvol1 vg01
# mkfs –t etx3 /dev/vg01/lvol1
# mount /dev/vg01/lvol1 /mnt/fs1
Do this after a SLES8 reboot if the Qlogic module is not in the RamDisk RD
# raidstart /dev/md0
# vgscan
# vgchange –ay vg01
# mount /dev/vg01/lvol1 /mnt/fs1
HDLM Administration
# dlmcfgmgr -v
HDevName Management Device Host Channel Target Lun
/dev/sddlmaa configured /dev/sdc 0 0 0 2
/dev/sdl 1 0 1 2
/dev/sddlmac configured /dev/sdk 1 0 1 1
/dev/sdb 0 0 0 1
# dlmcfgmgr -r
-> Reconfigure after LUN add
# dlmcfgmgr -u all
-> Check after LUN delete
# dlmcfgmgr -o <device> | all
-> exclude
# dlmcfgmgr -i <device> | all
-> include
# cd /opt/DynamicLinkManager/bin
# ./dlnkmgr view -drv
PathID HDevName Device LDEV
000000 sddlmaa /dev/sdc 9970/9980.50118.0D0F
000001 sddlmab /dev/sdd 9970/9980.50118.0D10
000002 sddlmaa /dev/sde 9970/9980.50118.0D0F
000003 sddlmab /dev/sdf 9970/9980.50118.0D10
# cat /proc/mdstat
-> Check, that the MD Devices for the LVM are active
HDLM Deinstallation
# umount X
# vgchange –an vgX
# raidstop /dev/mdX
# rpm –e HDLM
# rpm –e HDLMhelp-en
# reboot
MDADM Installation
- http://www.cse.unsw.edu.au/~neilb/source/mdadm/
- download mdadm-1.9.0.tgz
# gzip -d mdadm-1.9.0.tgz
# tar xvf mdadm-1.9.0.tar
# cd mdadm-1.9.0
# make
# make install
# mdadm -V
mdadm - v1.9.0 - 04 February 2005
# fdisk /dev/sdc
-> Set up partition 1 with ID 0xfd
# fdisk /dev/sdo
-> read and save is enough to set up the alternate path of /dev/sdc
• You need to update /etc/multipath.conf, is you need support for new LUNs (eg. for USP OPEN-V or
Command Devices):
devnode_blacklist {
devnode cciss
devnode fd
devnode hd
devnode md
devnode sr
devnode scd
devnode st
devnode ram
devnode raw
devnode loop
devnode sda # internal Bootdisk
}
devices {
device {
vendor "HITACHI "
product "DF600F "
path_grouping_policy failover
path_checker tur
}
device {
vendor "HITACHI "
product "OPEN-9 "
path_grouping_policy multibus
path_checker tur
}
}
MULTIPATH Activation 3
TOOLS
• Start Multipath:
• # /etc/init.d/boot.multipath start
• # /etc/init.d/multipathd start
• There is a bug (bugzilla.novell.com #102937) so you do not have access to partitioned devices after reboot. The
reason is that boot.multipath is startend earlier as hotplug manager. For workaround move the hotplug manager in
RunLevel B:
YAST – System – Runlevel Editor – Expert Mode – Hotplug only to Runlevel „B“
MULTIPATH Administration
TOOLS
• Delete all paths and virtual devices (do not do this online!):
• # multipath -F
With an active passive system like the Thunder you only usually use the first path.
The Second HBA is standby.
If you want to do static load balancing you can use Matthias Prioritizer.
Copy the Linux HORCM command „inqraid“ and the Perl Script „pp_HDS_ODD_EVEN.sh“ to „/sbin/“ and set
the file rights.
After this change, and the deleting and recreation of the paths with „multipath –F“ ; „multipath“ ,
You can use „multipath –l“ to see which paths will be used (indicated by „best“).
MULTIPATH Prioritizer Shell Script for Thunder
TOOLS
#! /bin/sh
PATH=/bin:/usr/bin:/sbin:/usr/sbin
MINOR_MAJOR=$1
CTRL=$(inqraid -CLI $DEVICE | sed -n '2,$p' | awk '{print $2}' | awk -F - '{print $1}')
LDEV=$(inqraid -CLI $DEVICE | sed -n '2,$p' | awk '{print $4}')
exit 1; }
MULTIPATH Prioritizer Shell Script for Thunder
TOOLS /etc/multipath.conf changes
# cat /etc/multipath.conf
devnode_blacklist {
devnode cciss
devnode fd
devnode hd
devnode md
devnode sr
devnode scd
devnode st
devnode ram
devnode raw
devnode loop
devnode sda # interne Bootdisk
}
devices {
device {
vendor "HITACHI "
product "DF600F "
path_grouping_policy failover
prio_callout "/sbin/pp_HDS_ODD_EVEN.sh %d"
path_checker tur
}
device {
vendor "HITACHI "
product "OPEN-9 "
path_grouping_policy multibus
path_checker tur
}
}
MULTIPATH Deactivate
TOOLS
• Delete all paths and virtual devices (do not do this online!):
• # multipath -F
• Stop Deamon :
• # chkconfig multipathd off
Qlogic Storage Configuration for SLES 9 SP 2
Driver Failover
Stop Module :
# modprobe –r qla2300
# modprobe –r qla2xxx
# ls /proc/scsi/qla2xxx
# cat /proc/scsi/qla2xxx/<Adapter-ID>
-> Now shows also . „Driver version 8.00.02-fo“
# tail –f /var/log/messages
-> Shows activation and deactivation of paths
# modinfo qla2300
# modinfo qla2xxx
# modinfo –p qla2xxx
-> Shows all possible settings with explanations
Qlogic SANSurfer GUI Setup
Driver Failover
TIP: You can administer Linux from a Windows SANSurfer Client via LAN.