Single Host PVFS2
From Bootable Cluster CD
For the most part, setting up a PVFS2 server on the BCCD is very straight forward and closely follows the quickstart guide. The only exception that you will need to watch out for is the fact the /mnt on the BCCD is not writeable, but rather /mnt/rw is used for this purpose.
So, in a nutshell, here are the steps:
[edit]
1. Boot up the BCCD
See Booting up the CD for help.
[edit]
2. Log in as root
The root password should be letmein or listed on the login screen.
[edit]
3. Generate the server configuration files
[root@host130:~]# 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".
* Enter protocol type [Default is 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]:
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]: host130
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]: host130
Configured a total of 1 servers:
1 of them are I/O servers.
1 of them are Metadata servers.
* Would you like to verify server list (y/n) [Default is n]?
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]: /mnt/rw/pvfs2-metastorage
Writing fs config file... Done.
Writing 1 server config file(s)... Done.
[root@host130:~]#
Notice that default directories above needed to be changed to reflect the rw portion of the BCCD environment.
[edit]
4. Generate a /etc/pvfs2tab to reflect the current configuration
[root@host130:~]# cat > /etc/pvfs2tab tcp://host130:3334/pvfs2-fs /mnt/rw/pvfs2 pvfs2 defaults 0 0 [root@host130:~]#
[edit]
5. Initialize the storage and server configuration
[root@host130:~]# pvfs2-server /etc/pvfs2-fs.conf /etc/pvfs2-server.conf-host130 -f PVFS2 Server version 1.2.0 starting.
And then, actually start the pvfs2 server:
[root@host130:~]# pvfs2-server /etc/pvfs2-fs.conf /etc/pvfs2-server.conf-host130 PVFS2 Server version 0.6.0 starting. [root@host130:~]# ps aux | grep server root 1227 0.0 0.9 12404 1532 ? Rs 13:16 0:00 pvfs2-server /etc/pvfs2-fs.conf /etc/pvfs2-server.conf-host130 root 1228 0.0 0.9 12404 1532 ? S 13:16 0:00 pvfs2-server /etc/pvfs2-fs.conf /etc/pvfs2-server.conf-host130 root 1229 0.2 0.9 12404 1532 ? S 13:16 0:00 pvfs2-server /etc/pvfs2-fs.conf /etc/pvfs2-server.conf-host130 root 1230 0.0 0.9 12404 1532 ? S 13:16 0:00 pvfs2-server /etc/pvfs2-fs.conf /etc/pvfs2-server.conf-host130 root 1231 0.0 0.9 12404 1532 ? R 13:16 0:00 pvfs2-server /etc/pvfs2-fs.conf /etc/pvfs2-server.conf-host130 root 1232 0.0 0.9 12404 1532 ? R 13:16 0:00 pvfs2-server /etc/pvfs2-fs.conf /etc/pvfs2-server.conf-host130 [root@host130:~]#
[edit]
6. Test out the configuration with pvfs2-ping
[root@host130:~]# pvfs2-ping -m /mnt/rw/pvfs2 (1) Parsing tab file... (2) Initializing system interface... (3) Initializing each file system found in tab file: pvfs2tab... /mnt/rw/pvfs2: Ok (4) Searching for /mnt/rw/pvfs2 in pvfstab... PVFS2 server: tcp://host130:3334 Storage name: pvfs2-fs Local mount point: /mnt/rw/pvfs2 meta servers: tcp://host130:3334 data servers: tcp://host130:3334 (5) Verifying that all servers are responding... meta servers: tcp://host130:3334 Ok data servers: tcp://host130:3334 Ok (6) Verifying that fsid 1540970919 is acceptable to all servers... Ok; all servers understand fs_id 1540970919 (7) Verifying that root handle is owned by one server... Root handle: 1048576 Ok; root handle is owned by exactly one server. ============================================================= The PVFS filesystem at /mnt/rw/pvfs2 appears to be correctly configured. [root@host130:~]#
[edit]
7. Next, (optionally) configure the client services
- Load the pvfs2 module:
[root@host130:~]# modprobe -a pvfs2
[root@host130:~]# lsmod
Module Size Used by Not tainted
pvfs2 50308 0 (unused)
ide-floppy 12956 0 (autoclean)
af_packet 10120 1 (autoclean)
pcnet32 14304 1
mii 2176 0 [pcnet32]
crc32 2880 0 [pcnet32]
pcmcia_core 45472 0
nls_iso8859-1 2780 1 (autoclean)
nls_cp437 4284 1 (autoclean)
loop 9208 3 (autoclean)
unix 14312 22 (autoclean)
cloop 5616 1
[root@host130:~]#
- Prepare the mount point:
[root@host130:~]# mkdir /mnt/rw/pvfs2
- Start the client processes:
[root@host130:~]# pvfs2-client pvfs2-client-core
[root@host130:~]# ps aux | grep pvfs2-client
root 1255 0.2 0.2 2072 428 ? Ss 13:18 0:00 pvfs2-client pvfs2-client-core
root 1256 2.6 14.6 27572 23816 ? S 13:18 0:00 [pvfs2-client-co]
root 1259 0.0 14.6 27572 23816 ? S 13:18 0:00 [pvfs2-client-co]
[root@host130:~]#
- Finally, mount the pvfs2 filesystem:
[root@host130:~]# mount -t pvfs2 pvfs2 /mnt/rw/pvfs2 -o tcp://host130:3334/pvfs2-fs
[root@host130:~]# mount | grep pvfs2
pvfs2 on /mnt/rw/pvfs2 type pvfs2 (rw)
[root@host130:~]#
[edit]
8. Test out the system with pvfs2-ls and pvfs2-cp
- Test to see if the server target space is initialized (mainly just for the curiosity side of things):
[root@host130:~]# ls /mnt/rw/pvfs2-metastorage
5bd959a7 collections.db storage_attributes.db
- See what's there:
[root@host130:~]# pvfs2-ls /mnt/rw/pvfs2
(Yes, there's nothing there...we didn't populate it!)
- Populate the target filesystem and check to see that it shows up where it should:
[root@host130:~]# pvfs2-cp -t /lib/libc.so.6 /mnt/rw/pvfs2
Wrote 1070180 bytes in 0.040103 seconds. 25.449556 MB/seconds
[root@host130:~]# pvfs2-ls /mnt/rw/pvfs2
libc.so.6
[root@host130:~]# ls /mnt/rw/pvfs2
libc.so.6
[root@host130:~]#

