"Multipath" What does it do?

I´ve came across a problem lately where I plugged in an external hardrive into my centos box.

The stuff that was on it didn´t matter, I planned to use it as a backup disk for the files I actually care about to be around in case of a catastrophic failure.

So I opened the parted cli replaced the partition table with gpt and created one partition covering the entire drive. All good so far.

Then I wanted to format it to ext4 and it complained that the disk is already in use by the system.

Turns out it was used by something called multipath, Witch I´ve never heard about until this point. Running multipath -F fixed the issue and I could properly format the partition on the drive and mount it.

I searched online for what multipath would be. And yet I did´t really quite get it.

So my questions are mostly

  • What does it do to begin with?
  • Why would I want “multiple paths” to access the same damn thing?
  • What does multiple paths even mean. I´m thinking like “/mnt/my_amazing_hdd/somefolder” is obviously a paths to my understanding. But maybe the term is used to more than just simple file paths. In witch case I´ve never used this term like that in my life.
  • The only thing I could think about was a local path and a samba access url. But that´s not really having multiple paths (I don´t think?). I´d very much imagine samba internally uses the very same paths anyhow. So no multipathing going on what so ever. Just yet another thing that acesses the very same path internally.

Multipath is used to have redundancy to tolerate cable and controller failures . It means there are multiple physical connections (paths) to the same disk, so in case something happens to one path (ie hardware failure), the disk IO can take a different path so your server can still access the disk.

You want this so that your server is more reliable.

It doesn’t have anything to do with filesystem paths.

You should not be using this for an external hard drive (USB?).

Just to be picky, that’s exactly what it’s used for - that multi-rack SAN down the other end of the data centre is definitely external!

To be honest I’m kind of surprised that you’ve got it installed. It may be worth looking at removing that - just to avoid future complications.

Thanks for the responses.

I did not install it. At least I don´t think I did. It might have come with something else I´ve installed. Would have to install a new centos7 and look if it´s there. It might have come with ovirt if it wasn´t there already.

I don´t think I need it when my datacenter consists of a whooping ONE PCs, right? xD

I´ll look into disabling it and see if everything still works.