Вы находитесь на странице: 1из 8

GPFS Filesystems Live Migration into

New NSD Disks

This document describes how to migrate a GPFS filesystem from two LUN's (NSDs) to
Other two LUN's online.
April 2015
Below are the detailed procedures for GPFS filesystems live migration into new NSD
Disks.

01. Create the cluster


# mmcrcluster -N nodex:manager-quorum -p nodex -r /usr/bin/rsh -R /usr/bin/rcp
# mmlscluster
GPFS cluster information
========================
GPFS cluster name: nodex
GPFS cluster id: 2092711615137813735
GPFS UID domain: nodex
Remote shell command: /usr/bin/rsh
Remote file copy command: /usr/bin/rcp
GPFS cluster configuration servers:
----------------------------------Primary server: nodex
Secondary server: (none)
Node Daemon node name IP address Admin node name Designation
------------------------------------------------------------1 nodex 10.10.10.10 nodex quorum-manager

02- Start up the GPFS cluster:


# mmstartup -a

03- Create the NSDs:


# vi /etc/nsd.map
And add the below lines:
hdisk2:::dataAndMetadata::nsd1:

hdisk3:::dataAndMetadata::nsd2:
hdisk5:::dataAndMetadata::nsd3:
hdisk6:::dataAndMetadata::nsd4:
# mmcrnsd -F /etc/nsd.map
# cat /var/mmfs/gen/nsdpvol
hdisk2 nsd1
hdisk5 nsd3
hdisk3 nsd2
hdisk6 nsd4
# lspv | grep -i nsd
hdisk2 00ccfe74959d42c1 nsd1
hdisk5 00ccfe74538bed3e nsd3
hdisk3 00ccfe7463443e89 nsd2
hdisk6 00ccfe742f959246 nsd4

# mmlsnsd -L
File system Disk name NSD volume ID NSD servers
----------------------------------------------------(free disk) nsd1 09AFD3B4559FA9A2 (directly attached)
(free disk) nsd2 09AFD3B4559FA9A3 (directly attached)
(free disk) nsd3 09AFD3B4559FA9A4 (directly attached)
(free disk) nsd4 09AFD3B4559FAA0C (directly attached)

04- Create one gpfs filesystem (gpfs1) spanned on NSD1 & NSD2 only:
# mmcrfs gpfs1 nsd1
# mmadddisk gpfs1 nsd2
# mmlsnsd -L
File system Disk name NSD volume ID NSD servers
------------------------------------------------------------gpfs1 nsd1 09AFD3B4559FA9A2 (directly attached)
gpfs1 nsd2 09AFD3B4559FA9A3 (directly attached)
(free disk) nsd3 09AFD3B4559FA9A4 (directly attached)
(free disk) nsd4 09AFD3B4559FAA0C (directly attached)

05- Try filling out the gpfs1 filesystem:


# mmdf /dev/gpfs1
disk disk size failure holds holds free KB free KB
name in KB group metadata data in full blocks in fragments
--------------------------------------------------------------Disks in storage pool: system (Maximum disk size allowed is 14 GB)
nsd1 524288 -1 yes yes 335360 ( 64%) 976 ( 0%)
nsd2 524288 -1 yes yes 482304 ( 92%) 392 ( 0%)
--------------------------------------------------------------(pool total) 1048576 817664 ( 78%) 1368 ( 0%)
============= ==================== ===================
(total) 1048576 817664 ( 78%) 1368 ( 0%)

06- Suspened the gpfs1 on nsd1 && nsd2:


# mmchdisk gpfs1 suspend -d "nsd1;nsd2"
# mmlsdisk gpfs1

disk driver sector failure holds holds storage


name type size group metadata data status availability pool
----------------------------------------------------------nsd1 nsd 512 -1 yes yes suspended up system
nsd2 nsd 512 -1 yes yes suspended up system

07- Add the other two NSD's (NSD3,NSD4) to the gpfs1 filesystem:
# mmadddisk gpfs1 nsd3
# mmadddisk gpfs1 nsd4
# mmlsnsd -L
File system Disk name NSD volume ID NSD servers
--------------------------------------------------------------gpfs1 nsd1 09AFD3B4559FA9A2 (directly attached)
gpfs1 nsd2 09AFD3B4559FA9A3 (directly attached)
gpfs1 nsd3 09AFD3B4559FA9A4 (directly attached)
gpfs1 nsd4 09AFD3B4559FAA0C (directly attached)
# mmlsdisk gpfs1
disk driver sector failure holds holds storage
name type size group metadata data status availability pool
--------------------------------------------------------------nsd1 nsd 512 -1 yes yes suspended up system
nsd2 nsd 512 -1 yes yes suspended up system
nsd3 nsd 512 -1 yes yes ready up system
nsd4 nsd 512 -1 yes yes ready up system

