2010年4月28日 星期三

Ceph install on Fedora

Ceph, 另外一套分散式檔案系統,是人家的PhD論文發展來的(外國論文實做能力都超強的 *_*),一樣是 POSIX-compatible, 目前尚處於開發階段,不適用於 production 環境。

針對其架構介紹,在 Linux Magazine 有篇簡單的介紹:Ceph: The Distributed File System Creature from the Object Lagoon

目前我選擇在 Fedora 上安裝,主要原因是目前測試過的大多數檔案系統,對於 RHEL, SuSE like 的作業系統支援度,都相較於其他 OS 為高,只是想避免一些不必要的麻煩。

OS: Fedora 12
Kernel: 2.6.34-rc3

Step1. Build Ceph Client
目前 Ceph 已經 merge 進 2.6.34 了,因此在安裝上會相對的簡單許多。

Check out new kernel source and compile

# cd /usr/src/kernels
# git clone git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client.git
# cd ceph-client/
# make menuconfig

選擇 Ceph 成 module 或 build-in 到 kernel 裡
由於 Ceph 已經放棄原本的 Ebofs, 轉而用 Btrfs 取代之,因此也將 Btrfs 編進去吧。
編譯好重開後,系統應已支援這兩種檔案系統。

Step2. 準備 OSD 空間
此步驟重複於所有希望當 OSD 的結點。

Partion 切割

你可以使用 fdisk, cfdisk((util-linux-ng) 或其他你善用的工作來進行 partition 切割。

# fdisk /dev/cciss/c0d2

The number of cylinders for this disk is set to 8716.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-8716, default 1): 1
Last cylinder, +cylinders or +size{K,M,G} (1-8716, default 8716): 8716

Command (m for help): p

Disk /dev/cciss/c0d2: 36.4 GB, 36414750720 bytes
255 heads, 32 sectors/track, 8716 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes
Disk identifier: 0x0004f893

Device Boot Start End Blocks Id System
/dev/cciss/c0d2p1 1 8716 35561264 83 Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

# mkdir /mnt/btrfs
# cd /mnt/btrfs/
# mkdir osd0 osd1

格式化硬碟

# yum install btrfs-progs.i686
# mkfs.btrfs /dev/cciss/c0d2p1

WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using

fs created label (null) on /dev/cciss/c0d2p1
nodesize 4096 leafsize 4096 sectorsize 4096 size 33.91GB
Btrfs Btrfs v0.19

OSD local 硬碟掛載

# mount -t btrfs /dev/cciss/c0d2p1 /mnt/btrfs/osd0/
# mount -t btrfs /dev/cciss/c0d3p1 /mnt/btrfs/osd1
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_f172-lv_root
32G 6.2G 24G 21% /
tmpfs 503M 0 503M 0% /dev/shm
/dev/cciss/c0d0p1 194M 37M 147M 20% /boot
/dev/cciss/c0d2p1 34G 56K 32G 1% /mnt/btrfs/osd0
/dev/cciss/c0d3p1 34G 56K 32G 1% /mnt/btrfs/osd1

# umount /mnt/btrfs/osd0 /mnt/btrfs/osd1 (格式化、掛載 osd disk 等動作由 Step5, Step6 時,由該 script 來執行,在此僅確認這些硬碟都 ok)

Step3. 編譯 Ceph 套件
此步驟重覆於所有結點

取得 Ceph source code

# cd /usr/src
# git clone git://ceph.newdream.net/ceph.git
Initialized empty Git repository in /usr/src/ceph/.git/
remote: Counting objects: 79397, done.
remote: Compressing objects: 100% (19438/19438), done.
remote: Total 79397 (delta 64545), reused 73253 (delta 58751)
Receiving objects: 100% (79397/79397), 15.10 MiB | 3.17 MiB/s, done.
Resolving deltas: 100% (64545/64545), done.

安裝必要檔案

# yum install boost.i686
# yum install boost-devel.i686
# yum install libedit-devel.i686
# yum install openssl.i686
# yum install openssl-devel.i686

編譯 Ceph

# cd /usr/src/ceph/
# more INSTALL
# ./autogen.sh
# ./configure
# make
# make install

Step4. 設定

確認所有結點間,皆可透過 ssh, 以無密碼方式登入。
這部分做法請參考:SSH Login Without Password

ceph.conf, 確認每個結點這部分設定都相同

# cd /mnt/btrfs/
# mkdir mon0
# cd /usr/local/etc/ceph/
# cat ceph.conf
===
;
; Sample ceph ceph.conf file.
;
; This file defines cluster membership, the various locations
; that Ceph stores data, and any other runtime options.

; If a 'host' is defined for a daemon, the start/stop script will
; verify that it matches the hostname (or else ignore it). If it is
; not defined, it is assumed that the daemon is intended to start on
; the current host (e.g., in a setup with a startup.conf on each
; node).

; global
[global]
pid file = /var/run/ceph/$name.pid

; some minimal logging (just message traffic) to aid debugging
debug ms = 1

; monitor
[mon]
mon data = /mnt/btrfs/mon$id

[mon0]
host = node181
mon addr = 10.0.0.181:6789

; mds
[mds]

[mds.node181]
host = node181

; osd
[osd]
sudo = true
osd data = /mnt/btrfs/osd$id

[osd0]
host = node172

; if 'btrfs devs' is not specified, you're responsible for
; setting up the 'osd data' dir. if it is not btrfs, things
; will behave up until you try to recover from a crash (which
; usually fine for basic testing).
btrfs devs = /dev/cciss/c0d2p1
osd data = /mnt/btrfs/osd0

[osd1]
host = node172
btrfs devs = /dev/cciss/c0d3p1
osd data = /mnt/btrfs/osd1

[osd2]
host = node173
btrfs devs = /dev/cciss/c0d2p1
osd data = /mnt/btrfs/osd2

[osd3]
host = node173
btrfs devs = /dev/cciss/c0d3p1
osd data = /mnt/btrfs/osd3

; access control
[group everyone]
; you probably want to limit this to a small or a list of
; hosts. clients are fully trusted.
addr = 0.0.0.0/0

[mount /]
allow = %everyone
===

Step5. Create file system

