User Tools

Site Tools


sles

This is an old revision of the document!


SLES

SLEHA

195  2013-06-30 11:32:28 iscsiadm -m node iqn.2013-06.home.itbetrieb:tsm --login
198  2013-06-30 11:49:53 iscsiadm -m node --logout

iscsiadm -m node iqn.2014-01.home.itbetrieb:tsm.disk1 --portal "192.168.56.50:3260"

ISCSI target

bind specific interface. - not possible through /etc/ietf.conf. - change /etc/init.d/iscsitarget line :

      startproc -p $PIDFILE $DAEMON 

add parameter address

      startproc -p $PIDFILE $DAEMON --address 192.168.56.100

connect to iscsi target: tsm2:/etc/init.d # iscsiadm -m node -n iqn.2013-06.home.itbetrieb:tsm –login

Lin_tape / udev

barcode lenght @lin_tape

options lin_tape ibm3592_barcode=8 options lin_tape lto_barcode=6

Stop and start the driver by running these commands.

 lin_taped stop
 rmmod lin_tape
 depmod
 modprobe lin_tape (reinstall back)
 lin_taped (restart the daemon)

If there is a tape device attached to the Linux system with world-wide port name “0x123456789ABCDEF0” with a current device name of /dev/IBMtape0, a user could run udevadm info to obtain information on exported attributes for this device. This could be done as follows:

udevadm info –attribute-walk –name /dev/IBMtape0

The output of this command should include something similar to the following: ATTRS{serial_num}==“123456789” ATTRS{ww_node_name}==“0x123456789ABCDEF1” ATTRS{ww_port_name}==“0x123456789ABCDEF0” Note: Variations exist between kernels. For example, if you are using udevinfo, you should enter the previous command as

udevinfo -a -p `udevinfo -q path -n /dev/IBMtape0`

Also, on some kernels an attribute ATTRS{xxx} will be replaced by SYSFS{xxx}. Furthermore, some kernels use a '=' (single equal sign) to indicate an attribute match as well as an assignment, whereas other kernels use a '==' (double equal sign) for a match and '=' for assignment. You should place the attribute from the attribute list into your rules file exactly as it appears in the attribute list, as described below. We can use the ww_port_name in a .rules file that will assign a symbolic link to a device that has the listed world-wide port name. The file will typically be placed in /etc/udev/rules.d, but this location may be changed by the udev_rules Linux Device Driver (lin_tape) Chapter 5. Linux Tape and Medium Changer Device Driver 105

directive in the /etc/udev/rules.conf file. In this example, we create a file called /etc/udev/rules.d/98-lin_tape.rules and write a single line to the file: KERNEL==“IBMtape*”, ATTRS{ww_port_name}==“0x123456789ABCDEF0”, SYMLINK=“lin_tape/by-id/lin_tape480110 Assuming that the udev service is running and configured correctly, the user can install or reinstall lin_tape using modprobe, and the symbolic link should be created in the /dev/lin_tape/by-id folder. One line should be added to the 98-lin_tape.rules file for each symbolic link desired.

DD

Ceating a large file for backup and restore purpouses

dd if=/dev/zero of=100GB.FILE bs=10k count=10000000 <- Optimale Komprimierung möglich 8-)
dd if=/dev/urandom of=100GB.RANDOM.FILE bs=10k count=10000000

dd if=/dev/zero of=/dev/sdd bs=1G count=1 oflag=direct

LVM2

Preparation of 1 or more hard disks for LVM

pvcreate /dev/sda /dev/mapper/myname 

Creating a VolumeGroup

vgcreate -s 4M vgname /dev/sda /dev/mapper/myname

Configuring a Logical Volume in the Group

lvcreate -l100% -n lvol01 vgname

Mount

mount -t xfs device mountpoint

Multipathing

dry run, verbosity level 2:

multipath -v2 -d

list configured devices

multipath -ll

/etc/multipath.conf - set userfriendly names for devices