08- Now, the migration will be done from suspened NSD's to ready NSD's:
# mmrestripefs gpfs1 -r
GPFS: 6027-589 Scanning file system metadata, phase 1 ...
GPFS: 6027-552 Scan completed successfully.
GPFS: 6027-589 Scanning file system metadata, phase 2 ...
GPFS: 6027-552 Scan completed successfully.
GPFS: 6027-589 Scanning file system metadata, phase 3 ...
GPFS: 6027-552 Scan completed successfully.
GPFS: 6027-589 Scanning file system metadata, phase 4 ...
GPFS: 6027-552 Scan completed successfully.
GPFS: 6027-565 Scanning user file metadata ...
100.00 % complete on Fri Jul 10 14:16:39 2015
GPFS: 6027-552 Scan completed successfully.

09- Delete NSD1, NSD2 from the gpfs1:


# mmdeldisk gpfs1 nsd1 ; mmdeldisk gpfs1 nsd2
Deleting disks ...
GPFS: 6027-589 Scanning file system metadata, phase 1 ...
GPFS: 6027-552 Scan completed successfully.
GPFS: 6027-589 Scanning file system metadata, phase 2 ...
GPFS: 6027-552 Scan completed successfully.
GPFS: 6027-589 Scanning file system metadata, phase 3 ...
GPFS: 6027-552 Scan completed successfully.
GPFS: 6027-589 Scanning file system metadata, phase 4 ...
GPFS: 6027-552 Scan completed successfully.
GPFS: 6027-565 Scanning user file metadata ...
100.00 % complete on Fri Jul 10 14:18:30 2015
GPFS: 6027-552 Scan completed successfully.
Checking Allocation Map for storage pool system
GPFS: 6027-370 tsdeldisk64 completed.
Deleting disks ...
GPFS: 6027-589 Scanning file system metadata, phase 1 ...
GPFS: 6027-552 Scan completed successfully.
GPFS: 6027-589 Scanning file system metadata, phase 2 ...

GPFS: 6027-552 Scan completed successfully.


GPFS: 6027-589 Scanning file system metadata, phase 3 ...
GPFS: 6027-552 Scan completed successfully.
GPFS: 6027-589 Scanning file system metadata, phase 4 ...
GPFS: 6027-552 Scan completed successfully.
GPFS: 6027-565 Scanning user file metadata ...
100.00 % complete on Fri Jul 10 14:18:58 2015
GPFS: 6027-552 Scan completed successfully.
Checking Allocation Map for storage pool system
GPFS: 6027-370 tsdeldisk64 completed.

10- Remove NSD1, NSD2 from the cluster:


# mmdelnsd nsd1 ; mmdelnsd nsd2
mmdelnsd: Processing disk nsd1
mmdelnsd: Processing disk nsd2
>> Checking the GPFS filesystem after migration <<
# mmlsnsd -L
File system Disk name NSD volume ID NSD servers
--------------------------------------------------------------gpfs1 nsd3 09AFD3B4559FA9A4 (directly attached)
gpfs1 nsd4 09AFD3B4559FAA0C (directly attached)
# mmlsdisk gpfs1
disk driver sector failure holds holds storage
name type size group metadata data status availability pool
--------------------------------------------------------------nsd3 nsd 512 -1 yes yes ready up system
nsd4 nsd 512 -1 yes yes ready up system
# mmdf /dev/gpfs1
disk disk size failure holds holds free KB free KB
name in KB group metadata data in full blocks in fragments

--------------------------------------------------------------Disks in storage pool: system (Maximum disk size allowed is 14 GB)


nsd3 524288 -1 yes yes 335360 ( 64%) 976 ( 0%)
nsd4 524288 -1 yes yes 482304 ( 92%) 392 ( 0%)
------------- -------------------- ------------------(pool total) 1048576 817664 ( 78%) 1368 ( 0%)
============= ==================== ===================
(total) 1048576 817664 ( 78%) 1368 ( 0%)

Tested and written by:


Ahmed Mashhour
EMEA TSS - AIX Technical Lead
ahdmashr@eg.ibm.com

Вам также может понравиться