[root@f181 ceph]# mkcephfs -c /usr/local/etc/ceph/ceph.conf --allhosts --mkbtrfs
/usr/local/bin/monmaptool --create --clobber --add 10.0.0.181:6789 --print /tmp/monmap.2319
/usr/local/bin/monmaptool: monmap file /tmp/monmap.2319
/usr/local/bin/monmaptool: generated fsid ef8475d4-52ea-d6f6-f75b-b331c34b9a43
epoch 1
fsid ef8475d4-52ea-d6f6-f75b-b331c34b9a43
last_changed 10.04.24 20:10:01.089929
created 10.04.24 20:10:01.089929
mon0 10.0.0.181:6789/0
/usr/local/bin/monmaptool: writing epoch 1 to /tmp/monmap.2319 (1 monitors)
max osd in /usr/local/etc/ceph/ceph.conf is 3, num osd is 4
/usr/local/bin/osdmaptool: osdmap file '/tmp/osdmap.2319'
/usr/local/bin/osdmaptool: writing epoch 1 to /tmp/osdmap.2319
Building admin keyring at /tmp/admin.keyring.2319
creating /tmp/admin.keyring.2319
Building monitor keyring with all service keys
creating /tmp/monkeyring.2319
importing contents of /tmp/admin.keyring.2319 into /tmp/monkeyring.2319
creating /tmp/keyring.mds.node181
importing contents of /tmp/keyring.mds.node181 into /tmp/monkeyring.2319
creating /tmp/keyring.osd.0
importing contents of /tmp/keyring.osd.0 into /tmp/monkeyring.2319
creating /tmp/keyring.osd.1
importing contents of /tmp/keyring.osd.1 into /tmp/monkeyring.2319
creating /tmp/keyring.osd.2
importing contents of /tmp/keyring.osd.2 into /tmp/monkeyring.2319
creating /tmp/keyring.osd.3
importing contents of /tmp/keyring.osd.3 into /tmp/monkeyring.2319
=== mon0 ===
10.04.24 20:10:02.245494 store(/mnt/btrfs/mon0) mkfs
10.04.24 20:10:02.245722 store(/mnt/btrfs/mon0) test -d /mnt/btrfs/mon0 && /bin/rm -rf /mnt/btrfs/mon0 ; mkdir -p /mnt/btrfs/mon0
10.04.24 20:10:02.581627 mon0(starting).class v0 create_initial -- creating initial map
10.04.24 20:10:02.692877 mon0(starting).auth v0 create_initial -- creating initial map
10.04.24 20:10:02.692940 mon0(starting).auth v0 reading initial keyring
/usr/local/bin/mkmonfs: created monfs at /mnt/btrfs/mon0 for mon0
admin.keyring.2319 100% 119 0.1KB/s 00:00
=== mds.node181 ===
WARNING: no keyring specified for mds.node181
=== osd0 ===
umount: /mnt/btrfs/osd0: not mounted
umount: /dev/cciss/c0d2p1: not mounted
FATAL: Module btrfs not found.

WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using

fs created label (null) on /dev/cciss/c0d2p1
nodesize 4096 leafsize 4096 sectorsize 4096 size 33.91GB
Btrfs Btrfs v0.19
FATAL: Module btrfs not found.
Scanning for Btrfs filesystems
failed to read /dev/loop7
failed to read /dev/loop6
failed to read /dev/loop5
failed to read /dev/loop4
failed to read /dev/loop3
failed to read /dev/loop2
failed to read /dev/loop1
failed to read /dev/loop0
monmap.2319 100% 187 0.2KB/s 00:00
** WARNING: Ceph is still under heavy development, and is only suitable for **
** testing and review. Do not trust it with important data. **
created object store for osd0 fsid ef8475d4-52ea-d6f6-f75b-b331c34b9a43 on /mnt/btrfs/osd0
WARNING: no keyring specified for osd0
=== osd1 ===
umount: /mnt/btrfs/osd1: not mounted
umount: /dev/cciss/c0d3p1: not mounted
FATAL: Module btrfs not found.

WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using

fs created label (null) on /dev/cciss/c0d3p1
nodesize 4096 leafsize 4096 sectorsize 4096 size 33.91GB
Btrfs Btrfs v0.19
FATAL: Module btrfs not found.
Scanning for Btrfs filesystems
failed to read /dev/loop7
failed to read /dev/loop6
failed to read /dev/loop5
failed to read /dev/loop4
failed to read /dev/loop3
failed to read /dev/loop2
failed to read /dev/loop1
failed to read /dev/loop0
monmap.2319 100% 187 0.2KB/s 00:00
** WARNING: Ceph is still under heavy development, and is only suitable for **
** testing and review. Do not trust it with important data. **
created object store for osd1 fsid ef8475d4-52ea-d6f6-f75b-b331c34b9a43 on /mnt/btrfs/osd1
WARNING: no keyring specified for osd1
=== osd2 ===
umount: /mnt/btrfs/osd2: not mounted
umount: /dev/cciss/c0d2p1: not mounted
FATAL: Module btrfs not found.

WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using

fs created label (null) on /dev/cciss/c0d2p1
nodesize 4096 leafsize 4096 sectorsize 4096 size 33.91GB
Btrfs Btrfs v0.19
FATAL: Module btrfs not found.
Scanning for Btrfs filesystems
failed to read /dev/loop7
failed to read /dev/loop6
failed to read /dev/loop5
failed to read /dev/loop4
failed to read /dev/loop3
failed to read /dev/loop2
failed to read /dev/loop1
failed to read /dev/loop0
monmap.2319 100% 187 0.2KB/s 00:00
** WARNING: Ceph is still under heavy development, and is only suitable for **
** testing and review. Do not trust it with important data. **
created object store for osd2 fsid ef8475d4-52ea-d6f6-f75b-b331c34b9a43 on /mnt/btrfs/osd2
WARNING: no keyring specified for osd2
=== osd3 ===
umount: /mnt/btrfs/osd3: not mounted
umount: /dev/cciss/c0d3p1: not mounted
FATAL: Module btrfs not found.

WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using

fs created label (null) on /dev/cciss/c0d3p1
nodesize 4096 leafsize 4096 sectorsize 4096 size 33.91GB
Btrfs Btrfs v0.19
FATAL: Module btrfs not found.
Scanning for Btrfs filesystems
failed to read /dev/loop7
failed to read /dev/loop6
failed to read /dev/loop5
failed to read /dev/loop4
failed to read /dev/loop3
failed to read /dev/loop2
failed to read /dev/loop1
failed to read /dev/loop0
monmap.2319 100% 187 0.2KB/s 00:00
** WARNING: Ceph is still under heavy development, and is only suitable for **
** testing and review. Do not trust it with important data. **
created object store for osd3 fsid ef8475d4-52ea-d6f6-f75b-b331c34b9a43 on /mnt/btrfs/osd3
WARNING: no keyring specified for osd3

Step6. 啟動 Ceph Server

[root@f181 ceph]# cd /usr/src/ceph/src/
[root@f181 src]# ./init-ceph -a -c /usr/local/etc/ceph/ceph.conf start
=== mon0 ===
Starting Ceph mon0 on node181...
** WARNING: Ceph is still under heavy development, and is only suitable for **
** testing and review. Do not trust it with important data. **
starting mon0 at 10.0.0.181:6789/0 mon_data /mnt/btrfs/mon0 fsid ef8475d4-52ea-d6f6-f75b-b331c34b9a43
=== mds.node181 ===
Starting Ceph mds.node181 on node181...
** WARNING: Ceph is still under heavy development, and is only suitable for **
** testing and review. Do not trust it with important data. **
starting mds.node181 at 0.0.0.0:6800/3219
=== osd0 ===
Mounting Btrfs on node172:/mnt/btrfs/osd0
FATAL: Module btrfs not found.
Scanning for Btrfs filesystems
failed to read /dev/loop7
failed to read /dev/loop6
failed to read /dev/loop5
failed to read /dev/loop4
failed to read /dev/loop3
failed to read /dev/loop2
failed to read /dev/loop1
failed to read /dev/loop0
Starting Ceph osd0 on node172...
** WARNING: Ceph is still under heavy development, and is only suitable for **
** testing and review. Do not trust it with important data. **
starting osd0 at 0.0.0.0:6800/3484 osd_data /mnt/btrfs/osd0 (no journal)
=== osd1 ===
Mounting Btrfs on node172:/mnt/btrfs/osd1
FATAL: Module btrfs not found.
Scanning for Btrfs filesystems
failed to read /dev/loop7
failed to read /dev/loop6
failed to read /dev/loop5
failed to read /dev/loop4
failed to read /dev/loop3
failed to read /dev/loop2
failed to read /dev/loop1
failed to read /dev/loop0
Starting Ceph osd1 on node172...
** WARNING: Ceph is still under heavy development, and is only suitable for **
** testing and review. Do not trust it with important data. **
starting osd1 at 0.0.0.0:6802/3717 osd_data /mnt/btrfs/osd1 (no journal)
=== osd2 ===
Mounting Btrfs on node173:/mnt/btrfs/osd2
FATAL: Module btrfs not found.
Scanning for Btrfs filesystems
failed to read /dev/loop7
failed to read /dev/loop6
failed to read /dev/loop5
failed to read /dev/loop4
failed to read /dev/loop3
failed to read /dev/loop2
failed to read /dev/loop1
failed to read /dev/loop0
Starting Ceph osd2 on node173...
** WARNING: Ceph is still under heavy development, and is only suitable for **
** testing and review. Do not trust it with important data. **
starting osd2 at 0.0.0.0:6800/3310 osd_data /mnt/btrfs/osd2 (no journal)
=== osd3 ===
Mounting Btrfs on node173:/mnt/btrfs/osd3
FATAL: Module btrfs not found.
Scanning for Btrfs filesystems
failed to read /dev/loop7
failed to read /dev/loop6
failed to read /dev/loop5
failed to read /dev/loop4
failed to read /dev/loop3
failed to read /dev/loop2
failed to read /dev/loop1
failed to read /dev/loop0
Starting Ceph osd3 on node173...
** WARNING: Ceph is still under heavy development, and is only suitable for **
** testing and review. Do not trust it with important data. **
starting osd3 at 0.0.0.0:6802/3548 osd_data /mnt/btrfs/osd3 (no journal)

