Skip to content
Bots!
Bots!
  • About
    • Myself
    • আমার দোয়া
  • Bookmarks
    • Bookmarks
    • My OCI Bookmarks
    • Useful Proxmox Commands & Links
    • Learning Nano
    • Useful Sites
    • Useful Virtualbox Command
    • Useful MySQL Command
    • Useful Linux Command
    • BTT-CAS
  • Resources
    • Webinar on Cloud Adoption for Project Managers
  • Photos
  • Videos
  • Downloads
Bots!

Add Multipath and connect to XFS system

Rumi, October 30, 2018

Device Mapper Multipathing (DM-Multipath) is a native multipathing in Linux, Device Mapper Multipathing (DM-Multipath) can be used for Redundancy and to Improve the Performance. It aggregates or combines the multiple I/O paths between Servers and Storage, so it creates a single device at the OS Level.

For example, Lets say a server with two HBA card attached to a storage controller with single ports on each HBA cards. One lun assigned to the single server via two wwn number of both cards. So OS detects two devices: /dev/sdb and /dev/sdc. Once we installed the Device Mapper Multipathing. DM-Multipath creates a single device with a unique WWID that reroutes I/O to those four underlying devices according to the multipath configuration. So when there is a failure with any of this I/O paths, Data can be accessible using the available I/O Path.

Install the  Device Mapper Multipath package.

Verify the device-mapper-multipath package has been installed or not.

[root@linux1 ~]# rpm -q device-mapper-multipath

If it is not installed, Install the Device Mapper Multipath package using yum to avoid dependencies issue. if yum is not configured, please refer the link Yum Configuration on Linux.

[root@linux1 ~]# yum -y install device-mapper-multipath

Basic Configuration of Linux Device Mapper Multipathing

Configuration file is /etc/multipath.conf file, take a backup of it. Edit the configuration file to ensure you have the following entries uncommented out.

If you’re unable to find multipath.conf configuration file, you may find it at this locaiton:

 cd /usr/share/doc/device-mapper-multipath-0.4.9/
cp multipath.conf /etc/multipath.conf
nano multipath.conf
defaults {
user_friendly_names yes
}
blacklist {
devnode “sda”
}

The blacklist includes the devices which are not to be configured in Multipathing. For example, Lets say our OS installed disk is /dev/sda. So the first entry in the blacklist will exclude them. Same for IDE drives (hd).

Start and Enable the multipath daemons.

Start the multipath service if not started bydefault.

[root@linux1 ~]# systemctl start multipathd

Enable the multipath service to start on boot.

[root@linux1 ~]# systemctl enable multipathd

Check the multipathing status.

The multipath -ll command prints out multipathed paths that show which devices are multipathed. If the command does not print anything out, ensure that all SAN connections are set up properly and the system is multipathed.

[root@linux1 ~]# multipath -ll
mpathb (360014051f89d2bb3300470fa7d4baa10) dm-2 LIO-ORG ,lun0
size=2.0G features='0' hwhandler='0' wp=rw
|-+- policy='service-time 0' prio=0 status=active
| `- 1:0:0:0 sdb 8:16 active active running
`-+- policy='service-time 0' prio=0 status=enabled
  `- 2:0:0:0 sdc 8:32 active active running

The above output shows 1 LUN (mpathb) with 2 paths (sdb and sdc). Linux Multipathing basic configuration is done.

Install XFS System Utilities

First, you need to install XFS system utilities, which allow you to perform various XFS related administration tasks (e.g., format, expand, repair, setting up quota, change parameters, etc).

On Debian, Ubuntu or Linux Mint:

$ sudo apt-get install xfsprogs

On Fedora, CentOS or RHEL:

$ sudo yum install xfsprogs

On Arch Linux:

$ sudo pacman -S xfsprogs

Create an XFS-Formatted Disk Partition

Now let’s first prepare a disk partition to create XFS on. Assuming that your disk is located at /dev/sdb, create a partition by:

$ sudo fdisk /dev/sdb

Let’s say the created partition is assigned /dev/sdb1 device name.

Next, format the partition as XFS using mkfs.xfs command. The “-f” option is needed if the partition has any other file system created on it, and you want to overwrite it.

$ sudo mkfs.xfs -f /dev/sdb1

Now you are ready to mount the formatted partition. Let’s assume that /storage is a local mount point for XFS. Go ahead and mount the partition by running:

$ sudo mount -t xfs /dev/sdb1 /storage

Verify that XFS mount is succesful by running:

$ df -Th /storage

If you want the XFS partition to be mounted at /storage automatically upon boot, add the following line to /etc/fstab.

/dev/sdb1 /storage xfs defaults 0 0

Src:

https://www.learnitguide.net/2016/06/how-to-configure-multipathing-in-linux.html
http://ask.xmodulo.com/create-mount-xfs-file-system-linux.html

Administrations Configurations (Linux) CentOSMultipathXFS

Post navigation

Previous post
Next post

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Myself…

Hi, I am Hasan T. Emdad Rumi, an IT Project Manager & Consultant, Virtualization & Cloud Savvyfrom Dhaka, Bangladesh. I have prior experience in managing numerous local and international projects in the area of Telco VAS & NMC, National Data Center & PKI Naitonal Root and CA Infrastructure. Also engaged with several Offshore Software Development Team.

Worked with Orascom Telecom-Banglalink, Network Elites as VAS partner, BTRC, BTT (Turkey) , Mango Teleservices Limited and Access to Informaiton (A2I-UNDP)

Currently working at Oracle Corporation as Principal Technology Solution and Cloud Architect.

You can reach me [h.t.emdad at gmail.com] and I will be delighted to exchange my views.

Tags

Apache Bind Cacti CentOS CentOS 6 CentOS 7 Debain Debian Debian 10 Debian 11 Debian 12 DKIM Docker endian icinga iptables Jitsi LAMP Letsencrypt Linux Munin MySQL Nagios Nextcloud NFS nginx pfsense php Postfix powerdns Proxmox RDP squid SSH SSL Ubuntu Ubuntu 16 Ubuntu 18 Ubuntu 20 Varnish virtualbox vpn Webmin XCP-NG zimbra

Topics

Recent Posts

  • Install Jitsi on Ubuntu 22.04 / 22.10 April 30, 2025
  • Key Lessons in life April 26, 2025
  • Create Proxmox Backup Server (PBS) on Debian 12 April 19, 2025
  • Add Physical Drive in Proxmox VM Guest April 19, 2025
  • Mount a drive permanently with fstab in Linux April 16, 2025
  • Proxmox 1:1 NAT routing March 30, 2025
  • Installation steps of WSL – Windows Subsystem for Linux March 8, 2025
  • Enabling Nested Virtualization In Proxmox March 8, 2025
  • How to Modify/Change console/SSH login banner for Proxmox Virtual Environment (Proxmox VE / PVE) March 3, 2025
  • Install Proxmox Backup Server on Debian 12 February 12, 2025

Archives

Top Posts & Pages

  • Install Jitsi on Ubuntu 22.04 / 22.10
©2025 Bots! | WordPress Theme by SuperbThemes