PVFS2 di Ubuntu
Tutorial ini akan menunjukkan langkah demi langkah memasang PVFS2 (Parallel Virtual File System v2) di Ubuntu. Cara yang sama seharusnya juga bisa diterapkan di atas Debian.
Tulisan ini diadaptasi dari sumber berikut.
PVFS2 akan diinstall pada 2 buah komputer bernama host-a dan host-b. Kedua komputer akan menyediakan storage (I/O server) dan menjadi client yang akan memount filesystem tersebut. Selain itu, host-a juga akan menjadi metadata server.
Berikut ini adalah langkah-langkahnya.
Download PVFS2.
Install paket-paket yang dibutuhkan. (Lakukan di kedua mesin)
$ sudo apt-get install build-essential $ sudo apt-get install linux-header-`uname -r` $ sudo apt-get install libdb4.4 libdb4.4-devExtract berkas PVFS2. (Lakukan di kedua mesin)
$ tar xzf pvfs2-1.5.1.tar.gzConfigure, make, make install, (Lakukan di kedua mesin)
$ cd pvfs2-1.5.1 $ ./configure --with-kernel=/lib/modules/`uname -r`/build/ $ make $ make kmod $ sudo make kmod_install $ sudo make installSetelah diinstall, Anda akan melihat file-file baru di
/usr/local/bin,/usr/local/sbin, dan direktori modul kernel.Install modul PVFS2 yang baru saja dibuat. (Lakukan di kedua mesin)
$ sudo insmod /lib/modules/`uname -r`/kernel/fs/pvfs2/pvfs2.koBuat direktori yang akan menjadi storage. (Lakukan di kedua mesin)
$ sudo mkdir /pvfs-dataBuat konfigurasi server. (Lakukan di host-a).
host-a$ sudo /usr/local/bin/pvfs2-genconfig /etc/pvfs2-fs.conf /etc/pvfs2-server.conf ********************************************************************** Welcome to the PVFS2 Configuration Generator: This interactive script will generate configuration files suitable for use with a new PVFS2 file system. Please see the PVFS2 quickstart guide for details. ********************************************************************** You must first select the network protocol that your file system will use. The only currently supported options are "tcp", "gm", and "ib". (For multi-homed configurations, use e.g. "ib,tcp".) * Enter protocol type [Default is tcp]: tcp Choose a TCP/IP port for the servers to listen on. Note that this script assumes that all servers will use the same port number. * Enter port number [Default is 3334]: 3334 Next you must list the hostnames of the machines that will act as I/O servers. Acceptable syntax is "node1, node2, ..." or "node{#-#,#,#}". * Enter hostnames [Default is localhost]: host-a, host-b Now list the hostnames of the machines that will act as Metadata servers. This list may or may not overlap with the I/O server list. * Enter hostnames [Default is localhost]: host-a Configured a total of 2 servers: 2 of them are I/O servers. 1 of them are Metadata servers. * Would you like to verify server list (y/n) [Default is n]? y ****** I/O servers: tcp://host-a:3334 tcp://host-b:3334 ****** Metadata servers: tcp://host-a:3334 * Does this look ok (y/n) [Default is y]? y Choose a file for each server to write log messages to. * Enter log file location [Default is /tmp/pvfs2-server.log]: Choose a directory for each server to store data in. * Enter directory name: [Default is /pvfs2-storage-space]: /pvfs-data Writing fs config file... Done. Writing 2 server config file(s)... Done.Pada direktori
/etcakan terbentuk 3 buah file, yaitupvfs2-fs.conf,pvfs2-server.conf-host-a, danpvfs2-server.conf-host-b.Copy file konfigurasi ke
host-bdarihost-a.host-a$ scp /etc/pvfs2-* root@host-b:/etcMungkin Anda perlu mengatur password untuk root di
host-b. Anda juga bisa mencoba cara lain, yang jelas, pastikan konfigurasi darihost-aada dihost-bpada direktori yang sama (/etc).Inisialisasi direktori storage. (Lakukan di kedua mesin)
Pada
host-a:host-a$ sudo /usr/local/sbin/pvfs2-server /etc/pvfs2-fs.conf /etc/pvfs2-server.conf-host-a -fPada
host-b:host-b$ sudo /usr/local/sbin/pvfs2-server /etc/pvfs2-fs.conf /etc/pvfs2-server.conf-host-b -fPerhatikan file konfigurasi yang digunakan di setiap mesin.
Jalankan aplikasi server. (Lakukan di kedua mesin).
Pada
host-a:host-a$ sudo /usr/local/sbin/pvfs2-server /etc/pvfs2-fs.conf /etc/pvfs2-server.conf-host-aPada
host-b:host-b$ sudo /usr/local/sbin/pvfs2-server /etc/pvfs2-fs.conf /etc/pvfs2-server.conf-host-bPerhatikan opsi
-fyang tidak lagi digunakan saat menjalankan server.Buat konfigurasi client (mirip fstab, tapi khusus untuk keperluan PVFS2). Lakukan di kedua mesin atau salah satunya.
host-a$ sudo vi /etc/pvfs2tab host-a$ cat /etc/pvfs2tab tcp://host-a:3334/pvfs2-fs /pvfs pvfs2 default,noauto 0 0Buat mount point.
host-a$ sudo mkdir /pvfsCek konfigurasi.
host-a$ /usr/local/bin/pvfs2-ping -m /pvfsAnda akan melihat keterangan atas konfigurasi yang telah ada. Tulisan
The PVFS2 filesystem at /pvfs appears to be correctly configured.akan muncul jika konfigurasi sudah benar.Jalankan aplikasi client.
host-a$ sudo /usr/local/sbin/pvfs2-client -f -p /usr/local/sbin/pvfs2-client-core pvfs2-client starting Spawning new child process Waiting on child with pid 11924 About to exec ./pvfs2-client-coreAplikasi client ini akan jalan di foreground
Mount.
host-a$ sudo mount -t pvfs2 tcp://host-a:3334/pvfs2-fs /pvfsJika berhasil, saat Anda menjalankan program
mount, Anda akan melihat partisi virtual yang dimount pada/pvfs
Data yang disimpan pada PVFS2 ini akan disebar ke setiap I/O Server (storage) yang ada (striping).
Contoh penggunaan: http://www.cbrc.jp/symposium/bg2006/PDF/Ross.pdf (506 clients, 116.8 TByte, 16 dual P4 server @ 7.3 TByte).
- Login to post comments
PVFS2 gunanya buat apa ya...?
bisa dipake tuk membuat cluster filesystem. misalnya ada kompi2 yg khusus dijadiin sbg penyedia storage. trus kompi2 tsb saling sharing filesystem dg cara membuat cluster. nanti client bisa me-mount filesystem tersebut. ngeliat banyak kompi dlm cluster sebagai 1 buah penyedia storage.
test comment