Step7. 掛載!

[root@f181 src]# mount -t ceph 10.0.0.181:/ /mnt/ceph/
[root@f181 src]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_f181-lv_root
32G 6.2G 24G 21% /
tmpfs 503M 0 503M 0% /dev/shm
/dev/cciss/c0d0p1 194M 33M 152M 18% /boot
10.0.0.181:/ 136G 7.0M 128G 1% /mnt/ceph

Step8. 測試

[root@f181 src]# dd if=/dev/zero of=/mnt/ceph/bigfile bs=4k count=10000k
10240000+0 records in
10240000+0 records out
41943040000 bytes (42 GB) copied, 1093.68 s, 38.4 MB/s
資料會寫入各硬碟中。

Final. 結果觀察

1. 空間的寫入,會隨時增減 (猜測應該是在做 balance 的動作)
2. df 空間無法反應實際檔案大小,各 osd 也沒法反應實際空間使用狀況。

ref. http://ceph.newdream.net/wiki/Main_Page

2010年4月22日 星期四

SSH Login Without Password

因為文章裡會 reference 比較多次,所以乾脆獨立出來。

當你的機器設備較多時,密碼認證就變成一種相當大的負擔,用 keys 來認證,相對成為認證方式首選!

Step1. 產生 key pair
產生認證所需的 key

[root@nodeB ~] # ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase): # 請注意,這是存取 private key 的密碼,如果你想做 auto login, 請不要輸入任何東西。
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
2d:52:2c:9f:d9:f8:7a:35:83:d8:12:7e:cc:4d:2a:ff root@nodeB
The key's randomart image is:
+--[ RSA 2048]----+
| |
| . |
| . o |
| +.* . |
| ..S*o= |
| .=oB = |
| =.o o |
| .o E |
| .. |
+-----------------+

Step2. 佈署 public key
若您要從 nodeB, 以 ssh w/o passwd 進入 nodeA
請將 nodeB 的 public key, 放置於 nodeA, /UserAccount/.ssh/authorized_keys

[root@nodeA ~] # cat /root/.ssh/authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwLmrP46JukEdUjHhK1tsyhHgTtKd65nlxHjSdVDBtXLvYukYMij3qX1qLOG9x2gQBWt2WBOyacULi5HajexMuU9aQTTTYdHXbA+Vyn/tO26
NkGVXiQm0LFZpRBqQBrhUcvTeOD0yHmMC9iqbEUBpyQXA8XELZNoKrYGOIKiPHpfduaeYfnt7nZ7T7Nou/MoFbpuvXmfpeVg6S01gPMOKXpkgFrigwtcw/W59d7ia5I6rhPEIrkHQjGGN/Q
N6NCifvtkIeWt+UY2lz1f+hhmvtKC6esiY3y7U3U9iLrSHBLHh+Tm5KLcKhJw1qgnDu8vsj7uL5DMg6kk98CZKuKi+== root@nodeB

Step3. 測試連線

[root@nodeB ~] # ssh -2 nodeA
Last login: Thu Apr 22 12:33:07 2010 from nodeB
[root@nodeA ~] #


2010年4月13日 星期二

Install Fedora Over HTTP

由於最近要再測一些Distributed file system, 找來一些舊機器來試驗...

機器一多,就得思考怎麼做才能快速安裝,事實證明人類是種很懶惰的動物... zzz...

PXE, 簡單來說是種結合多種 protocols, 其中包含 DHCP 及 TFTP. 可以用來讓一些裝置進行網路開機的一種協定。目前,我是用Gentoo Linux來提供 boot service, 透過 HTTP 安裝 Fedora 12.

當然,你得先確認你的 client 網卡支援 PXE.

Step1. 安裝 boot service 必要套件
gentoo# emerge -uD net-misc/dhcp
gentoo# emerge -uD net-ftp/atftp
gentoo# emerge -uD sys-boot/syslinux

Step2. 設定 boot service
gentoo# cat /etc/dhcp/dhcpd.conf
---
option domain-name "twaren.net";
option domain-name-servers 8.8.8.8, 211.79.61.4;
default-lease-time 600;
max-lease-time 7200;
ddns-update-style interim;
log-facility local7;
allow booting;
allow bootp;
ignore client-updates;

subnet 211.79.x.128 netmask 255.255.255.128 {
range 211.79.x.172 211.79.x.181;
option subnet-mask 255.255.255.128;
option broadcast-address 211.79.x.255;
option routers 211.79.x.254;
next-server 211.79.x.154; #指定 booter
filename "pxelinux.0"; #指定boot file
}
---
gentoo# cp /usr/share/syslinux/pxelinux.0 /home/tftpd
gentoo# wget http://ftp.twaren.net/Linux/Fedora/linux/releases/12/\
Fedora/i386/os/images/pxeboot/initrd.img
gentoo# wget http://ftp.twaren.net/Linux/Fedora/linux/releases/12/\
Fedora/i386/os/images/pxeboot/vmlinuz
gentoo# cat /home/tftpd/pxelinux.cfg/default #你可以設定不同 host, 吃不同的 boot images
---
prompt 1
default pxeboot
timeout 50

label pxeboot
kernel vmlinuz
append initrd=initrd.img

ONERROR LOCALBOOT 0
---
gentoo# find /home/tftpd/ -type f
/home/tftpd/pxelinux.0
/home/tftpd/initrd.img
/home/tftpd/vmlinuz
/home/tftpd/pxelinux.cfg/default

Step3. 啟動 boot service
gentoo# /etc/init.d/dhcpd start
gentoo# atftpd --logfile /var/log/tftpd.log --daemon /home/tftpd/

