Іноді Network IDentifier (NID) MGS/MDS/OSS може змінюватися. Наприклад при перенесенні на нову апаратуру, встановленні нової мережевої карти, чи просто присвоєнню нової IP-адреси.
Описано цей процес тут: "14.5 Changing a Server NID" (Lustre 2.0 Operations Manual), хоча деяких деталей там не вказано.
Покажемо його на прикладі зміни NID MGS нашої іграшкової Lustre.
Припустимо, що мережева адреса MGS змінюватиметься з node на new-mgs
1. Такяк мережевий інтерфейс залишається тим сами, змінювати конфігурацію LNET в /etc/modprobe.conf немає потреби.
2. Розмонтовуємо всі частини люстри у вказаному порядку:
- Всі клієти
- MDT
- Всі OST
- MGS
Зазвичай Lustre терпима до порядку монтування/розмонтування, але в цьому випадку слід дотриматися вказаного, інакше можливі труднощі в подальших етапах.
3. Якщо б змінювалися адреси тільки MDS чи OSS, достатньо було б виконати "tunefs.lustre --writeconf <device>" на всіх них. Однак, змінено адресу (NID) MGS, тому слід робити erase-params, вказуючи нові параметри. Щоб не знищити важливі параметри, що вже були встановлені, слід скористатися "tunefs.lustre --dryrun --writeconf <device>", (як і в пості про квоти), щоб отримати їх значення та відтворити.
MDT:
[root@node]# tunefs.lustre --erase-param --mgsnode=<new-mgs-ip>@tcp0 /dev/loop1
checking for existing Lustre data: found CONFIGS/mountdata
Reading CONFIGS/mountdata
Read previous values:
Target: lustre9-MDT0000
Index: 0
Lustre FS: lustre9
Mount type: ldiskfs
Flags: 0x1
(MDT )
Persistent mount opts: iopen_nopriv,user_xattr,errors=remount-ro
Parameters: mgsnode=<node-ip>@tcp
Permanent disk data:
Target: lustre9-MDT0000
Index: 0
Lustre FS: lustre9
Mount type: ldiskfs
Flags: 0x41
(MDT update )
Persistent mount opts: iopen_nopriv,user_xattr,errors=remount-ro
Parameters: mgsnode=<new-mgs-ip>@tcp
Writing CONFIGS/mountdata
Всі OST:
[root@node]# tunefs.lustre --erase-param --mgsnode=<new-mgs-ip>@tcp0 --param="failover.mode=failout" /dev/loop2
checking for existing Lustre data: found CONFIGS/mountdata
Reading CONFIGS/mountdata
Read previous values:
Target: lustre9-OST0000
Index: 0
Lustre FS: lustre9
Mount type: ldiskfs
Flags: 0x2
(OST )
Persistent mount opts: errors=remount-ro,extents,mballoc
Parameters: mgsnode=<node-ip>@tcp failover.mode=failout
Permanent disk data:
Target: lustre9-OST0000
Index: 0
Lustre FS: lustre9
Mount type: ldiskfs
Flags: 0x42
(OST update )
Persistent mount opts: errors=remount-ro,extents,mballoc
Parameters: mgsnode=<new-mgs-ip>@tcp failover.mode=failout
Writing CONFIGS/mountdata[root@node]# tunefs.lustre --erase-param --mgsnode=<new-mgs-ip>@tcp0 --param="failover.mode=failout" /dev/loop3
checking for existing Lustre data: found CONFIGS/mountdata
Reading CONFIGS/mountdata
Read previous values:
Target: lustre9-OST0001
Index: 1
Lustre FS: lustre9
Mount type: ldiskfs
Flags: 0x2
(OST )
Persistent mount opts: errors=remount-ro,extents,mballoc
Parameters: mgsnode=<node-ip>@tcp failover.mode=failout
Permanent disk data:
Target: lustre9-OST0001
Index: 1
Lustre FS: lustre9
Mount type: ldiskfs
Flags: 0x42
(OST update )
Persistent mount opts: errors=remount-ro,extents,mballoc
Parameters: mgsnode=<new-mgs-ip>@tcp failover.mode=failout
Writing CONFIGS/mountdata
Важливо: для OSS слід вказати failover.mode=failout, інакше Lustre працювати не буде (MDS відмовиться їх "визнавати")
Тепер робимо --writeconf для всіх елементів:
[root@new-mgs]# tunefs.lustre --writeconf /dev/loop0
checking for existing Lustre data: found CONFIGS/mountdata
Reading CONFIGS/mountdata
Read previous values:
Target: MGS
Index: unassigned
Lustre FS: lustre
Mount type: ldiskfs
Flags: 0x74
(MGS needs_index first_time update )
Persistent mount opts: iopen_nopriv,user_xattr,errors=remount-ro
Parameters:
Permanent disk data:
Target: MGS
Index: unassigned
Lustre FS: lustre
Mount type: ldiskfs
Flags: 0x174
(MGS needs_index first_time update writeconf )
Persistent mount opts: iopen_nopriv,user_xattr,errors=remount-ro
Parameters:
Writing CONFIGS/mountdata
------------------------------------------------------------
[root@node]# tunefs.lustre --writeconf /dev/loop1
checking for existing Lustre data: found CONFIGS/mountdata
Reading CONFIGS/mountdata
Read previous values:
Target: lustre9-MDT0000
Index: 0
Lustre FS: lustre9
Mount type: ldiskfs
Flags: 0x41
(MDT update )
Persistent mount opts: iopen_nopriv,user_xattr,errors=remount-ro
Parameters: mgsnode=<new-mgs-ip>@tcp
Permanent disk data:
Target: lustre9-MDT0000
Index: 0
Lustre FS: lustre9
Mount type: ldiskfs
Flags: 0x141
(MDT update writeconf )
Persistent mount opts: iopen_nopriv,user_xattr,errors=remount-ro
Parameters: mgsnode=<new-mgs-ip>@tcp
Writing CONFIGS/mountdata
-------------------------------------------------------------------
[root@node]# tunefs.lustre --writeconf /dev/loop2
checking for existing Lustre data: found CONFIGS/mountdata
Reading CONFIGS/mountdata
Read previous values:
Target: lustre9-OST0000
Index: 0
Lustre FS: lustre9
Mount type: ldiskfs
Flags: 0x42
(OST update )
Persistent mount opts: errors=remount-ro,extents,mballoc
Parameters: mgsnode=<new-mgs-ip>@tcp failover.mode=failout
Permanent disk data:
Target: lustre9-OST0000
Index: 0
Lustre FS: lustre9
Mount type: ldiskfs
Flags: 0x142
(OST update writeconf )
Persistent mount opts: errors=remount-ro,extents,mballoc
Parameters: mgsnode=<new-mgs-ip>@tcp failover.mode=failout
Writing CONFIGS/mountdata
-------------------------------------------------------------------
[root@node]# tunefs.lustre --writeconf /dev/loop3
checking for existing Lustre data: found CONFIGS/mountdata
Reading CONFIGS/mountdata
Read previous values:
Target: lustre9-OST0001
Index: 1
Lustre FS: lustre9
Mount type: ldiskfs
Flags: 0x42
(OST update )
Persistent mount opts: errors=remount-ro,extents,mballoc
Parameters: mgsnode=<new-mgs-ip>@tcp failover.mode=failout
Permanent disk data:
Target: lustre9-OST0001
Index: 1
Lustre FS: lustre9
Mount type: ldiskfs
Flags: 0x142
(OST update writeconf )
Persistent mount opts: errors=remount-ro,extents,mballoc
Parameters: mgsnode=<new-mgs-ip>@tcp failover.mode=failout
Writing CONFIGS/mountdata
4. Монтуємо всі елементи.
Порядок монтування важливи! Зазвичай "Люстра" толерантна до порядку монтування, але в даному випадку це важливо.
- MGS
- MDT
- Всі OST
- Клієнти.
[root@new-mgs]# mount -t lustre /dev/loop0 ./mgs
[root@node]# mount -t lustre /dev/loop1 /mnt/mdt/ [root@node]# mount -t lustre /dev/loop2 /mnt/ost0 [root@node]# mount -t lustre /dev/loop3 /mnt/ost1 [root@node]# mount -t lustre <new-mgs>@tcp0:/lustre9 /mnt/lustre9
NID MDS успішно змінено.
Немає коментарів:
Дописати коментар