<div dir="ltr"><div>Thanks Andreas for your detailed reply.</div><div><br></div><div>I took your advice on the MDT0000 naming.</div><div>As now the migration is complete I want to share some major problems I had on the way.</div><div><br></div><div>I don't know where to point the blame, the Lustre kernel, e2fprogs, srp tools, multipath version, lvm version and moving from 512 blocks to 4096.</div><div>But as soon as I created the mirror, the server went into a kernel panic, core dump loop.</div><div><br></div><div>I managed to stop it only by breaking the mirror from another server connected to the same storage.</div><div>It took me a full day to recover the system.</div><div><br></div><div>Today I restarted the process, this time from a different server ,not running Lustre, which I already used for a vm lun lvm migration.</div><div>The exact same procedure ran flawlessly and I needed only to refresh the lvm on the MDS to be able to mount the migrated mdt.</div><div><br></div><div>Cheers,</div><div>David<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jul 19, 2020 at 12:27 PM Andreas Dilger <<a href="mailto:adilger@dilger.ca">adilger@dilger.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Jul 19, 2020, at 12:41 AM, David Cohen <<a href="mailto:cdavid@physics.technion.ac.il" target="_blank">cdavid@physics.technion.ac.il</a>> wrote:<br>
> <br>
> Hi,<br>
> We have a combined MGS+MDT and I'm looking for a migration to new storage with a minimal disruption to the running jobs on the cluster.<br>
> <br>
> Can anyone find problems in the scenario below and/or suggest another solution?<br>
> I would appreciate also "no problems" replies to reassure the scenario before I proceed.<br>
> <br>
> Current configuration:<br>
> The mdt is a logical volume in a lustre_pool VG on a /dev/mapper/MDT0001 PV<br>
<br>
I've been running Lustre on LVM at home for many years, and have done pvmove<br>
of the underlying storage to new devices without any problems.<br>
<br>
> Migration plan:<br>
> Add /dev/mapper/MDT0002 new disk (multipath)<br>
<br>
I would really recommend that you *not* use MDT0002 as the name of the PV.<br>
This is very confusing because the MDT itself (at the Lustre level) is<br>
almost certainly named "<fsname>-MDT0000", and if you ever add new MDTs to<br>
this filesystem it will be confusing as to which *Lustre* MDT is on which<br>
underlying PV.  Instead, I'd take the opportunity to name this "MDT0000" to<br>
match the actual Lustre MDT0000 target name.<br>
<br>
> extend the VG:<br>
> pvcreate /dev/mapper/MDT0002<br>
> vgextend  lustre_pool /dev/mapper/MDT0002<br>
> mirror the mdt to the new disk:<br>
> lvconvert -m 1 /dev/lustre_pool/TECH_MDT /dev/mapper/MDT0002<br>
<br>
I typically just use "pvmove", but doing this by adding a mirror and then<br>
splitting it off is probably safer.  That would still leave you with a full<br>
copy of the MDT on the original PV if something happened in the middle.<br>
<br>
> wait the mirrored disk to sync:<br>
> lvs -o+devices<br>
> when it's fully synced unmount the MDT, remove the old disk from the mirror:<br>
> lvconvert -m 0 /dev/lustre_pool/TECH_MDT /dev/mapper/MDT0001<br>
> and remove the old disk from the pool:<br>
> vgreduce lustre_pool /dev/mapper/MDT0001<br>
> pvremove /dev/mapper/MDT0001<br>
> remount the MDT and let the clients few minutes to recover the connection.<br>
<br>
In my experience with pvmove, there is no need to do anything with the clients,<br>
as long as you are not also moving the MDT to a new server, since the LVM/DM<br>
operations are totally transparent to both the Lustre server and client.<br>
<br>
After my pvmove (your "lvconvert -m 0"), I would just vgreduce the old PV from<br>
the VG, and then leave it in the system (internal HDD) until the next time I<br>
needed to shut down the server.  If you have hot-plug capability for the PVs,<br>
then you don't even need to wait for that.<br>
<br>
Cheers, Andreas<br>
<br>
<br>
<br>
<br>
<br>
</blockquote></div></div>