Step4. 啟動 client, 開始安裝 OS
幾本上如果你上述的設定都正常 work, 且你的 client 網卡支援 PXE, 你應該可以取得 IP, 並下載 kernel, 啟動安裝流程。

在安裝來源選擇 URL 即可透過 ftp, http 進行網路安裝。

其實這個還不完整,還需要人為介入,應該還要加上 Red Hat 的 Kickstart 這樣的東西才行。
ref:


2009年10月23日 星期五

upgrade GPFS on CentOS 5.4

剛好最近 CentOS 5.4 release 了,更新一下,順便 update gpfs (3.2.1-14 -> 3.3.0-1)
更新上沒有太大問題。

$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)

$ tar xvf gpfs-3.3.0-1.x86_64.update.tar.gz
README
gpfs.base-3.3.0-1.x86_64.update.rpm
gpfs.docs-3.3.0-1.noarch.rpm
gpfs.gpl-3.3.0-1.noarch.rpm
gpfs.gui-3.3.0-1.x86_64.rpm
gpfs.msg.en_US-3.3.0-1.noarch.rpm

$ rpm -U gpfs.base-3.3.0-1.x86_64.update.rpm
$ rpm -U gpfs.docs-3.3.0-1.noarch.rpm
$ rpm -U gpfs.msg.en_US-3.3.0-1.noarch.rpm
$ rpm -U gpfs.gui-3.3.0-1.x86_64.rpm
You may start the GPFS GUI now by typing : /etc/init.d/gpfsgui start
Alternatively, the GPFS GUI will start on reboot.
$ rpm -ivh --force gpfs.gpl-3.3.0-1.noarch.rpm
Preparing... ########################################### [100%]
1:gpfs.gpl ########################################### [100%]

$ cd /usr/lpp/mmfs/src
$ export SHARKCLONEROOT=/usr/lpp/mmfs/src

$ make Autoconfig
cd /usr/lpp/mmfs/src/config; ./configure --genenvonly; /usr/bin/cpp -P def.mk.proto > ./def.mk; exit $? || exit 1

$ cat config/env.mcr
#define GPFS_ARCH_X86_64
#define GPFS_LINUX
LINUX_DISTRIBUTION := REDHAT_AS_LINUX
#define LINUX_DISTRIBUTION_LEVEL 54
#define LINUX_KERNEL_VERSION 2061899
KERNEL_BUILD_DIR := /lib/modules/2.6.18-164.el5/build

$ make clean
$ make World
$ make InstallImages

good ref link: http://www.ibm.com/developerworks/wikis/display/hpccentral/General+Parallel+File+System+(GPFS)

另外補一下 gpfs tuning link: http://www.ibm.com/developerworks/wikis/display/hpccentral/GPFS+Tuning+Parameters

2009年9月7日 星期一

add storage node on GPFS

新增一個新的儲存節點到檔案系統中。

※新增節點前,亦須確認該節點的 ssh key 是否已建立,並且確認其它節點可以無密碼login.
※確認 firewall 已允許各節點間互連。

$ mmaddnode c153 (可指定是否為quorum, 或之後用 mmchconfig designation=quorum 或 mmchnode --quorum 調整)
Fri Sep 4 17:12:58 CST 2009: mmaddnode: Processing node c153
mmaddnode: Command successfully completed
mmaddnode: Propagating the cluster configuration data to all
affected nodes. This is an asynchronous process.

$ mmstartup -N c153
Fri Sep 4 17:13:11 CST 2009: mmstartup: Starting GPFS ...

$ cat add_new_disk (此例子指定FailureGroup為2)
/dev/sda:c153::dataAndMetadata:2::
/dev/sdb:c153::dataAndMetadata:2::

$ mmcrnsd -F add_new_disk -v no
mmcrnsd: Processing disk sda
mmcrnsd: Processing disk sdb
mmcrnsd: Propagating the cluster configuration data to all
affected nodes. This is an asynchronous process.

$ mmlsnsd
File system Disk name NSD servers
---------------------------------------------------------------------------
gpfs0 gpfs1nsd c149
gpfs0 gpfs2nsd c150
gpfs0 gpfs3nsd c149
gpfs0 gpfs4nsd c150
gpfs0 gpfs5nsd c152
gpfs0 gpfs6nsd c152
(free disk) gpfs7nsd c153
(free disk) gpfs8nsd c153

$ mmadddisk gpfs0 -F add_new_disk -r
The following disks of gpfs0 will be formatted on node c149.twaren.net:
gpfs7nsd: size 1220994560 KB
gpfs8nsd: size 1220984320 KB
Extending Allocation Map
Checking Allocation Map for storage pool 'system'
79 % complete on Fri Sep 4 17:16:19 2009
100 % complete on Fri Sep 4 17:16:20 2009
Completed adding disks to file system gpfs0.
mmadddisk: Propagating the cluster configuration data to all
affected nodes. This is an asynchronous process.
Restriping gpfs0 ...
Scanning file system metadata, phase 1 ...
2 % complete on Fri Sep 4 17:16:27 2009
22 % complete on Fri Sep 4 17:16:30 2009
40 % complete on Fri Sep 4 17:16:33 2009
59 % complete on Fri Sep 4 17:16:36 2009
80 % complete on Fri Sep 4 17:16:39 2009
100 % complete on Fri Sep 4 17:16:42 2009
Scan completed successfully.
Scanning file system metadata, phase 2 ...
15 % complete on Fri Sep 4 17:16:45 2009
33 % complete on Fri Sep 4 17:16:48 2009
51 % complete on Fri Sep 4 17:16:51 2009
69 % complete on Fri Sep 4 17:16:54 2009
86 % complete on Fri Sep 4 17:16:57 2009
100 % complete on Fri Sep 4 17:17:00 2009
Scan completed successfully.
Scanning file system metadata, phase 3 ...
Scan completed successfully.
Scanning file system metadata, phase 4 ...
Scan completed successfully.
Scanning user file metadata ...
Scan completed successfully.
Done

$ mmlsdisk gpfs0 -L
disk driver sector failure holds holds storage
name type size group metadata data status availability disk id pool remarks
------------ -------- ------ ------- -------- ----- ------------- ------------ ------- ------------ ---------
gpfs1nsd nsd 512 1 yes yes ready up 1 system desc
gpfs2nsd nsd 512 2 yes yes ready up 2 system desc
gpfs3nsd nsd 512 1 yes yes ready up 3 system desc
gpfs4nsd nsd 512 2 yes yes ready up 4 system
gpfs5nsd nsd 512 1 yes yes ready up 5 system
gpfs6nsd nsd 512 1 yes yes ready up 6 system
gpfs7nsd nsd 512 2 yes yes ready up 7 system
gpfs8nsd nsd 512 2 yes yes ready up 8 system
Number of quorum disks: 3
Read quorum value: 2
Write quorum value: 2

$ df -h (dynamic add up disk space)
Filesystem Size Used Avail Use% Mounted on
/dev/gpfs0 9.1T 4.6T 4.6T 51% /gpfs

GPFS install on CentOS

延續上一篇 GPFS install on Gentoo Linux
雖然說在 Gentoo 上安裝是沒有問題,可是在使用上卻是有很多問題,它相關的tools使用上,動不動就會 kernel panic, 如果你是想 production 使用,建議還是用它 support 的 OS 吧。

以下是在 CentOS 5.3 安裝 GPFS v3.2.1

$ cat /etc/hosts
10.0.0.149 c149
10.0.0.150 c150
10.0.0.152 c152
10.0.0.153 c153

