[LU-4138] Problem with migrating from 1 MDT to 2 MDT Created: 23/Oct/13 Updated: 08/May/15 Resolved: 08/May/15 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.4.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Haisong Cai (Inactive) | Assignee: | Minh Diep |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Sdsc | ||
| Environment: |
CentOS 6.3, Lustre 2.4.0 |
||
| Severity: | 3 |
| Rank (Obsolete): | 11229 |
| Description |
|
Background: Objective is to upgrade our Lustre software from 1.8.7 to 2.4.*. The requirement is, all data will be in place during the upgrade/MDS = We went though Lustre software upgrading from 1.8.7 (CentOS/el5) to = We then configured 2 other machines for the new MDS servers. = We formated MDT in new MDS mkfs.lustre --reformat --fsname=rhino --param mdt.quota_type=ug --mgs --mdt --index=0 /dev/md0 = We copy the existing MDT contents and ea.bak files over the new server. /usr/local/bin/tar czvf /share/apps/tmp/rhino_mdt.tgz --sparse . getfattr = We then run /usr/local/bin/tar xzvpf /share/apps/tmp/rhino_mdt.tgz --sparse setfattr --restore=/share/apps/tmp/ea-20131023.bak = We attempted to mount new MDT: mount -t lustre /dev/md1 /rhino = We got errors: mount.lustre: mount /dev/md1 at /rhino failed: File exists [from dmesg] LDISKFS-fs (md1): mounted filesystem with ordered data mode. quota=on. Opts: |
| Comments |
| Comment by Peter Jones [ 24/Oct/13 ] |
|
Yu, Jian Could you please advise on this one Peter |
| Comment by Minh Diep [ 24/Oct/13 ] |
|
Haisong, I just noticed this the ip address on the MGC seems to be the old/previous ip, can you confirm? If you moved the MDS with ip change, we should --writeconf to wipe the ip as well, no? |
| Comment by Andreas Dilger [ 24/Oct/13 ] |
|
Better would be to use "lctl --replace-nids" instead of a whole writeconf c |
| Comment by Andreas Dilger [ 24/Oct/13 ] |
|
I think the goal is to replace the old MDS hardware with a new node and disks. Lustre is confused because you are formatting the new MDS and then restoring from the tar backup, but for some reason the MDT thinks it is new. Maybe the label on the MDS needs to be fixed? What does "e2label /dev/md1" report? I submitted a patch under Note that I would also recommend to use Lustre 2.4.1 instead of 2.4.0 so you get the other fixes included there. |
| Comment by Minh Diep [ 24/Oct/13 ] |
the new server has been configure with the same ip address as the old one. My question above was incorrect because I login a different server. We tried the lctl replace_nids /dev/md1 nids but it require to have mgt/mdt mounted which failed [root@lustre-mds-0-0 modprobe.d]# lctl replace_nids /dev/md1 192.168.95.245@tcp |
| Comment by Minh Diep [ 24/Oct/13 ] |
|
here are the command that I ran to make it worked. I will try a couple more different scenarios 658 reboot |
| Comment by Jian Yu [ 25/Oct/13 ] |
|
Hi Minh,
IMHO, "--reformat" option is not needed here. So, do I understand correctly that running "tunefs.lustre --writeconf" can resolve the original "index is already in use" failure because "LDD_F_WRITECONF" flag is set? |
| Comment by Minh Diep [ 25/Oct/13 ] |
|
Hi YuJian, no, tunefs.lustre --writeconf --mgs --mdt /dev/md0 did not solve the issue. In this case, this is a bug. |
| Comment by Haisong Cai (Inactive) [ 08/Nov/13 ] |
|
Minh, The IP address is the one from previous server running 1.8.7. It's true that in our test case, MGC192.168.95.245@tcp was used by Haisong |
| Comment by Minh Diep [ 14/Nov/13 ] |
|
I found that we needed to --writeconf and unmount all the OST while working on the MDS/MDT. So far it seems like user error. I will take this bug and verify further. |
| Comment by Minh Diep [ 15/Nov/13 ] |
|
Procedure to restore and upgrade MDS and add another MDT On MDS0 1. mkfs.lustre --reformat --fsname=rhino --param mdt.quota_type=ug --mgs --mdt --index=0 /dev/md0 On MDS1 1. mkfs.lustre --reformat --fsname rhino --param mdt.quota_type=ug --mgsnode <MDS0 nid> --failnode <MDS0 nid> --mdt --index 1 /dev/md1 On OSS (repeat on all OSS) 1. Tunefs.lustre —-erase-params /dev/sdb (repeat for all devices) On Clients Mount –t lustre <MDS0 nid>:<MDS1 nid>:/rhino /rhino NOTE: do not use --servicenode option due to |
| Comment by Minh Diep [ 21/Nov/13 ] |
|
latest status: We were able to test the failover while traffics going to both MDTs. SDSC continue testing and will tear the test cluster down and start over again from 1.8.9 to make sure before the production upgrade |
| Comment by John Fuchs-Chesney (Inactive) [ 12/Mar/14 ] |
|
Hello Minh and Haisong, |
| Comment by Minh Diep [ 12/Mar/14 ] |
|
sure, you can close it for now. we'll open when we move to 2 MDT later this year |
| Comment by Andreas Dilger [ 08/May/15 ] |
|
Closing per last comments. Note that with newer Lustre it is possible to use mkfs.lustre --replace --index=0 to replace an existing target with one that has been restored from a file-level backup. This has been tested with OST replacement, but it should also work with MDTs (it marks the target so that it doesn't try to register with the MGS as a new device). |