Adding SAN volumes to storage

August


We had a single SAN volume for storage, soon we will need three or more. We also had a single Host Bus Adapter, but we need multipath. So we read the LVM-HOWTO and some Blog on SCSI, and we go ahead...

Procedure 25.  Detecting the volumes

  1. Finding the HBAs

    admin@server:~$ ls /sys/class/fc_host/
    host5  host6

  2. (Maybe not really needed)

    admin@server:~$ sudo apt-get install scsitools

  3. Configuring multipath

    In /etc/multipath.conf:

    defaults {
    polling_interval    30
    failback            immediate
    no_path_retry       5
    rr_min_io           100
    path_checker        tur
    user_friendly_names yes
    }
    
    multipaths {
    multipath {
        wwid 3600<snip>000
        alias HP-EVA-LWP1
    }
    multipath {
        wwid 3600<snip>000
        alias HP-EVA-LWP2
    }
    multipath {
        wwid 3600<snip>000
        alias HP-EVA-LWP3
    }
    multipath {
        wwid 3600<snip>000
        alias HP-EVA-LWP4
    }
    }
    	

  4. admin@server:~$ ls /sys/class/fc_host/
    host5  host6
    admin@server:~$ sudo sh -c "echo 1 >/sys/class/fc_host/host6/issue_lip"
    admin@server:~$ sudo sh -c "echo - - - >/sys/class/scsi_host/host6/scan"
    admin@server:~$ sudo sh -c "echo 1 >/sys/class/fc_host/host5/issue_lip"
    admin@server:~$ sudo sh -c "echo - - - >/sys/class/scsi_host/host5/scan"
    admin@server:~$ find /dev/disk/by-id/
    /dev/disk/by-id/
    /dev/disk/by-id/scsi-3600<snip>000
    /dev/disk/by-id/scsi-3600<snip>000
    /dev/disk/by-id/scsi-3600<snip>000
    /dev/disk/by-id/scsi-HP-EVA-LWP4
    /dev/disk/by-id/dm-uuid-mpath-3600<snip>000
    /dev/disk/by-id/dm-name-HP-EVA-LWP4
    /dev/disk/by-id/scsi-HP-EVA-LWP3
    /dev/disk/by-id/dm-uuid-mpath-3600<snip>000
    /dev/disk/by-id/dm-name-HP-EVA-LWP3
    /dev/disk/by-id/scsi-HP-EVA-LWP2
    /dev/disk/by-id/dm-uuid-mpath-3600<snip>000
    /dev/disk/by-id/dm-name-HP-EVA-LWP2
    /dev/disk/by-id/scsi-3600<snip>000
    <snip>
    /dev/disk/by-id/dm-uuid-mpath-3600<snip>000
    /dev/disk/by-id/dm-name-HP-EVA-LWP1
    /dev/disk/by-id/scsi-3600<snip>901-part1
    /dev/disk/by-id/scsi-3600<snip>901-part2
    /dev/disk/by-id/scsi-3600<snip>901

  5. Restarting the multipath daemon

    This gives:

  6. Creating physical volumes

  7. Extending the Volume Group

    (Use vgdisplay to figure out which Volume Groups are present

  8. Extending the Logical Volume

  9. Growing the filesystem