$ ssh-keygen -t rsa (create key pair on every node)

$ copy each node's public key (id_rsa.pub) into authorized_keys (every node, even itself)

$ test full-mesh log in without any password prompt (check tcp-wrapper)

$ cat /etc/redhat-release (fool gpfs install script :o)
Red Hat Enterprise Linux Server release 5.3 (Tikanga)

$ touch /usr/lpp/mmfs/lib/libgpfslum.so (fool gpfs install script :o)

$ cd /usr/src/gpfs
$ wget ftp://ftp.software.ibm.com/software/server/gpfs/gpfs-3.2.1-14.x86_64.update.tar.gz
$ tar zxvf gpfs-3.2.1-14.x86_64.update.tar.gz
$ rpm -ivh gpfs.msg.en_US-3.2.1-14.noarch.rpm
$ rpm -ivh gpfs.gpl-3.2.1-14.noarch.rpm
$ rpm -ivh gpfs.docs-3.2.1-14.noarch.rpm
$ yum install imake.x86_64
$ yum install compat-libstdc++-33.x86_64 (gpfs needs libstdc++.so.5)
$ rpm -ivh gpfs.base-3.2.1-14.x86_64.update.rpm --nodeps

$ cd /usr/lpp/mmfs/src
$ export SHARKCLONEROOT=/usr/lpp/mmfs/src
$ make Autoconfig (or config by yourself)
$ cat config/site.mcr
#define GPFS_ARCH_X86_64
LINUX_DISTRIBUTION = REDHAT_AS_LINUX
#define LINUX_DISTRIBUTION_LEVEL 53
#define LINUX_KERNEL_VERSION 2061899

$ make clean
$ make World
$ make InstallImages

$ cat ~/.bashrc
PATH=$PATH:/usr/lpp/mmfs/bin

$ cat gpfs.nodes
c149:manager-quorum:
c150:manager-quorum:
c152:manager-quorum:
c153:manager-quorum:

$ mmcrcluster -C TWAREN_FTP -N gpfs.nodes -p c149 -R /usr/bin/scp -r /usr/bin/ssh -s c150
Tue Sep 15 20:09:52 CST 2009: mmcrcluster: Processing node c149
Tue Sep 15 20:09:52 CST 2009: mmcrcluster: Processing node c150
Tue Sep 15 20:09:53 CST 2009: mmcrcluster: Processing node c152
Tue Sep 15 20:09:54 CST 2009: mmcrcluster: Processing node c153
mmcrcluster: Command successfully completed
mmcrcluster: Propagating the cluster configuration data to all
affected nodes. This is an asynchronous process.

$ mmlscluster
GPFS cluster information
========================
GPFS cluster name: TWAREN_FTP.c149
GPFS cluster id: 720576581582423056
GPFS UID domain: TWAREN_FTP.c149
Remote shell command: /usr/bin/ssh
Remote file copy command: /usr/bin/scp

GPFS cluster configuration servers:
-----------------------------------
Primary server: c149
Secondary server: c150

Node Daemon node name IP address Admin node name Designation
-----------------------------------------------------------------------------------------------
1 c149 10.0.0.149 c149 quorum-manager
2 c150 10.0.0.150 c150 quorum-manager
3 c152 10.0.0.152 c152 quorum-manager
4 c153 10.0.0.153 c153 quorum-manager

$ mmstartup -a
Tue Sep 15 20:10:37 CST 2009: mmstartup: Starting GPFS ...

$ mmgetstate -a -L
Node number Node name Quorum Nodes up Total nodes GPFS state Remarks
------------------------------------------------------------------------------------
1 c149 3 4 4 active quorum node
2 c150 3 4 4 active quorum node
3 c152 3 4 4 active quorum node
4 c153 3 4 4 active quorum node

$ cat gpfs.disks (FailureGroup 1 & 2)
/dev/sda:c149::dataAndMetadata:1::
/dev/sdb:c149::dataAndMetadata:1::
/dev/sda:c152::dataAndMetadata:1::
/dev/sdb:c152::dataAndMetadata:1::
/dev/sda:c150::dataAndMetadata:2::
/dev/sdb:c150::dataAndMetadata:2::
/dev/sda:c153::dataAndMetadata:2::
/dev/sdb:c153::dataAndMetadata:2::

$ mmcrnsd -F gpfs.disks
mmcrnsd: Processing disk sda
mmcrnsd: Processing disk sdb
mmcrnsd: Processing disk sda
mmcrnsd: Processing disk sdb
mmcrnsd: Processing disk sda
mmcrnsd: Processing disk sdb
mmcrnsd: Processing disk sda
mmcrnsd: Processing disk sdb
mmcrnsd: Propagating the cluster configuration data to all
affected nodes. This is an asynchronous process.

$ cat gpfs.disks
# /dev/sda:c149::dataAndMetadata:1::
gpfs1nsd:::dataAndMetadata:1::
# /dev/sdb:c149::dataAndMetadata:1::
gpfs2nsd:::dataAndMetadata:1::
# /dev/sda:c152::dataAndMetadata:1::
gpfs3nsd:::dataAndMetadata:1::
# /dev/sdb:c152::dataAndMetadata:1::
gpfs4nsd:::dataAndMetadata:1::
# /dev/sda:c150::dataAndMetadata:2::
gpfs5nsd:::dataAndMetadata:2::
# /dev/sdb:c150::dataAndMetadata:2::
gpfs6nsd:::dataAndMetadata:2::
# /dev/sda:c153::dataAndMetadata:2::
gpfs7nsd:::dataAndMetadata:2::
# /dev/sdb:c153::dataAndMetadata:2::
gpfs8nsd:::dataAndMetadata:2::

$ mmlsnsd -a -L
File system Disk name NSD volume ID NSD servers
---------------------------------------------------------------------------------------------
(free disk) gpfs1nsd 000000004AAF8496 c149
(free disk) gpfs2nsd 000000004AAF8497 c149
(free disk) gpfs3nsd 000000004AAF8496 c152
(free disk) gpfs4nsd 000000004AAF8497 c152
(free disk) gpfs5nsd 000000004AAF8499 c150
(free disk) gpfs6nsd 000000004AAF849A c150
(free disk) gpfs7nsd 000000004AAF849B c153
(free disk) gpfs8nsd 000000004AAF849C c153

$ mmcrfs /gpfs gpfs0 -F gpfs.disks -B 256K -m 2 -M 2 -r 2 -R 2 -v no
The following disks of gpfs0 will be formatted on node c150.twaren.net:
gpfs1nsd: size 1220994560 KB
gpfs2nsd: size 1220984320 KB
gpfs3nsd: size 1220994560 KB
gpfs4nsd: size 1220984320 KB
gpfs5nsd: size 1220994560 KB
gpfs6nsd: size 1220994560 KB
gpfs7nsd: size 1220994560 KB
gpfs8nsd: size 1220984320 KB
Formatting file system ...
Disks up to size 11 TB can be added to storage pool 'system'.
Creating Inode File
Creating Allocation Maps
Clearing Inode Allocation Map
Clearing Block Allocation Map
Formatting Allocation Map for storage pool 'system'
Completed creation of file system /dev/gpfs0.
mmcrfs: Propagating the cluster configuration data to all
affected nodes. This is an asynchronous process.

