How to Migrate iSCSI Multipath Storage Between Linux Servers Without Downtime
This guide walks through moving a large iSCSI multipath LVM/XFS volume from one Linux server to another, detailing each command, the troubleshooting of a superblock error caused by a typo in /etc/fstab, and best‑practice tips to avoid similar pitfalls.
Scenario
A friend has Server A that accesses a storage array via iSCSI multipath. Eight 58 TB disks are combined with multipath, then merged into a single LVM volume group and formatted with XFS, mounted at /var/www. The goal is to detach this storage from Server A and attach it to Server B.
Step‑by‑Step Migration
Stop all applications on Server A.
Kill any processes using the mount point: fuser -ck /var/www Unmount the filesystem: umount /var/www Disconnect all iSCSI sessions: iscsiadm -m node -U all Delete all node records: iscsiadm -m node --op delete On Server B, install multipath-tools and open‑iscsi, then copy the multipath.conf from Server A to /etc/.
Connect the iSCSI target to Server B and update the IQN of the initiator in the storage mapping.
Run discovery and login commands (replace <storage_ip> with the actual target IP):
iscsiadm -m discovery -t st -p <storage_ip>
iscsiadm -m node -p <storage_ip> -lEnable and start the iSCSI service:
systemctl enable iscsi.service
systemctl start iscsi.serviceSet node startup to automatic:
iscsiadm -m node -o update -n node.startup -v automaticRestart multipathd so the new LUNs are recognized.
Rescan LVM: lvscan The logical volumes should appear automatically; verify with vgs, pvs, and lvs.
Edit /etc/fstab to add the new mount point, then apply with:
mount -aObserved Issue
After the migration, running mount -a on Server B reports a superblock error, yet a manual mount works: mount /dev/mapper/datavg-datalv /mnt The filesystem is readable and writable, so the error is puzzling.
Troubleshooting
Running xfs_repair -n /dev/mapper/datavg-datalv shows no problems. Checking the kernel log with dmesg | tail reveals the message: unknown mount option [defautls] The /etc/fstab entry contains a typo: the mount option defaults was misspelled as defautls. Correcting the spelling eliminates the superblock error and allows mount -a to succeed.
Conclusion
The migration itself is straightforward, but a single character mistake in a configuration file caused a seemingly serious failure. Always back up configuration files and double‑check entries such as /etc/fstab before applying changes to avoid costly downtime.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
ITPUB
Official ITPUB account sharing technical insights, community news, and exciting events.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
