How to do Online Storage Migration in Unix/Linux

Storage migration is the day to day activity of every Linux/Unix system administrator. In IT production environment we have to move data from one LUN (logical unit number) to another very safely without any downtime or less downtime and without corrupting the data. In this tutorial we will show you how you can safely and easily do online storage migration in your Linux/UNIX server whether it is physical server or virtual.

Generally in Unix environment storage migration is mainly done on physical servers where new LUN’s are assigned from SAN and old SAN storage LUN’s are given back to them. Storage migration involves assigning of new storage LUN’s, scanning them, moving data from old storage to new ones and then removing the old LUNs and giving them back. 🙂

Steps to do Online Storage Migration in Linux/UNIX

1. The first step for storage migration is the availability of new LUN’s where you want to migrate your data from old storage device. Once the storage is assigned from SAN team, you can do online SCAN. Please refer to below article for reference. You can use same article for physical servers also.

3. Once your VG’s or VG are extended, you can migrate your data to new physical volumes which you have just created on new storage LUN’s. You can use pvmove command for this. You can do one to one mapping of physical volume or you can also move data of one logical volume at a time.

For moving data or physical extents from one pv to another use below command syntax.

After you have remove your block device, you can handover LUN’s to your storage team and asked them to reclaim them. This was a simple tutorial on how to do online storage migration in Linux/Unix servers. Do let us know if you face any issue with storage migration activity. You can mail us, like us on Facebook and comment for your query.