$ mmlsdisk gpfs0 -L
disk driver sector failure holds holds storage
name type size group metadata data status availability disk id pool remarks
------------ -------- ------ ------- -------- ----- ------------- ------------ ------- ------------ ---------
gpfs1nsd nsd 512 1 yes yes ready up 1 system desc
gpfs2nsd nsd 512 1 yes yes ready up 2 system desc
gpfs3nsd nsd 512 1 yes yes ready down 3 system
gpfs4nsd nsd 512 1 yes yes ready down 4 system
gpfs5nsd nsd 512 2 yes yes ready up 5 system desc
gpfs6nsd nsd 512 2 yes yes ready up 6 system
gpfs7nsd nsd 512 2 yes yes ready up 7 system
gpfs8nsd nsd 512 2 yes yes ready up 8 system
Number of quorum disks: 3
Read quorum value: 2
Write quorum value: 2

$ mount /gpfs

$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/gpfs0 9.1T 1.4G 9.1T 1% /gpfs

$ dd if=/dev/zero of=/gpfs/test bs=1024k count=10k
10240+0 records in
10240+0 records out
10737418240 bytes (11 GB) copied, 91.5395 seconds, 117 MB/s
$ dd if=/dev/zero of=/gpfs/test bs=512k count=10k
10240+0 records in
10240+0 records out
5368709120 bytes (5.4 GB) copied, 45.7509 seconds, 117 MB/s
$ dd if=/dev/zero of=/gpfs/test bs=256k count=10k
10240+0 records in
10240+0 records out
2684354560 bytes (2.7 GB) copied, 22.8762 seconds, 117 MB/s
$ dd if=/dev/zero of=/gpfs/test bs=128k count=10k
10240+0 records in
10240+0 records out
1342177280 bytes (1.3 GB) copied, 11.4205 seconds, 118 MB/s
$ dd if=/dev/zero of=/gpfs/test bs=64k count=10k
10240+0 records in
10240+0 records out
671088640 bytes (671 MB) copied, 5.68368 seconds, 118 MB/s


$ mmlsnsd -a -L
File system Disk name NSD volume ID NSD servers
---------------------------------------------------------------------------------------------
(free disk) gpfs10nsd 000000004AAF899D c149
(free disk) gpfs11nsd 000000004AAF899D c152
(free disk) gpfs12nsd 000000004AAF899E c152
(free disk) gpfs13nsd 000000004AAF899F c150
(free disk) gpfs14nsd 000000004AAF89A0 c150
(free disk) gpfs15nsd 000000004AAF89A1 c153
(free disk) gpfs16nsd 000000004AAF89A2 c153
(free disk) gpfs9nsd 000000004AAF899C c149

$ mmcrfs /gpfs gpfs0 -F gpfs.disks -B 128K -m 2 -M 2 -r 2 -R 2 -v no
The following disks of gpfs0 will be formatted on node c150.twaren.net:
gpfs9nsd: size 1220994560 KB
gpfs10nsd: size 1220984320 KB
gpfs11nsd: size 1220994560 KB
gpfs12nsd: size 1220984320 KB
gpfs13nsd: size 1220994560 KB
gpfs14nsd: size 1220994560 KB
gpfs15nsd: size 1220994560 KB
gpfs16nsd: size 1220984320 KB
Formatting file system ...
Disks up to size 11 TB can be added to storage pool 'system'.
Creating Inode File
Creating Allocation Maps
Clearing Inode Allocation Map
Clearing Block Allocation Map
Formatting Allocation Map for storage pool 'system'
59 % complete on Tue Sep 15 20:35:04 2009
100 % complete on Tue Sep 15 20:35:07 2009
Completed creation of file system /dev/gpfs0.
mmcrfs: Propagating the cluster configuration data to all
affected nodes. This is an asynchronous process.

$ mmlsdisk gpfs0 -L
disk driver sector failure holds holds storage
name type size group metadata data status availability disk id pool remarks
------------ -------- ------ ------- -------- ----- ------------- ------------ ------- ------------ ---------
gpfs9nsd nsd 512 1 yes yes ready up 1 system desc
gpfs10nsd nsd 512 1 yes yes ready up 2 system desc
gpfs11nsd nsd 512 1 yes yes ready down 3 system
gpfs12nsd nsd 512 1 yes yes ready up 4 system
gpfs13nsd nsd 512 2 yes yes ready up 5 system desc
gpfs14nsd nsd 512 2 yes yes ready up 6 system
gpfs15nsd nsd 512 2 yes yes ready up 7 system
gpfs16nsd nsd 512 2 yes yes ready up 8 system
Number of quorum disks: 3
Read quorum value: 2
Write quorum value: 2

$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/gpfs0 9.1T 2.1G 9.1T 1% /gpfs

$ dd if=/dev/zero of=/gpfs/test bs=1024k count=10k
10240+0 records in
10240+0 records out
10737418240 bytes (11 GB) copied, 114.629 seconds, 93.7 MB/s
$ dd if=/dev/zero of=/gpfs/test bs=512k count=10k
10240+0 records in
10240+0 records out
5368709120 bytes (5.4 GB) copied, 57.2698 seconds, 93.7 MB/s
$ dd if=/dev/zero of=/gpfs/test bs=256k count=10k
10240+0 records in
10240+0 records out
2684354560 bytes (2.7 GB) copied, 28.6111 seconds, 93.8 MB/s
$ dd if=/dev/zero of=/gpfs/test bs=128k count=10k
10240+0 records in
10240+0 records out
1342177280 bytes (1.3 GB) copied, 14.2832 seconds, 94.0 MB/s
$ dd if=/dev/zero of=/gpfs/test bs=64k count=10k
10240+0 records in
10240+0 records out
671088640 bytes (671 MB) copied, 7.12948 seconds, 94.1 MB/s


$ mmlsnsd -a -L
File system Disk name NSD volume ID NSD servers
---------------------------------------------------------------------------------------------
(free disk) gpfs17nsd 000000004AAF8CF3 c149
(free disk) gpfs18nsd 000000004AAF8CF4 c149
(free disk) gpfs19nsd 000000004AAF8CF4 c152
(free disk) gpfs20nsd 000000004AAF8CF5 c152
(free disk) gpfs21nsd 000000004AAF8CF6 c150
(free disk) gpfs22nsd 000000004AAF8CF8 c150
(free disk) gpfs23nsd 000000004AAF8CF9 c153
(free disk) gpfs24nsd 000000004AAF8CFA c153

$ mmcrfs /gpfs gpfs0 -F gpfs.disks -B 64K -m 2 -M 2 -r 2 -R 2 -v no
The following disks of gpfs0 will be formatted on node c150.twaren.net:
gpfs17nsd: size 1220994560 KB
gpfs18nsd: size 1220984320 KB
gpfs19nsd: size 1220994560 KB
gpfs20nsd: size 1220984320 KB
gpfs21nsd: size 1220994560 KB
gpfs22nsd: size 1220994560 KB
gpfs23nsd: size 1220994560 KB
gpfs24nsd: size 1220984320 KB
Formatting file system ...
Disks up to size 11 TB can be added to storage pool 'system'.
Creating Inode File
Creating Allocation Maps
Clearing Inode Allocation Map
Clearing Block Allocation Map
Formatting Allocation Map for storage pool 'system'
29 % complete on Tue Sep 15 20:49:24 2009
57 % complete on Tue Sep 15 20:49:29 2009
86 % complete on Tue Sep 15 20:49:34 2009
100 % complete on Tue Sep 15 20:49:36 2009
Completed creation of file system /dev/gpfs0.
mmcrfs: Propagating the cluster configuration data to all
affected nodes. This is an asynchronous process.