## Use user friendly names, instead of using WWIDs as names.
defaults {
       user_friendly_names yes
#       multipath_tool  "/sbin/multipath -v0"
#       udev_dir        /dev
#      polling_interval 10
#       default_selector        "round-robin 0"
#       default_path_grouping_policy    failover
#       default_getuid_callout  "/sbin/scsi_id -g -u -s /block/%n" 
#        default_prio_callout    "/bin/true"
#       default_features        "0"
#       rr_min_io               100
       failback                immediate
}
devices {
  device {
      vendor "DGC "
      product "LUNZ            "
      path_grouping_policy group_by_priority
      getuid_callout "/sbin/scsi_id -g -u -s /block/%n"
      prio_callout    "/sbin/mpath_prio_emc /dev/%n"
      path_checker    emc_clariion
      path_selector   "round-robin 0"
      features        "0"
      #features        "1 queue_if_no_path"
      hardware_handler "1 emc"
  }
}
# die einzelnen LUNs mit sprechenden Namen
multipaths {
      multipath {
              wwid    360060160113127004648e477123145678
              alias   meineLUN1
      }
} 
# hier alle devices listen die nicht ueber multipathing genutzt werden sollen
devnode_blacklist {
      wwid 3600508e0000000003ce93cc6b29deb04
      devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st|sda)[0-9]*"
      devnode "^hd[a-z][0-9]*"
}
# Sicherstellen, dass die Clariion nicht dabei ist
blacklist_exceptions {
      device {
              vendor  "DGC "
              product "LUNZ            "
      }
}
  • Befehle zum überprüfen der korrekten Einstellungen:

Sicherstellen, dass die devices richtig erkannt werden.

Rescan SCSI Bus

myserver:/ # rescan_scsi_bus … … Scanning for device 9 0 1 0 … OLD: Host: scsi9 Channel: 00 Id: 01 Lun: 00

    Vendor: DGC      Model: LUNZ             Rev: 0429
    Type:   Direct-Access                    ANSI SCSI revision: 04

Scanning for device 9 0 1 1 … OLD: Host: scsi9 Channel: 00 Id: 01 Lun: 01

    Vendor: DGC      Model: RAID 5           Rev: 0429
    Type:   Direct-Access                    ANSI SCSI revision: 04

Scanning for device 9 0 1 2 … NEW: Host: scsi9 Channel: 00 Id: 01 Lun: 02

    Vendor: DGC      Model: RAID 5           Rev: 0429
    Type:   Direct-Access                    ANSI SCSI revision: 04

4 new device(s) found. 0 device(s) removed.

Configuring Path Failover Policies

FC-Adapter Details

tuxbox:/sys/class/fc_host/host10 # ll
total 0
-r--r--r-- 1 root root 4096 Aug 27 08:59 active_fc4s
lrwxrwxrwx 1 root root    0 Aug 27 08:59 device -> ../../../devices/pci0000:00/0000:00:0b.0/0000:08:00.0/host1
-r--r--r-- 1 root root 4096 Aug 27 08:59 fabric_name
--w------- 1 root root 4096 Aug 27 08:59 issue_lip
-r--r--r-- 1 root root 4096 Aug 27 08:59 maxframe_size
-r--r--r-- 1 root root 4096 Aug 27 08:59 node_name
-r--r--r-- 1 root root 4096 Aug 27 08:59 port_id
-r--r--r-- 1 root root 4096 Aug 27 08:59 port_name
-r--r--r-- 1 root root 4096 Aug 27 08:59 port_state
-r--r--r-- 1 root root 4096 Aug 27 08:59 port_type
-r--r--r-- 1 root root 4096 Aug 27 08:59 speed
drwxr-xr-x 2 root root    0 Aug 27 09:00 statistics
-r--r--r-- 1 root root 4096 Aug 27 08:59 supported_classes
-r--r--r-- 1 root root 4096 Aug 27 08:59 supported_fc4s
-r--r--r-- 1 root root 4096 Aug 27 08:59 supported_speeds
-rw-r--r-- 1 root root 4096 Aug 27 08:59 tgtid_bind_type
--w------- 1 root root 4096 Aug 27 08:59 uevent
sles.1390319068.txt.gz · Last modified: 2021/04/24 07:38 (external edit)