Thursday 9 May 2013

Adding a disk to GPFS filesystem Dynamically

Objectives:

* Add a disk to a storage pool online
* Re-balance existing data in the file system

Prerequisite:

1. GPFS cluster is up and running
2. GPFS File System is mounted.
3. Device to add is ready (hdiskxx)

Step 1: Add a disk to the existing file system

1. Verify that GPFS is running and the file system is mounted using the mmgetstate command and the df command

   a. The mmgetstate command will show the status of the nodes in the cluster.
   > mmgetstate -a
   b. The df command will display the mounted GPFS file system.
      df

2. Create a disk descriptor file /gpfs-to-extend/data/adddisk.txt for the new disk using the format

    #DiskName:serverlist::DiskUsage:FailureGroup:DesiredName:StoragePool
    hdiskxx:::dataOnly::nsd5:pool1

3. Use the mmcrnsd command to create the NSD

    > mmcrnsd -F /gpfs-to-extend/data/adddisk.txt

4. Verify the disk has been created using the mmlsnsd command

   > mmlsnsd

   The disk you just added should show as a (free disk)

5. Add the new NSD to the fs1 file system using the mmadddisk command

    > mmadddisk fs1 -F /gpfs-to-extend/data/adddisk.txt

6. Verify the NSD was added using the mmdf command

    > mmdf fs1

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
nsd1                 20971520       1 yes      yes        20873984 (100%)           284 ( 0%)
nsd2                 20971520       2 yes      yes        20873984 (100%)           202 ( 0%)
————-                         ——————– ——————-
(pool total)         41943040                              41747968 (100%)           486 ( 0%)
Disks in storage pool: pool1
nsd3                 20971520       1 no       yes        20969408 (100%)            62 ( 0%)
nsd4                 20971520       2 no       yes        20969408 (100%)            62 ( 0%)
nsd5                 20971520      -1 no       yes        20969408 (100%)            62 ( 0%)
————-                         ——————– ——————-
(pool total)         62914560                              62908224 (100%)           186 ( 0%)
=============                         ==================== ===================
(data)              104857600                             104656192 (100%)           672 ( 0%)
(metadata)           41943040                              41747968 (100%)           486 ( 0%)
=============                         ==================== ===================
(total)             104857600                             104656192 (100%)           672 ( 0%)
Inode Information
—————–
Number of used inodes:            4045
Number of free inodes:           78131
Number of allocated inodes:      82176
Maximum number of inodes:        82176

Step 2: Re-balancing the data

In some cases you may wish to have GPFS re-balance existing data over the new disks that were added to the file system. Often it is not necessary to manually re-balance the data across the new disks. New data that is added to the file system is correctly striped. Re-striping a large file system requires a large number of insert and delete operations and may affect system performance. Plan to perform this task when system demand is low.

1. To re-balance the existing data in the file system use the mmrestripefs command.
     > mmrestripefs fs1 -b
2. Use the mmdf command to view the utilization of each disk.

0 blogger-disqus:

Post a Comment