$ mmlsdisk gpfs0 -L
disk driver sector failure holds holds storage
name type size group metadata data status availability disk id pool remarks
------------ -------- ------ ------- -------- ----- ------------- ------------ ------- ------------ ---------
gpfs17nsd nsd 512 1 yes yes ready up 1 system desc
gpfs18nsd nsd 512 1 yes yes ready up 2 system desc
gpfs19nsd nsd 512 1 yes yes ready down 3 system
gpfs20nsd nsd 512 1 yes yes ready up 4 system
gpfs21nsd nsd 512 2 yes yes ready up 5 system desc
gpfs22nsd nsd 512 2 yes yes ready up 6 system
gpfs23nsd nsd 512 2 yes yes ready up 7 system
gpfs24nsd nsd 512 2 yes yes ready up 8 system
Number of quorum disks: 3
Read quorum value: 2
Write quorum value: 2

$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/gpfs0 9.1T 3.3G 9.1T 1% /gpfs

$ dd if=/dev/zero of=/gpfs/test bs=1024k count=10k
10240+0 records in
10240+0 records out
10737418240 bytes (11 GB) copied, 116.784 seconds, 91.9 MB/s
$ dd if=/dev/zero of=/gpfs/test bs=512k count=10k
10240+0 records in
10240+0 records out
5368709120 bytes (5.4 GB) copied, 58.4151 seconds, 91.9 MB/s
$ dd if=/dev/zero of=/gpfs/test bs=256k count=10k
10240+0 records in
10240+0 records out
2684354560 bytes (2.7 GB) copied, 28.9273 seconds, 92.8 MB/s
$ dd if=/dev/zero of=/gpfs/test bs=128k count=10k
10240+0 records in
10240+0 records out
1342177280 bytes (1.3 GB) copied, 14.3859 seconds, 93.3 MB/s
$ dd if=/dev/zero of=/gpfs/test bs=64k count=10k
10240+0 records in
10240+0 records out
671088640 bytes (671 MB) copied, 7.43935 seconds, 90.2 MB/s


$ mmlsnsd -a -L
File system Disk name NSD volume ID NSD servers
---------------------------------------------------------------------------------------------
(free disk) gpfs25nsd 000000004AAF91F1 c149
(free disk) gpfs26nsd 000000004AAF91F2 c149
(free disk) gpfs27nsd 000000004AAF91F1 c152
(free disk) gpfs28nsd 000000004AAF91F3 c152
(free disk) gpfs29nsd 000000004AAF91F4 c150
(free disk) gpfs30nsd 000000004AAF91F5 c150
(free disk) gpfs31nsd 000000004AAF91F6 c153
(free disk) gpfs32nsd 000000004AAF91F7 c153

$ mmcrfs /gpfs gpfs0 -F gpfs.disks -B 512K -m 2 -M 2 -r 2 -R 2 -v no
The following disks of gpfs0 will be formatted on node c150.twaren.net:
gpfs25nsd: size 1220994560 KB
gpfs26nsd: size 1220984320 KB
gpfs27nsd: size 1220994560 KB
gpfs28nsd: size 1220984320 KB
gpfs29nsd: size 1220994560 KB
gpfs30nsd: size 1220994560 KB
gpfs31nsd: size 1220994560 KB
gpfs32nsd: size 1220984320 KB
Formatting file system ...
Disks up to size 18 TB can be added to storage pool 'system'.
Creating Inode File
Creating Allocation Maps
Clearing Inode Allocation Map
Clearing Block Allocation Map
Formatting Allocation Map for storage pool 'system'
Completed creation of file system /dev/gpfs0.
mmcrfs: Propagating the cluster configuration data to all
affected nodes. This is an asynchronous process.

$ mmlsdisk gpfs0 -L
disk driver sector failure holds holds storage
name type size group metadata data status availability disk id pool remarks
------------ -------- ------ ------- -------- ----- ------------- ------------ ------- ------------ ---------
gpfs25nsd nsd 512 1 yes yes ready up 1 system desc
gpfs26nsd nsd 512 1 yes yes ready up 2 system desc
gpfs27nsd nsd 512 1 yes yes ready down 3 system
gpfs28nsd nsd 512 1 yes yes ready up 4 system
gpfs29nsd nsd 512 2 yes yes ready up 5 system desc
gpfs30nsd nsd 512 2 yes yes ready up 6 system
gpfs31nsd nsd 512 2 yes yes ready up 7 system
gpfs32nsd nsd 512 2 yes yes ready up 8 system
Number of quorum disks: 3
Read quorum value: 2
Write quorum value: 2

$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/gpfs0 9.1T 1.3G 9.1T 1% /gpfs

$ dd if=/dev/zero of=/gpfs/test bs=1024k count=10k
10240+0 records in
10240+0 records out
10737418240 bytes (11 GB) copied, 114.431 seconds, 93.8 MB/s
$ dd if=/dev/zero of=/gpfs/test bs=512k count=10k
10240+0 records in
10240+0 records out
5368709120 bytes (5.4 GB) copied, 57.4142 seconds, 93.5 MB/s
$ dd if=/dev/zero of=/gpfs/test bs=256k count=10k
10240+0 records in
10240+0 records out
2684354560 bytes (2.7 GB) copied, 28.5306 seconds, 94.1 MB/s
$ dd if=/dev/zero of=/gpfs/test bs=128k count=10k
10240+0 records in
10240+0 records out
1342177280 bytes (1.3 GB) copied, 14.2473 seconds, 94.2 MB/s
$ dd if=/dev/zero of=/gpfs/test bs=64k count=10k
10240+0 records in
10240+0 records out
671088640 bytes (671 MB) copied, 7.10075 seconds, 94.5 MB/s


$ mmlsnsd -a -L
File system Disk name NSD volume ID NSD servers
---------------------------------------------------------------------------------------------
(free disk) gpfs33nsd 000000004AAF9486 c149
(free disk) gpfs34nsd 000000004AAF9487 c149
(free disk) gpfs35nsd 000000004AAF9486 c152
(free disk) gpfs36nsd 000000004AAF9488 c152
(free disk) gpfs37nsd 000000004AAF9489 c150
(free disk) gpfs38nsd 000000004AAF948A c150
(free disk) gpfs39nsd 000000004AAF948B c153
(free disk) gpfs40nsd 000000004AAF948C c153

$ mmcrfs /gpfs gpfs0 -F gpfs.disks -B 1024K -m 2 -M 2 -r 2 -R 2 -v no
The following disks of gpfs0 will be formatted on node c150.twaren.net:
gpfs33nsd: size 1220994560 KB
gpfs34nsd: size 1220984320 KB
gpfs35nsd: size 1220994560 KB
gpfs36nsd: size 1220984320 KB
gpfs37nsd: size 1220994560 KB
gpfs38nsd: size 1220994560 KB
gpfs39nsd: size 1220994560 KB
gpfs40nsd: size 1220984320 KB
Formatting file system ...
Disks up to size 18 TB can be added to storage pool 'system'.
Creating Inode File
Creating Allocation Maps
Clearing Inode Allocation Map
Clearing Block Allocation Map
Formatting Allocation Map for storage pool 'system'
Completed creation of file system /dev/gpfs0.
mmcrfs: Propagating the cluster configuration data to all
affected nodes. This is an asynchronous process.

