Server Administration & Management

How to mount SAN Partition to HP DL580 G7 Server In Linux

Before setting up DM-Multipath on your system, ensure that your system has been updated & includes the device-mapper-multipath package.
You set up multipath with the mpathconf utility, which creates the multipath configuration file /etc/multipath.conf.

# mpathconf

a) If the /etc/multipath.conf file already exists, the mpathconf utility will edit it.
b) If the /etc/multipath.conf file does not exist, the mpathconf utility will use the /usr/share/doc/device-mapper-multipath-0.4.9/multipath.       conf file as the starting file.
c) If the /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf file does not exist the mpathconf utility will create the /etc/multipath.      conf file from scratch.

If you do not need to edit the /etc/multipath.conf file, you can set up DM-Multipath for a basic failover configuration by running the following command. This command enables the multipath configuration file and starts the multipathd daemon. If you need to edit the /etc/multipath. conf file before starting the multipathd daemon. use the following procedure to set up DM-Multipath for a basic failover configuration.

1. Run the mpathconf command with the –enable option specified:

# mpathconf –enable
# mpathconf –enable –with_multipathd y
# mpathconf –enable –find_multipaths y
# mpathconf –enable –user_friendly_names y
# /etc/init.d/multipathd reload
# service multipathd restart
#chkconfig multipathd on

Since the value of user_friendly_name is set to yes in the configuration file, the multipath devices will be created as /dev/mapper/mpathn.

If you do not set the find_multipaths configuration parameter to yes, can use the following procedure to modify the multipath configuration file to ignore the local disks when configuring multipath.

2. Determine which disks are the internal disks and mark them as the ones to blacklist. In this example, /dev/sda is the internal disk. Note that as originally configured in the default multipath configuration file, executing the multipath -v2 shows the local disk, /dev/sda, in the
multipath map.

3. Now Search the partition and format it.

# fdisk -l
# fdisk /dev/mapper/mpathbp1
# mkfs.ext4 /dev/mapper/mpathbp1
# mount /dev/mapper/mpathbp1 /backup

4. Edit in /etc/fstab file during Booting Process for Mounting.

# vim /etc/fstab

/dev/mapper/mpathbp1    /backup   ext4   defaults   1   0

5. Edit in /etc/rc.local file after Booting Process for Mounting.

# vim /etc/rc.local

mount /dev/mapper/mpathbp1 /backup

Note: If SAN Raw Partition not show properly, then add following for HP 3PAR SAN storage in /etc/multipath.conf file.

# vim /etc/multipath.conf

defaults {
    polling_interval 10
    max_fds 8192

devices {
    device {
        vendor “3PARdata”
        product “VV”
        no_path_retry 18
        features “0”
        hardware_handler “0”
        path_grouping_policy multibus
        getuid_callout “/lib/udev/scsi_id –whitelisted –device=/dev/%n”
        path_selector “round-robin 0”
        rr_weight uniform
        rr_min_io_rq 1
        path_checker tur
        failback immediate

July 1, 2013 Posted by | SAN, Tips & Tricks, Unix/Linux | , , , | Leave a comment