Procedure to add a new disk in DM multipath
Multipathing (Device Mapper Multipath) is a technology which is available from RHEL 5 for providing redundancy in I/O paths from storage devices . Multiple paths are configured from your server to storage and these physical paths are include HBA,cables and switches.
DM multipath have following capabilities
1. Redundancy
Two types of multipath are available active/active and active/passive . In first case both paths are accessible, but in second case only 1 path is accessible at a time.
2. Improved Performance
DM multipath can detect loading of the I/O paths and dynamically balance the load.
Almost all of the SAN devices are supported in multpathing. The details of the supported devices are given in multipath.conf.defaults file and when ever we need to change we will add the devices in /etc/multipath.conf file
Components which is required for multipathing
Kernel components
dm-multipath module - This particular component reroutes the I/O and supports failover for the paths and groups
multipathd daemon- Monitors the path and takes the action when ever necessary (like failed paths and restored paths)
.Configuration file details
/etc/multipath.conf - Main configuration file and it is located at /etc
multipath.conf.defaults - This is the default file which contains all the supported SAN devices. The location of the file is /usr/share/device-mapper-multipath
kpartx command - This tool is derived from util linux partx package . It is used to set up device mapping for the partitions for any partitioned block device . This tool can be used for non linux partitions which is need to be added with DM-MP.
So now i think you got an idea about the DM multipath architecture, Now let us go for adding a new device to DM setup .
1. First we have to scan the new physical disk
echo "- - -" > /sys/class/scsi_host/host3/scan
echo "- - -" > /sys/class/scsi_host/host4/scan
2. Some times new physical disk will not be visible initially, so need to restart multipath daemon
#service multipathd restart
3. Make alias of the new disk in /etc/multipath.conf file (in this case i have given silverdisk08)
multipath {
wwid put the new uuid no. here
alias silverdisk08
}
So now i think you got an idea about the DM multipath architecture, Now let us go for adding a new device to DM setup .
1. First we have to scan the new physical disk
echo "- - -" > /sys/class/scsi_host/host3/scan
echo "- - -" > /sys/class/scsi_host/host4/scan
2. Some times new physical disk will not be visible initially, so need to restart multipath daemon
#service multipathd restart
3. Make alias of the new disk in /etc/multipath.conf file (in this case i have given silverdisk08)
multipath {
wwid put the new uuid no. here
alias silverdisk08
}
* you will get the wwid details of the new disk once you restart the multipath service
4. Now add the disk in multipath
#multipath -f silverdisk08
5. Again restart the multipath daemon
#service multipathd restart
6.Now create a physical disk
#pvcreate /dev/mpath/silverdisk08
7. Extend the file system (you can also go for creating new LVM setup as per your requirement)
#vgextend datavg /dev/silverdisk08
4. Now add the disk in multipath
#multipath -f silverdisk08
5. Again restart the multipath daemon
#service multipathd restart
6.Now create a physical disk
#pvcreate /dev/mpath/silverdisk08
7. Extend the file system (you can also go for creating new LVM setup as per your requirement)
#vgextend datavg /dev/silverdisk08
#lvextend -L +94G /dev/mapper/datavg-u2ecllv
#resize2fs /dev/mapper/datavg-u2ecllv
No comments:
Post a Comment