$ mmlsdisk gpfs0 -L
disk driver sector failure holds holds storage
name type size group metadata data status availability disk id pool remarks
------------ -------- ------ ------- -------- ----- ------------- ------------ ------- ------------ ---------
gpfs33nsd nsd 512 1 yes yes ready up 1 system desc
gpfs34nsd nsd 512 1 yes yes ready up 2 system desc
gpfs35nsd nsd 512 1 yes yes ready down 3 system
gpfs36nsd nsd 512 1 yes yes ready up 4 system
gpfs37nsd nsd 512 2 yes yes ready up 5 system desc
gpfs38nsd nsd 512 2 yes yes ready up 6 system
gpfs39nsd nsd 512 2 yes yes ready up 7 system
gpfs40nsd nsd 512 2 yes yes ready up 8 system
Number of quorum disks: 3
Read quorum value: 2
Write quorum value: 2

$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/gpfs0 9.1T 1.1G 9.1T 1% /gpfs

$ dd if=/dev/zero of=/gpfs/test bs=1024k count=10k
10240+0 records in
10240+0 records out
10737418240 bytes (11 GB) copied, 114.311 seconds, 93.9 MB/s
$ dd if=/dev/zero of=/gpfs/test bs=512k count=10k
10240+0 records in
10240+0 records out
5368709120 bytes (5.4 GB) copied, 56.9555 seconds, 94.3 MB/s
$ dd if=/dev/zero of=/gpfs/test bs=256k count=10k
10240+0 records in
10240+0 records out
2684354560 bytes (2.7 GB) copied, 28.5401 seconds, 94.1 MB/s
$ dd if=/dev/zero of=/gpfs/test bs=128k count=10k
10240+0 records in
10240+0 records out
1342177280 bytes (1.3 GB) copied, 14.2041 seconds, 94.5 MB/s
$ dd if=/dev/zero of=/gpfs/test bs=64k count=10k
10240+0 records in
10240+0 records out
671088640 bytes (671 MB) copied, 7.02471 seconds, 95.5 MB/s


$ mmlsnsd -a -L
File system Disk name NSD volume ID NSD servers
---------------------------------------------------------------------------------------------
(free disk) gpfs41nsd 000000004AAF9746 c149
(free disk) gpfs42nsd 000000004AAF9747 c149
(free disk) gpfs43nsd 000000004AAF9747 c152
(free disk) gpfs44nsd 000000004AAF9748 c152
(free disk) gpfs45nsd 000000004AAF9749 c150
(free disk) gpfs46nsd 000000004AAF974A c150
(free disk) gpfs47nsd 000000004AAF974B c153
(free disk) gpfs48nsd 000000004AAF974D c153

$ mmcrfs /gpfs gpfs0 -F gpfs.disks -B 2048K -m 2 -M 2 -r 2 -R 2 -v no
mmcrfs: The specified block size (2048K) exceeds the maximum
allowed block size currently in effect (1024K).
Either specify a smaller value for the -B parameter,
or increase the maximum block size by issuing:
mmchconfig maxblocksize=2048K
and restarting the GPFS daemon
mmcrfs: Command failed. Examine previous error messages to determine cause.

$ mmchconfig maxblocksize=2048K
Verifying GPFS is stopped on all nodes ...
mmchconfig: GPFS is still active on c153
mmchconfig: GPFS is still active on c150
mmchconfig: GPFS is still active on c152
mmchconfig: GPFS is still active on c149
mmchconfig: Command failed. Examine previous error messages to determine cause.

$ mmshutdown -a
Tue Sep 15 21:33:37 CST 2009: mmshutdown: Starting force unmount of GPFS file systems
Tue Sep 15 21:33:42 CST 2009: mmshutdown: Shutting down GPFS daemons
c149: Shutting down!
c150: Shutting down!
c152: Shutting down!
c153: Shutting down!
c149: 'shutdown' command about to kill process 2905
c149: Unloading modules from /usr/lpp/mmfs/bin
c149: Unloading module mmfs
c150: 'shutdown' command about to kill process 16590
c150: Unloading modules from /usr/lpp/mmfs/bin
c150: Unloading module mmfs
c153: 'shutdown' command about to kill process 31397
c153: Unloading modules from /usr/lpp/mmfs/bin
c152: 'shutdown' command about to kill process 17482
c152: Unloading modules from /usr/lpp/mmfs/bin
c153: Unloading module mmfs
c152: Unloading module mmfs
c149: Unloading module mmfslinux
c149: Unloading module tracedev
c150: Unloading module mmfslinux
c150: Unloading module tracedev
c153: Unloading module mmfslinux
c153: Unloading module tracedev
c152: Unloading module mmfslinux
c152: Unloading module tracedev
Tue Sep 15 21:33:52 CST 2009: mmshutdown: Finished

$ mmchconfig maxblocksize=2048K
Verifying GPFS is stopped on all nodes ...
mmchconfig: Command successfully completed
mmchconfig: Propagating the cluster configuration data to all
affected nodes. This is an asynchronous process.

$ mmstartup -a
Tue Sep 15 21:34:06 CST 2009: mmstartup: Starting GPFS ...

$ mmcrfs /gpfs gpfs0 -F gpfs.disks -B 2048K -m 2 -M 2 -r 2 -R 2 -v no
The following disks of gpfs0 will be formatted on node c149.twaren.net:
gpfs41nsd: size 1220994560 KB
gpfs42nsd: size 1220984320 KB
gpfs43nsd: size 1220984320 KB
gpfs44nsd: size 1220984320 KB
gpfs45nsd: size 1220994560 KB
gpfs46nsd: size 1220994560 KB
gpfs47nsd: size 1220994560 KB
gpfs48nsd: size 1220984320 KB
Formatting file system ...
Disks up to size 18 TB can be added to storage pool 'system'.
Creating Inode File
Creating Allocation Maps
Clearing Inode Allocation Map
Clearing Block Allocation Map
Formatting Allocation Map for storage pool 'system'
Completed creation of file system /dev/gpfs0.
mmcrfs: Propagating the cluster configuration data to all
affected nodes. This is an asynchronous process.

$ mmlsdisk gpfs0 -L
disk driver sector failure holds holds storage
name type size group metadata data status availability disk id pool remarks
------------ -------- ------ ------- -------- ----- ------------- ------------ ------- ------------ ---------
gpfs41nsd nsd 512 1 yes yes ready up 1 system desc
gpfs42nsd nsd 512 1 yes yes ready down 2 system
gpfs43nsd nsd 512 1 yes yes ready up 3 system desc
gpfs44nsd nsd 512 1 yes yes ready up 4 system
gpfs45nsd nsd 512 2 yes yes ready up 5 system desc
gpfs46nsd nsd 512 2 yes yes ready up 6 system
gpfs47nsd nsd 512 2 yes yes ready up 7 system
gpfs48nsd nsd 512 2 yes yes ready up 8 system
Number of quorum disks: 3
Read quorum value: 2
Write quorum value: 2

$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/gpfs0 9.1T 936M 9.1T 1% /gpfs

$ dd if=/dev/zero of=/gpfs/test bs=1024k count=10k
dd: writing `/gpfs/test': Stale NFS file handle
9+0 records in
8+0 records out
8388608 bytes (8.4 MB) copied, 0.054915 seconds, 153 MB/s