| 1 | % |
|---|
| 2 | % |
|---|
| 3 | \documentclass[11pt, letterpaper]{article} |
|---|
| 4 | \usepackage[dvips]{graphicx} |
|---|
| 5 | %\usepackage{html} |
|---|
| 6 | \usepackage{psfig} |
|---|
| 7 | \usepackage{rotating} |
|---|
| 8 | \usepackage{times} |
|---|
| 9 | \pagestyle{empty} |
|---|
| 10 | |
|---|
| 11 | % |
|---|
| 12 | % GET THE MARGINS RIGHT, THE UGLY WAY |
|---|
| 13 | % |
|---|
| 14 | \topmargin 0.0in |
|---|
| 15 | \textwidth 6.5in |
|---|
| 16 | \textheight 9.0in |
|---|
| 17 | \columnsep 0.25in |
|---|
| 18 | \oddsidemargin 0.0in |
|---|
| 19 | \evensidemargin 0.0in |
|---|
| 20 | \headsep 0.0in |
|---|
| 21 | \headheight 0.0in |
|---|
| 22 | |
|---|
| 23 | |
|---|
| 24 | \title{A Quick Start Guide to PVFS2} |
|---|
| 25 | \author{ PVFS2 Development Team } |
|---|
| 26 | \date{Last Updated: March 2004} |
|---|
| 27 | |
|---|
| 28 | % |
|---|
| 29 | % BEGINNING OF DOCUMENT |
|---|
| 30 | % |
|---|
| 31 | \begin{document} |
|---|
| 32 | \maketitle |
|---|
| 33 | |
|---|
| 34 | \tableofcontents |
|---|
| 35 | |
|---|
| 36 | \newpage |
|---|
| 37 | |
|---|
| 38 | \thispagestyle{empty} |
|---|
| 39 | |
|---|
| 40 | \section{How to use this document} |
|---|
| 41 | \label{sec:howto} |
|---|
| 42 | |
|---|
| 43 | The quick start guide is intended to be a reference on how to quickly |
|---|
| 44 | install and configure a PVFS2 file system. It is broken down into |
|---|
| 45 | three parts. The first describes how to download and compile the |
|---|
| 46 | PVFS2 software. The next section walks through the steps of |
|---|
| 47 | configuring PVFS2 to store and access files on a single host, which |
|---|
| 48 | may be useful for simple testing and evaluation. The final section of |
|---|
| 49 | this document describes how to install and configure PVFS2 in a true |
|---|
| 50 | cluster environment with multiple servers and/or clients. |
|---|
| 51 | |
|---|
| 52 | \subsection{Versions} |
|---|
| 53 | |
|---|
| 54 | This document only applies to alpha snapshots of PVFS2 as of March |
|---|
| 55 | 2004. |
|---|
| 56 | |
|---|
| 57 | \section{Downloading and compiling PVFS2} |
|---|
| 58 | |
|---|
| 59 | At this time, tarballs (and CVS access) are provided to trusted |
|---|
| 60 | parties. If you're reading this, you should have a method of |
|---|
| 61 | obtaining the PVFS2 source code. Once the source code is downloaded, |
|---|
| 62 | compiling the PVFS2 source code is a matter of running './configure', |
|---|
| 63 | followed by 'make' from the top level source directory. More detailed |
|---|
| 64 | instruction for building and installing are provided below. |
|---|
| 65 | |
|---|
| 66 | \subsection{Dependencies} |
|---|
| 67 | |
|---|
| 68 | The following software packages are currently required by PVFS2: |
|---|
| 69 | \begin{itemize} |
|---|
| 70 | \item Berkely DB (version 3 or 4) |
|---|
| 71 | \item aio support (provided by glibc and librt) |
|---|
| 72 | \item pthreads |
|---|
| 73 | \item gcc 2.9.x or newer |
|---|
| 74 | \item GNU Make |
|---|
| 75 | \end{itemize} |
|---|
| 76 | |
|---|
| 77 | The following software packages are currently encouraged for use with PVFS2: |
|---|
| 78 | \begin{itemize} |
|---|
| 79 | \item GNU Libc (glibc) 2.3.2 [ or later ] |
|---|
| 80 | \item Linux kernel version 2.6.0-test4, or later (NOTE: not necessary for |
|---|
| 81 | running PVFS2 servers, only the client kernel module) |
|---|
| 82 | \end{itemize} |
|---|
| 83 | |
|---|
| 84 | The following system assumptions are also made: |
|---|
| 85 | \begin{itemize} |
|---|
| 86 | \item A Homogeneous GNU/Linux environment |
|---|
| 87 | \end{itemize} |
|---|
| 88 | |
|---|
| 89 | ROMIO supports PVFS2. It is not provided with pvfs2, but can be found as part |
|---|
| 90 | of the following MPI implementations: |
|---|
| 91 | |
|---|
| 92 | \begin{itemize} |
|---|
| 93 | \item MPICH2-0.96p2 or newer |
|---|
| 94 | \end{itemize} |
|---|
| 95 | |
|---|
| 96 | \subsection{Untarring the packages} |
|---|
| 97 | |
|---|
| 98 | All source code is contained in one tarball: pvfs2-XXX.tgz. The |
|---|
| 99 | following example assumes that you will be building in the /usr/src |
|---|
| 100 | directory, although that is not required: |
|---|
| 101 | |
|---|
| 102 | \begin{verbatim} |
|---|
| 103 | [root@testhost /root]# cp pvfs2-XXX.tgz /usr/src |
|---|
| 104 | [root@testhost /root]# cd /usr/src |
|---|
| 105 | [root@testhost /usr/src]# tar -xzf pvfs2-XXX.tgz |
|---|
| 106 | [root@testhost /usr/src]# ln -s pvfs2-XXX pvfs2 |
|---|
| 107 | [root@testhost /usr/src]# ls -lF |
|---|
| 108 | total 476 |
|---|
| 109 | lrwxrwxrwx 1 root root 15 Aug 14 17:42 pvfs2 -> pvfs2-XXX/ |
|---|
| 110 | drwxr-xr-x 12 root root 512 Aug 14 10:11 pvfs2-XXX/ |
|---|
| 111 | -rw-r--r-- 1 root root 371535 Aug 14 17:41 pvfs2-XXX.tgz |
|---|
| 112 | |
|---|
| 113 | \end{verbatim} |
|---|
| 114 | |
|---|
| 115 | \subsection{Building and installing the packages} |
|---|
| 116 | |
|---|
| 117 | The default steps for building and installing PVFS2 are as follows: |
|---|
| 118 | |
|---|
| 119 | \begin{verbatim} |
|---|
| 120 | [root@testhost /usr/src]# cd pvfs2 |
|---|
| 121 | [root@testhost /usr/src/pvfs2-XXX]# ./configure |
|---|
| 122 | [root@testhost /usr/src/pvfs2-XXX]# make |
|---|
| 123 | [root@testhost /usr/src/pvfs2-XXX]# make install |
|---|
| 124 | \end{verbatim} |
|---|
| 125 | |
|---|
| 126 | Here are some optional configure arguments which may be of interest: |
|---|
| 127 | \begin{itemize} |
|---|
| 128 | \item --prefix=$<$path$>$: installs all files in the specified directory |
|---|
| 129 | (/usr/local/ is the default if --prefix is not specified) |
|---|
| 130 | \item --with-kernel=$<$path to kernel source$>$: this enables compilation of |
|---|
| 131 | the PVFS2 Linux kernel driver [ Requires Linux Kernel 2.6.0-test4 or later ] |
|---|
| 132 | \item --with-mpi=$<$path to mpi installation$>$: this enables compilation of MPI |
|---|
| 133 | based test programs |
|---|
| 134 | \item --with-efence: automatically links in Electric Fence for debugging assistance |
|---|
| 135 | \end{itemize} |
|---|
| 136 | |
|---|
| 137 | Also note that the pvfs2 kernel source supports out of tree builds if you |
|---|
| 138 | prefer to use that technique. |
|---|
| 139 | |
|---|
| 140 | \section{Configuring PVFS2 for a single host} |
|---|
| 141 | \label{sec:single} |
|---|
| 142 | |
|---|
| 143 | This section documents the steps required to configure PVFS2 on a system |
|---|
| 144 | in which a single machine acts as both the client and server for all |
|---|
| 145 | PVFS2 operations. It assumes that you have completed the above sections |
|---|
| 146 | on building and installation already. The hostname of the example machine |
|---|
| 147 | is ``testhost'' and will be referenced as such in the following examples. |
|---|
| 148 | IMPORTANT: if you intend to use the provided rc scripts to handle startup |
|---|
| 149 | and shutdown of the PVFS2 server, then you must specify a valid hostname |
|---|
| 150 | as reported by the \texttt{hostname} command line tool in the configuration. |
|---|
| 151 | For this reason, we recommend that you \emph{not} use ``localhost'' as |
|---|
| 152 | the hostname of your server, even if you intend to only test one machine. |
|---|
| 153 | We will store all PVFS2 data in /pvfs2-storage-space. /mnt/pvfs2 will |
|---|
| 154 | serve as the mount point for the file system. For more details about |
|---|
| 155 | the purpose of these directories please see the PVFS2 users guide. |
|---|
| 156 | |
|---|
| 157 | \subsection{Server configuration} |
|---|
| 158 | |
|---|
| 159 | Since this is a single host configuration, we only have to configure |
|---|
| 160 | one server daemon. In the original PVFS, the metadata and I/O servers |
|---|
| 161 | were separated into two separate programs (mgr and iod). PVFS2, |
|---|
| 162 | however, has only a single daemon called pvfs2-server which serves |
|---|
| 163 | both roles. |
|---|
| 164 | |
|---|
| 165 | The most important part of server configuration is simply generating |
|---|
| 166 | the configuration files. These can be created using the |
|---|
| 167 | pvfs2-genconfig script. This is an interactive script which will ask |
|---|
| 168 | several questions to determine your desired configuration. Please pay |
|---|
| 169 | particular attention to the listing of the metadata servers and I/O |
|---|
| 170 | servers. In this example we will use ``testhost'' for both. |
|---|
| 171 | |
|---|
| 172 | The pvfs2-genconfig tool will generate two configuration files. One |
|---|
| 173 | is a file system configuration file that will be identical for all |
|---|
| 174 | servers (if we had more than one). The second is a server specific |
|---|
| 175 | configuration file that will be different for each server. The server |
|---|
| 176 | specific files have the hostname of the server that they belong to |
|---|
| 177 | appended to the file name. This script should be excuted as root, so |
|---|
| 178 | that we can place the configuration files in their default /etc/ |
|---|
| 179 | locations. |
|---|
| 180 | |
|---|
| 181 | In this simple configuration, we can accept the default options for |
|---|
| 182 | every field. We will use the hostname ``testhost'' rather than |
|---|
| 183 | ``localhost'' however. |
|---|
| 184 | |
|---|
| 185 | \begin{verbatim} |
|---|
| 186 | root@testhost:~# /usr/bin/pvfs2-genconfig \ |
|---|
| 187 | /etc/pvfs2-fs.conf /etc/pvfs2-server.conf |
|---|
| 188 | ********************************************************************** |
|---|
| 189 | Welcome to the PVFS2 Configuration Generator: |
|---|
| 190 | |
|---|
| 191 | This interactive script will generate configuration files suitable |
|---|
| 192 | for use with a new PVFS2 file system. Please see the PVFS2 quickstart |
|---|
| 193 | guide for details. |
|---|
| 194 | |
|---|
| 195 | ********************************************************************** |
|---|
| 196 | |
|---|
| 197 | You must first select the network protocol that your file system will use. |
|---|
| 198 | The only currently supported options are "tcp", "gm", and "ib". |
|---|
| 199 | |
|---|
| 200 | * Enter protocol type [Default is tcp]: |
|---|
| 201 | |
|---|
| 202 | Choose a TCP/IP port for the servers to listen on. Note that this |
|---|
| 203 | script assumes that all servers will use the same port number. |
|---|
| 204 | |
|---|
| 205 | * Enter port number [Default is 3334]: |
|---|
| 206 | |
|---|
| 207 | Next you must list the hostnames of the machines that will act as |
|---|
| 208 | I/O servers. Acceptable syntax is "node1, node2, ..." or "node{#-#,#,#}". |
|---|
| 209 | |
|---|
| 210 | * Enter hostnames [Default is localhost]: testhost |
|---|
| 211 | |
|---|
| 212 | Now list the hostnames of the machines that will act as Metadata |
|---|
| 213 | servers. This list may or may not overlap with the I/O server list. |
|---|
| 214 | |
|---|
| 215 | * Enter hostnames [Default is localhost]: testhost |
|---|
| 216 | |
|---|
| 217 | Configured a total of 1 servers: |
|---|
| 218 | 1 of them are I/O servers. |
|---|
| 219 | 1 of them are Metadata servers. |
|---|
| 220 | |
|---|
| 221 | * Would you like to verify server list (y/n) [Default is n]? |
|---|
| 222 | |
|---|
| 223 | Choose a file for each server to write log messages to. |
|---|
| 224 | |
|---|
| 225 | * Enter log file location [Default is /tmp/pvfs2-server.log]: |
|---|
| 226 | |
|---|
| 227 | Choose a directory for each server to store data in. |
|---|
| 228 | |
|---|
| 229 | * Enter directory name: [Default is /pvfs2-storage-space]: |
|---|
| 230 | |
|---|
| 231 | Writing fs config file... Done. |
|---|
| 232 | Writing 1 server config file(s)... Done. |
|---|
| 233 | |
|---|
| 234 | Configuration complete! |
|---|
| 235 | \end{verbatim} |
|---|
| 236 | |
|---|
| 237 | \subsection{Starting the server} |
|---|
| 238 | |
|---|
| 239 | Before you run pvfs2-server for the first time, you must run it with a special |
|---|
| 240 | argument that tells it to create a new storage space if it does not already |
|---|
| 241 | exist. In this example, we must run the server as root in order to create |
|---|
| 242 | a storage space in /pvfs2-storage-space as specified in the configuration |
|---|
| 243 | files. |
|---|
| 244 | |
|---|
| 245 | \begin{verbatim} |
|---|
| 246 | bash-2.05b# /usr/sbin/pvfs2-server /etc/pvfs2-fs.conf \ |
|---|
| 247 | /etc/pvfs2-server.conf-testhost -f |
|---|
| 248 | \end{verbatim} |
|---|
| 249 | |
|---|
| 250 | Once the above step is done, you can start the server in normal mode |
|---|
| 251 | as follows: |
|---|
| 252 | |
|---|
| 253 | \begin{verbatim} |
|---|
| 254 | bash-2.05b# /usr/sbin/pvfs2-server /etc/pvfs2-fs.conf \ |
|---|
| 255 | /etc/pvfs2-server.conf-testhost |
|---|
| 256 | \end{verbatim} |
|---|
| 257 | |
|---|
| 258 | All log messages will be directed to /tmp/pvfs2-server.log, unless you specified |
|---|
| 259 | a different location while running pvfs2-genconfig. If you would prefer to run |
|---|
| 260 | pvfs2-server in the foreground and direct all messages to stderr, then |
|---|
| 261 | you may run the server as follows: |
|---|
| 262 | |
|---|
| 263 | \begin{verbatim} |
|---|
| 264 | bash-2.05b# /usr/sbin/pvfs2-server /etc/pvfs2-fs.conf \ |
|---|
| 265 | /etc/pvfs2-server.conf-testhost -d |
|---|
| 266 | \end{verbatim} |
|---|
| 267 | |
|---|
| 268 | \subsubsection{Automatic server startup and shutdown} |
|---|
| 269 | \label{sec:rc} |
|---|
| 270 | |
|---|
| 271 | Like most other system services, PVFS2 may be started up automatically |
|---|
| 272 | at boot up time through the use of rc scripts. We have provided one |
|---|
| 273 | such script that is suitable for use on RedHat (or similar) rc |
|---|
| 274 | systems. The following example demonstrates how to set this up: |
|---|
| 275 | |
|---|
| 276 | \begin{verbatim} |
|---|
| 277 | bash-2.05b# cp /usr/src/pvfs2/examples/pvfs2-server.rc \ |
|---|
| 278 | /etc/rc.d/init.d/pvfs2-server |
|---|
| 279 | bash-2.05b# chmod a+x /etc/rc.d/init.d/pvfs2-server |
|---|
| 280 | bash-2.05b# chkconfig pvfs2-server on |
|---|
| 281 | bash-2.05b# ls -al /etc/rc.d/rc3.d/S35pvfs2-server |
|---|
| 282 | lrwxrwxrwx 1 root root 22 Sep 21 13:11 /etc/rc.d/rc3.d/S35pvfs2-server \ |
|---|
| 283 | -> ../init.d/pvfs2-server |
|---|
| 284 | \end{verbatim} |
|---|
| 285 | |
|---|
| 286 | This script will now automatically launch on startup and shutdown to |
|---|
| 287 | ensure that the pvfs2-server is started and stopped gracefully. |
|---|
| 288 | To manually start the server, you can run the following command: |
|---|
| 289 | |
|---|
| 290 | \begin{verbatim} |
|---|
| 291 | bash-2.05b# /etc/rc.d/init.d/pvfs2-server start |
|---|
| 292 | Starting PVFS2 server: [ OK ] |
|---|
| 293 | \end{verbatim} |
|---|
| 294 | |
|---|
| 295 | To manually stop the server: |
|---|
| 296 | |
|---|
| 297 | \begin{verbatim} |
|---|
| 298 | bash-2.05b# /etc/rc.d/init.d/pvfs2-server stop |
|---|
| 299 | Stopping PVFS2 server: [ OK ] |
|---|
| 300 | \end{verbatim} |
|---|
| 301 | |
|---|
| 302 | \subsection{Client configuration} |
|---|
| 303 | \label{subsec:client} |
|---|
| 304 | |
|---|
| 305 | There are two primary methods for accessing a PVFS2 file system. The |
|---|
| 306 | first is the native PVFS2 interface which is made available through |
|---|
| 307 | {\tt libpvfs2}. This also happens to be the same interface used by |
|---|
| 308 | ROMIO if you configure your system to use MPI-IO. The second method |
|---|
| 309 | relies on a kernel module to provide standard Linux file system |
|---|
| 310 | compatibility. This interface allows the user to use existing |
|---|
| 311 | binaries and system utilities on PVFS2 without recompiling. We will |
|---|
| 312 | cover how to configure both access methods here. |
|---|
| 313 | |
|---|
| 314 | We must create a mount point for the file system as well as an {\tt |
|---|
| 315 | /etc/pvfs2tab} entry that will be used by the PVFS2 libraries to |
|---|
| 316 | locate the file system. The {\tt pvfs2tab} file is analogous to the |
|---|
| 317 | {\tt /etc/fstab} file that most linux systems use to keep up with file |
|---|
| 318 | system mount points. |
|---|
| 319 | |
|---|
| 320 | \begin{verbatim} |
|---|
| 321 | [root@testhost /root]# mkdir /mnt/pvfs2 |
|---|
| 322 | [root@testhost /root]# touch /etc/pvfs2tab |
|---|
| 323 | [root@testhost /root]# chmod a+r /etc/pvfs2tab |
|---|
| 324 | \end{verbatim} |
|---|
| 325 | |
|---|
| 326 | Now edit this file so that it contains the following, except that you should |
|---|
| 327 | substitute your host name in place of ``testhost'': |
|---|
| 328 | |
|---|
| 329 | \begin{verbatim} |
|---|
| 330 | tcp://testhost:3334/pvfs2-fs /mnt/pvfs2 pvfs2 default 0 0 |
|---|
| 331 | \end{verbatim} |
|---|
| 332 | |
|---|
| 333 | \subsection{Testing your installation} |
|---|
| 334 | \label{subsec:testing} |
|---|
| 335 | PVFS2 currently includes (among others) the following tools for |
|---|
| 336 | manipulating the file system using the native PVFS2 library: |
|---|
| 337 | pvfs2-ping, pvfs2-import, pvfs2-ls, and pvfs2-export. These tools |
|---|
| 338 | check the health of the file system, import local files, list the |
|---|
| 339 | contents of directories, and export files, respectively. Their usage |
|---|
| 340 | can best be summarized with the following examples: |
|---|
| 341 | |
|---|
| 342 | \begin{verbatim} |
|---|
| 343 | bash-2.05b# ./pvfs2-ping -m /mnt/pvfs2 |
|---|
| 344 | |
|---|
| 345 | (1) Searching for /mnt/pvfs2 in /etc/pvfs2tab... |
|---|
| 346 | |
|---|
| 347 | Initial server: tcp://testhost:3334 |
|---|
| 348 | Storage name: pvfs2-fs |
|---|
| 349 | Local mount point: /mnt/pvfs2 |
|---|
| 350 | |
|---|
| 351 | (2) Initializing system interface and retrieving configuration from server... |
|---|
| 352 | |
|---|
| 353 | meta servers (duplicates are normal): |
|---|
| 354 | tcp://testhost:3334 |
|---|
| 355 | |
|---|
| 356 | data servers (duplicates are normal): |
|---|
| 357 | tcp://testhost:3334 |
|---|
| 358 | |
|---|
| 359 | (3) Verifying that all servers are responding... |
|---|
| 360 | |
|---|
| 361 | meta servers (duplicates are normal): |
|---|
| 362 | tcp://testhost:3334 Ok |
|---|
| 363 | |
|---|
| 364 | data servers (duplicates are normal): |
|---|
| 365 | tcp://testhost:3334 Ok |
|---|
| 366 | |
|---|
| 367 | (4) Verifying that fsid 9 is acceptable to all servers... |
|---|
| 368 | |
|---|
| 369 | Ok; all servers understand fs_id 9 |
|---|
| 370 | |
|---|
| 371 | (5) Verifying that root handle is owned by one server... |
|---|
| 372 | |
|---|
| 373 | Root handle: 0x00100000 |
|---|
| 374 | Ok; root handle is owned by exactly one server. |
|---|
| 375 | |
|---|
| 376 | ============================================================= |
|---|
| 377 | |
|---|
| 378 | The PVFS2 filesystem at /mnt/pvfs2 appears to be correctly configured. |
|---|
| 379 | |
|---|
| 380 | bash-2.05b# ./pvfs2-ls /mnt/pvfs2/ |
|---|
| 381 | |
|---|
| 382 | bash-2.05b# ./pvfs2-import /usr/lib/libc.a /mnt/pvfs2/testfile |
|---|
| 383 | PVFS2 Import Statistics: |
|---|
| 384 | ******************************************************** |
|---|
| 385 | Destination path (local): /mnt/pvfs2/testfile |
|---|
| 386 | Destination path (PVFS2 file system): /testfile |
|---|
| 387 | File system name: pvfs2-fs |
|---|
| 388 | Initial config server: tcp://localhost:3334 |
|---|
| 389 | ******************************************************** |
|---|
| 390 | Bytes written: 2555802 |
|---|
| 391 | Elapsed time: 0.416727 seconds |
|---|
| 392 | Bandwidth: 5.848920 MB/second |
|---|
| 393 | ******************************************************** |
|---|
| 394 | |
|---|
| 395 | bash-2.05b# ./pvfs2-ls /mnt/pvfs2/ |
|---|
| 396 | testfile |
|---|
| 397 | |
|---|
| 398 | bash-2.05b# ./pvfs2-ls -alh /mnt/pvfs2/ |
|---|
| 399 | drwxrwxrwx 1 pcarns users 0 2003-08-14 22:45 . |
|---|
| 400 | drwxrwxrwx 1 pcarns users 0 2003-08-14 22:45 .. (faked) |
|---|
| 401 | -rw------- 1 root root 2M 2003-08-14 22:47 testfile |
|---|
| 402 | |
|---|
| 403 | bash-2.05b# ./pvfs2-export /mnt/pvfs2/testfile /tmp/testfile-out |
|---|
| 404 | PVFS2 Import Statistics: |
|---|
| 405 | ******************************************************** |
|---|
| 406 | Source path (local): /mnt/pvfs2/testfile |
|---|
| 407 | Source path (PVFS2 file system): /testfile |
|---|
| 408 | File system name: pvfs2-fs |
|---|
| 409 | Initial config server: tcp://localhost:3334 |
|---|
| 410 | ******************************************************** |
|---|
| 411 | Bytes written: 2555802 |
|---|
| 412 | Elapsed time: 0.443431 seconds |
|---|
| 413 | Bandwidth: 5.496690 MB/second |
|---|
| 414 | ******************************************************** |
|---|
| 415 | |
|---|
| 416 | bash-2.05b# diff /tmp/testfile-out /usr/lib/libc.a |
|---|
| 417 | \end{verbatim} |
|---|
| 418 | |
|---|
| 419 | \section{Installing PVFS2 on a cluster} |
|---|
| 420 | \label{sec:cluster} |
|---|
| 421 | It is important to have in mind the roles that machines (a.k.a. nodes) will |
|---|
| 422 | play in the PVFS2 system. There are three potential roles that a machine might |
|---|
| 423 | play: metadata server, I/O server, or client. |
|---|
| 424 | |
|---|
| 425 | A metadata server is a node that keeps up with metadata (such as permissions |
|---|
| 426 | and time stamps) for the file system. An I/O server is a node that actually |
|---|
| 427 | stores a portion of the PVFS2 file data. A client is a node that can read and |
|---|
| 428 | write PVFS2 files. Your applications will typically be run on PVFS2 clients so |
|---|
| 429 | that they can access the file system. |
|---|
| 430 | |
|---|
| 431 | A machine can fill one, two, or all of these roles simultaneously. Unlike |
|---|
| 432 | PVFS-1, each role requires just the pvfs2-server binary. It will consult the |
|---|
| 433 | cluster-wide config file and the node-specific config file when it starts up to |
|---|
| 434 | know what role pvfs2-server should perform on this machine. |
|---|
| 435 | |
|---|
| 436 | We currently support just one metadata server (this limit will be raised in the |
|---|
| 437 | future). There can be many I/O servers and clients. In this section we will |
|---|
| 438 | discuss the components and configuration files needed to fulfill each role. |
|---|
| 439 | |
|---|
| 440 | We will configure our example system so that the node ``cluster1'' provides |
|---|
| 441 | metadata information, eight nodes (named ``cluster1'' through ``cluster8'') |
|---|
| 442 | provide I/O services, and all nodes act as clients. |
|---|
| 443 | |
|---|
| 444 | \subsection{Server configuration} |
|---|
| 445 | We will assume that at this point you have either performed a make install |
|---|
| 446 | on every node, or else have provided the pvfs2 executables, headers, and |
|---|
| 447 | libraries to each machine by some other means. |
|---|
| 448 | |
|---|
| 449 | Installing PVFS2 on a cluster is quite similar to installing it on a single |
|---|
| 450 | machine, so familiarize yourself with Section \ref{sec:single}. We are going |
|---|
| 451 | to generate one master config file and 8 smaller node-specific config files. |
|---|
| 452 | Again, remember that it is critical to list correct hostnames for each machine, |
|---|
| 453 | and to make sure that these hostnames match the output of the \texttt{hostname} |
|---|
| 454 | command on each machine that will act as a server. |
|---|
| 455 | |
|---|
| 456 | \begin{verbatim} |
|---|
| 457 | root@cluster1:~# /usr/local/pvfs2/bin/pvfs2-genconfig \ |
|---|
| 458 | /etc/pvfs2-fs.conf /etc/pvfs2-server.conf |
|---|
| 459 | ********************************************************************** |
|---|
| 460 | Welcome to the PVFS2 Configuration Generator: |
|---|
| 461 | |
|---|
| 462 | This interactive script will generate configuration files suitable |
|---|
| 463 | for use with a new PVFS2 file system. Please see the PVFS2 quickstart |
|---|
| 464 | guide for details. |
|---|
| 465 | |
|---|
| 466 | ********************************************************************** |
|---|
| 467 | |
|---|
| 468 | You must first select the network protocol that your file system will use. |
|---|
| 469 | The only currently supported options are "tcp" and "gm". |
|---|
| 470 | |
|---|
| 471 | * Enter protocol type [Default is tcp]: |
|---|
| 472 | |
|---|
| 473 | Choose a TCP/IP port for the servers to listen on. Note that this |
|---|
| 474 | script assumes that all servers will use the same port number. |
|---|
| 475 | |
|---|
| 476 | * Enter port number [Default is 3334]: |
|---|
| 477 | |
|---|
| 478 | Next you must list the hostnames of the machines that will act as |
|---|
| 479 | I/O servers. Acceptable syntax is "node1, node2, ..." or "node{#-#,#,#}". |
|---|
| 480 | |
|---|
| 481 | * Enter hostnames [Default is localhost]: cluster{1-8} |
|---|
| 482 | |
|---|
| 483 | Now list the hostnames of the machines that will act as Metadata |
|---|
| 484 | servers. This list may or may not overlap with the I/O server list. |
|---|
| 485 | |
|---|
| 486 | * Enter hostnames [Default is localhost]: cluster1 |
|---|
| 487 | |
|---|
| 488 | Configured a total of 8 servers: |
|---|
| 489 | 8 of them are I/O servers. |
|---|
| 490 | 1 of them are Metadata servers. |
|---|
| 491 | |
|---|
| 492 | * Would you like to verify server list (y/n) [Default is n]? y |
|---|
| 493 | |
|---|
| 494 | ****** I/O servers: |
|---|
| 495 | tcp://cluster1:3334 |
|---|
| 496 | tcp://cluster2:3334 |
|---|
| 497 | tcp://cluster3:3334 |
|---|
| 498 | tcp://cluster4:3334 |
|---|
| 499 | tcp://cluster5:3334 |
|---|
| 500 | tcp://cluster6:3334 |
|---|
| 501 | tcp://cluster7:3334 |
|---|
| 502 | tcp://cluster8:3334 |
|---|
| 503 | |
|---|
| 504 | ****** Metadata servers: |
|---|
| 505 | tcp://cluster1:3334 |
|---|
| 506 | |
|---|
| 507 | * Does this look ok (y/n) [Default is y]? y |
|---|
| 508 | |
|---|
| 509 | Choose a file for each server to write log messages to. |
|---|
| 510 | |
|---|
| 511 | * Enter log file location [Default is /tmp/pvfs2-server.log]: |
|---|
| 512 | |
|---|
| 513 | Choose a directory for each server to store data in. |
|---|
| 514 | |
|---|
| 515 | * Enter directory name: [Default is /pvfs2-storage-space]: |
|---|
| 516 | |
|---|
| 517 | Writing fs config file... Done. |
|---|
| 518 | Writing 8 server config file(s)... Done. |
|---|
| 519 | |
|---|
| 520 | Configuration complete! |
|---|
| 521 | \end{verbatim} |
|---|
| 522 | |
|---|
| 523 | We have now made all the config files for an 8-node storage cluster: |
|---|
| 524 | \begin{verbatim} |
|---|
| 525 | root@cluster1:~# ls /etc/pvfs2/foo/ |
|---|
| 526 | pvfs2-fs.conf pvfs2-server.conf-cluster5 |
|---|
| 527 | pvfs2-server.conf-cluster1 pvfs2-server.conf-cluster6 |
|---|
| 528 | pvfs2-server.conf-cluster2 pvfs2-server.conf-cluster7 |
|---|
| 529 | pvfs2-server.conf-cluster3 pvfs2-server.conf-cluster8 |
|---|
| 530 | pvfs2-server.conf-cluster4 |
|---|
| 531 | \end{verbatim} |
|---|
| 532 | |
|---|
| 533 | Now the config files must be copied out to all of the server nodes. If you |
|---|
| 534 | use the provided (Redhat style) rc scripts, then you can simply copy all |
|---|
| 535 | config files to every node; each server will pick the correct config files |
|---|
| 536 | based on its own hostname at startup time. The following example assumes |
|---|
| 537 | that you will use scp to copy files to cluster nodes. Other possibilities |
|---|
| 538 | include rcp, bpcp, or simply storing the configuration files on an NFS volume. |
|---|
| 539 | Please note, however, that the rc script should be modified if you intend |
|---|
| 540 | to store config files in any location other than the default /etc/. |
|---|
| 541 | |
|---|
| 542 | At this time, we also will copy out the example rc script an enable it on |
|---|
| 543 | each machine. |
|---|
| 544 | |
|---|
| 545 | \begin{verbatim} |
|---|
| 546 | root@cluster1:~# for i in `seq 1 8`; do |
|---|
| 547 | > scp /etc/pvfs2-server.conf-cluster\${i} cluster\${i}:/etc/ |
|---|
| 548 | > scp /etc/pvfs2-fs.conf cluster\${i}:/etc/ |
|---|
| 549 | > scp /usr/src/pvfs2/examples/pvfs2-server.rc \ |
|---|
| 550 | cluster\${i}:/etc/rc.d/init.d/pvfs2-server |
|---|
| 551 | > ssh cluster\${i} /sbin/chkconfig pvfs2-server on |
|---|
| 552 | > done |
|---|
| 553 | \end{verbatim} |
|---|
| 554 | |
|---|
| 555 | \subsection{Starting the servers} |
|---|
| 556 | |
|---|
| 557 | As with the single-machine case, you must run pvfs2-server with a |
|---|
| 558 | special argument to create the storage space on all the nodes if it |
|---|
| 559 | does not already exist. Run the following command on every metadata |
|---|
| 560 | or IO node in the cluster: |
|---|
| 561 | |
|---|
| 562 | \begin{verbatim} |
|---|
| 563 | root@cluster1# /usr/sbin/pvfs2-server /etc/pvfs2-fs.conf \ |
|---|
| 564 | /etc/pvfs2-server.conf -f |
|---|
| 565 | \end{verbatim} |
|---|
| 566 | |
|---|
| 567 | Then once the storage space is created, start the server for real with a |
|---|
| 568 | command like this on every metadata or IO node in the cluster: |
|---|
| 569 | |
|---|
| 570 | \begin{verbatim} |
|---|
| 571 | root@cluster1# /usr/sbin/pvfs2-server /etc/pvfs2-fs.conf \ |
|---|
| 572 | /etc/pvfs2-server.conf |
|---|
| 573 | \end{verbatim} |
|---|
| 574 | |
|---|
| 575 | If you want to run the server in the foreground (e.g. for debugging), use the |
|---|
| 576 | -d option. |
|---|
| 577 | |
|---|
| 578 | If you wish to automate server startup and shutdown with rc scripts, refer |
|---|
| 579 | to the corresponding section \ref{sec:rc} from the single server example. |
|---|
| 580 | |
|---|
| 581 | \subsection{Client configuration} |
|---|
| 582 | |
|---|
| 583 | Setting up a client for multiple servers is the same as setting up a client for a single server. Refer to section \ref{subsec:client}. |
|---|
| 584 | |
|---|
| 585 | \subsection {Testing your Installation} |
|---|
| 586 | |
|---|
| 587 | Testing a multiple-server pvfs2 installation is the same as testing a |
|---|
| 588 | single-server pvfs2 installation. Refer to section |
|---|
| 589 | \ref{subsec:testing} |
|---|
| 590 | |
|---|
| 591 | \section{Configuring the PVFS2 Linux VFS Interface} |
|---|
| 592 | \label{sec:vfs-configure} |
|---|
| 593 | |
|---|
| 594 | Assuming you've mastered the download and installation steps of |
|---|
| 595 | managing the PVFS2 source code, configuring the PVFS2 Linux VFS |
|---|
| 596 | Interface is relatively straight forward. We assume at this point |
|---|
| 597 | that you are familiar with running the server and that a PVFS2 storage |
|---|
| 598 | space has already been created on the node that you would like to |
|---|
| 599 | configure for use with the VFS. We also assume that you are able to |
|---|
| 600 | run a Linux 2.6.0-test4 kernel or later. |
|---|
| 601 | |
|---|
| 602 | The basic steps are as follows: |
|---|
| 603 | \begin{itemize} |
|---|
| 604 | \item Make sure you are running Linux Kernel version 2.6.0-test4 or |
|---|
| 605 | later |
|---|
| 606 | \item Compile the PVFS2 Kernel Module against your running kernel |
|---|
| 607 | \end{itemize} |
|---|
| 608 | |
|---|
| 609 | Check to make sure that you are running a Linux 2.6.0-test4 Kernel or |
|---|
| 610 | later. You can do this in the following manner: |
|---|
| 611 | |
|---|
| 612 | \begin{verbatim} |
|---|
| 613 | gil:~# cat /proc/version |
|---|
| 614 | Linux version 2.6.0-test4 (root@gil) (gcc version 3.3.1 20030722 |
|---|
| 615 | (Debian prerelease)) #1 Thu Aug 14 14:32:57 CDT 2003 |
|---|
| 616 | \end{verbatim} |
|---|
| 617 | |
|---|
| 618 | By issuing that command, we are able to inspect the output to ensure |
|---|
| 619 | that we're running an appropriate kernel version. If your kernel is |
|---|
| 620 | older than this version, please download the latest kernel available |
|---|
| 621 | at: |
|---|
| 622 | |
|---|
| 623 | \begin{verbatim} |
|---|
| 624 | http://www.kernel.org/pub/linux/kernel/v2.6/ |
|---|
| 625 | |
|---|
| 626 | (or your favorite mirror site) |
|---|
| 627 | \end{verbatim} |
|---|
| 628 | |
|---|
| 629 | Once you're convinced the Linux kernel version is appropriate, it's |
|---|
| 630 | time to compile the PVFS2 kernel module. To generate the Makefile, |
|---|
| 631 | you need to make sure that you run './configure' with the |
|---|
| 632 | '--with-kernel=path' argument. An example is provided here for your |
|---|
| 633 | convenience: |
|---|
| 634 | |
|---|
| 635 | \begin{verbatim} |
|---|
| 636 | gil:/usr/src/pvfs2# ./configure --with-kernel=/usr/src/linux |
|---|
| 637 | \end{verbatim} |
|---|
| 638 | |
|---|
| 639 | This example assumes that you've already downloaded, compiled, and are |
|---|
| 640 | now running the kernel located in the /usr/src/linux directory. After |
|---|
| 641 | this command is issued, build the PVFS2 source tree if it has not yet |
|---|
| 642 | been built. |
|---|
| 643 | |
|---|
| 644 | Building the kernel module requires an extra step. Since current kernels |
|---|
| 645 | require writing a file in the kernel source directory to build a module, you |
|---|
| 646 | may have to become root to compile the kernel module. To build the module, |
|---|
| 647 | type ``make kmod''. |
|---|
| 648 | |
|---|
| 649 | At this point, we have a valid PVFS2 Kernel module. The module itself |
|---|
| 650 | is the file {\tt pvfs.ko} in subdirectory {\tt src/kernel/linux-2.6} in |
|---|
| 651 | your build tree. You may install it |
|---|
| 652 | to the standard system location with ``make kmod\_install'', again you will |
|---|
| 653 | likely have to be root to do this. Or you may override the install location |
|---|
| 654 | by setting the variable {\tt KMOD\_DIR} variable when you install. |
|---|
| 655 | |
|---|
| 656 | \section{Testing the PVFS2 Linux VFS Interface} |
|---|
| 657 | \label{sec:vfs-test} |
|---|
| 658 | |
|---|
| 659 | Now that you've built a valid PVFS2 kernel module, there are several |
|---|
| 660 | steps to perform to properly use the file system. |
|---|
| 661 | |
|---|
| 662 | The basic steps are as follows: |
|---|
| 663 | \begin{itemize} |
|---|
| 664 | \item Create a mount point on the local filesystem |
|---|
| 665 | \item Load the Kernel Module into the running kernel |
|---|
| 666 | \item Start the PVFS2 Server application |
|---|
| 667 | \item Start the PVFS2 Client application |
|---|
| 668 | \item Mount your existing PVFS2 volume on the local filesystem |
|---|
| 669 | \item Issue VFS commands |
|---|
| 670 | \end{itemize} |
|---|
| 671 | |
|---|
| 672 | First, choose where you'd like to mount your existing PVFS2 volume. |
|---|
| 673 | Create this directory on the local file system if it does not already |
|---|
| 674 | exist. Our mount point in this example is /mnt/pvfs2. |
|---|
| 675 | |
|---|
| 676 | \begin{verbatim} |
|---|
| 677 | gil:~# mkdir /mnt/pvfs2 |
|---|
| 678 | \end{verbatim} |
|---|
| 679 | |
|---|
| 680 | Now load the kernel module into your running kernel. You can do this |
|---|
| 681 | by using the 'insmod' program, or modprobe if you've copied your |
|---|
| 682 | module into the appropriate /lib/modules directory for your running |
|---|
| 683 | kernel. You can then verify that the module was loaded properly using |
|---|
| 684 | 'lsmod' as follows: |
|---|
| 685 | |
|---|
| 686 | \begin{verbatim} |
|---|
| 687 | gil:~# insmod /usr/src/pvfs2/src/kernel/linux-2.6/pvfs2.ko |
|---|
| 688 | gil:~# lsmod |
|---|
| 689 | Module Size Used by |
|---|
| 690 | pvfs2 52320 0 |
|---|
| 691 | \end{verbatim} |
|---|
| 692 | |
|---|
| 693 | Note that the module size observed does NOT need to match that as |
|---|
| 694 | shown above. Also, you can use 'rmmod' to remove the PVFS2 module |
|---|
| 695 | after it's been loaded. |
|---|
| 696 | |
|---|
| 697 | At this point, we need to start the PVFS2 server and the PVFS2 client |
|---|
| 698 | applications before trying to mount a PVFS2 volume. See previous |
|---|
| 699 | sections on how to properly start the PVFS2 server if you're unsure. |
|---|
| 700 | Starting the PVFS2 client is covered below. |
|---|
| 701 | |
|---|
| 702 | The PVFS2 client application consists of two programs. |
|---|
| 703 | pvfs2-client-core and pvfs2-client. Do not run pvfs2-client-core by |
|---|
| 704 | itself. pvfs2-client is the PVFS2 client application. This |
|---|
| 705 | application cannot be started unless the PVFS2 server is already |
|---|
| 706 | running. Here is an example of how to start the PVFS2 client: |
|---|
| 707 | |
|---|
| 708 | \begin{verbatim} |
|---|
| 709 | gil:/usr/src/pvfs2# cd test/kernel/linux-2.6/ |
|---|
| 710 | gil:/usr/src/pvfs2/test/kernel/linux-2.6# ./pvfs2-client -f -p ./pvfs2-client-core |
|---|
| 711 | pvfs2-client starting |
|---|
| 712 | Spawning new child process |
|---|
| 713 | About to exec ./pvfs2-client-core |
|---|
| 714 | Waiting on child with pid 17731 |
|---|
| 715 | \end{verbatim} |
|---|
| 716 | |
|---|
| 717 | The -f argument is not required. For reference, this keeps the PVFS2 |
|---|
| 718 | client application running in the foreground. |
|---|
| 719 | |
|---|
| 720 | The -p argument is required unless the pvfs2-client-core is installed |
|---|
| 721 | and can be found in your PATH. |
|---|
| 722 | |
|---|
| 723 | Now that the module is loaded, and the pvfs2-server and pvfs2-client |
|---|
| 724 | programs are running, we can mount our PVFS2 file system (and verify |
|---|
| 725 | that it's properly mounted) as follows: |
|---|
| 726 | |
|---|
| 727 | \begin{verbatim} |
|---|
| 728 | gil:~# mount -t pvfs2 tcp://testhost:3334/pvfs2-fs /mnt/pvfs2 |
|---|
| 729 | gil:~# mount |
|---|
| 730 | /dev/hda3 on / type ext3 (rw,errors=remount-ro) |
|---|
| 731 | proc on /proc type proc (rw) |
|---|
| 732 | devpts on /dev/pts type devpts (rw,gid=5,mode=620) |
|---|
| 733 | /dev/hda1 on /boot type ext2 (rw) |
|---|
| 734 | pvfs2 on /mnt/pvfs2 type pvfs2 (rw) |
|---|
| 735 | \end{verbatim} |
|---|
| 736 | |
|---|
| 737 | NOTE: The device of the format tcp://testhost:3334/pvfs2-fs MUST be |
|---|
| 738 | specified, as we need to know a valid running pvfs2-server and file |
|---|
| 739 | system name to dynamically mount a pvfs2 volume. These values can be |
|---|
| 740 | read from your configuration files. As a side note, you can use |
|---|
| 741 | 'umount' to unmount the PVFS2 volume when you're ready. |
|---|
| 742 | |
|---|
| 743 | Now that a PVFS2 volume is mounted, normal VFS operation can be issued |
|---|
| 744 | on the command line. An example is provided below: |
|---|
| 745 | |
|---|
| 746 | \begin{verbatim} |
|---|
| 747 | gil:/usr/src/pvfs2/src/kernel/linux-2.6# mkdir /mnt/pvfs2/newdir |
|---|
| 748 | gil:/usr/src/pvfs2/src/kernel/linux-2.6# ls -al /mnt/pvfs2/newdir |
|---|
| 749 | total 1 |
|---|
| 750 | drwxr-xr-x 2 root root 0 Aug 15 13:29 . |
|---|
| 751 | drwxr-xr-x 3 root root 0 Aug 15 13:21 .. |
|---|
| 752 | gil:/usr/src/pvfs2/src/kernel/linux-2.6# cp pvfs2.ko |
|---|
| 753 | /mnt/pvfs2/newdir/foo |
|---|
| 754 | gil:/usr/src/pvfs2/src/kernel/linux-2.6# ls -al /mnt/pvfs2/newdir |
|---|
| 755 | total 2 |
|---|
| 756 | drwxr-xr-x 2 root root 0 Aug 15 13:29 . |
|---|
| 757 | drwxr-xr-x 3 root root 0 Aug 15 13:21 .. |
|---|
| 758 | -rw-r--r-- 1 root root 330526 Aug 15 13:30 foo |
|---|
| 759 | \end{verbatim} |
|---|
| 760 | |
|---|
| 761 | \appendix |
|---|
| 762 | |
|---|
| 763 | \section{Notes on running PVFS2 without root access} |
|---|
| 764 | |
|---|
| 765 | The preceding documentation assumes that you have root access on the |
|---|
| 766 | machine(s) that you wish to install the file system. However, this is not |
|---|
| 767 | strictly required for any component except for the kernel VFS support. The |
|---|
| 768 | servers, client libraries (such as MPI-IO), and administrative tools can all |
|---|
| 769 | be used by non-priviledged users. This may be particularly useful for |
|---|
| 770 | evaluation or testing purposes. |
|---|
| 771 | |
|---|
| 772 | In order to do this, you must make the following adjustments to the |
|---|
| 773 | installation and configuration process: |
|---|
| 774 | \begin{itemize} |
|---|
| 775 | \item Use the --prefix option at configure time to choose an alternate |
|---|
| 776 | directory (one that you have write access to) for installation. An example |
|---|
| 777 | would be /home/username/pvfs2-build. |
|---|
| 778 | \item When generating the server config files, choose a data storage |
|---|
| 779 | directory that you have write access to, but preferably not NFS mounted. An |
|---|
| 780 | example would be /tmp/pvfs2-test-space. |
|---|
| 781 | \item Place the pvfs2tab file in an alternate location, such as |
|---|
| 782 | /home/username/pvfs2-build/pvfs2tab, instead of /etc/pvfs2tab. |
|---|
| 783 | Then set the PVFS2TAB\_FILE environment variable to the full path |
|---|
| 784 | to this file. A tcsh example would be: ``setenv PVFS2TAB\_FILE |
|---|
| 785 | /home/username/pvfs2-build/pvfs2tab''. |
|---|
| 786 | \end{itemize} |
|---|
| 787 | |
|---|
| 788 | |
|---|
| 789 | \section{Debugging your PVFS2 configuration} |
|---|
| 790 | |
|---|
| 791 | Bug reports and questions should be directed to the PVFS2 users mailing list |
|---|
| 792 | for best results (see the PVFS2 web site for details: |
|---|
| 793 | http://www.pvfs.org/pvfs2/lists.html). It is helpful to |
|---|
| 794 | include a description of your problem, the PVFS2 version number, and include |
|---|
| 795 | relevant log information from /var/log/messages and /tmp/pvfs2-server.log. |
|---|
| 796 | |
|---|
| 797 | People who wish to find more verbose information about what the file |
|---|
| 798 | system is doing can enable extra logging messages from the server. |
|---|
| 799 | This is done by adjusting the ``EventLogging'' field in the file system |
|---|
| 800 | configuration file. By default it is set to ``none''. You can set it to |
|---|
| 801 | a comma seperated list of log masks to get more information. An example |
|---|
| 802 | would be ``EventLogging storage,network,server'', which will result |
|---|
| 803 | in verbose messages from the storage subsystem, the network subsystem, |
|---|
| 804 | and server state machines. \emph{WARNING: this may result in extremely |
|---|
| 805 | large log files!} The logging masks can also be set at runtime using the |
|---|
| 806 | pvfs2-set-debugmask command line tool. Usage information and a list of |
|---|
| 807 | supported masks will be shown if it is run with no arguments. |
|---|
| 808 | |
|---|
| 809 | Similarly, run-time client debugging information can be gathered by |
|---|
| 810 | using environment variables before running the client application. |
|---|
| 811 | The default client logging method is to set the variable |
|---|
| 812 | PVFS2\_DEBUGMASK to values such as ``client,network''. Many of the |
|---|
| 813 | supported client debugging masks overlap the server masks that can be |
|---|
| 814 | verified using pvfs2-set-debugmask. By default, setting |
|---|
| 815 | PVFS2\_DEBUGMASK emits debugging information to stderr, often |
|---|
| 816 | intermixed with the client program output. If you'd like to redirect |
|---|
| 817 | client debugging to a file, set the PVFS2\_DEBUGFILE environment |
|---|
| 818 | variable to a valid file name. This causes all debug information |
|---|
| 819 | specified by the PVFS2\_DEBUGMASK to be stored in the file specified, |
|---|
| 820 | no longer intermixing the output with the client program. |
|---|
| 821 | |
|---|
| 822 | \section{ROMIO Support} |
|---|
| 823 | \label{sec:romio} |
|---|
| 824 | |
|---|
| 825 | Building ROMIO with PVFS2 support can be a bit tricky, and is certainly |
|---|
| 826 | not well documented. While ROMIO has been updated with PVFS2 support, |
|---|
| 827 | only MPICH2 has included a recent snapshot of ROMIO. |
|---|
| 828 | |
|---|
| 829 | First, get the software. Download MPICH2 from |
|---|
| 830 | http://www.mcs.anl.gov/mpi/mpich2/. While MPICH2 contains a ROMIO |
|---|
| 831 | with PVFS2 support, the PVFS2 API has continued to stabilize since |
|---|
| 832 | MPICH2 was last released. Patches to syncronize the ROMIO in MPICH2 |
|---|
| 833 | with PVFS2 can be found at |
|---|
| 834 | http://www.mcs.anl.gov/romio/pvfs2-patches.html. There is also a |
|---|
| 835 | patch in the PVFS2 source in {\tt doc/coding}. For example's sake, |
|---|
| 836 | assume all software was downloaded to {\tt \$\{HOME\}/src}. |
|---|
| 837 | |
|---|
| 838 | Unpack mpich2, then change to the src/mpi/romio directory. Apply the |
|---|
| 839 | ROMIO patch. The patch makes changes to the ROMIO configure scripts, so you'll have to re-run {\tt autoconf} to generate a new configure file. |
|---|
| 840 | |
|---|
| 841 | \begin{verbatim} |
|---|
| 842 | prompt% tar xzf ~/src/mpich2-0.96p2.tar.gz # unpack mpich2 source |
|---|
| 843 | prompt% cd mpich2-0.96p2/src/mpi/romio # change to ROMIO dir |
|---|
| 844 | prompt% patch -p0 < ~/src/romio-<CORRECT_VERSION>.diff #apply patch |
|---|
| 845 | prompt% autoconf # create a new 'configure' |
|---|
| 846 | prompt% cd ../../.. # return to top of src |
|---|
| 847 | prompt% |
|---|
| 848 | \end{verbatim} |
|---|
| 849 | |
|---|
| 850 | In order to build MPICH2 with a ROMIO that speaks PVFS2, a few changes |
|---|
| 851 | have to be made to the normal configure process. MPICH2 will need to |
|---|
| 852 | know the path to the PVFS2 installation. Modify the {\tt CFLAGS}, |
|---|
| 853 | {\tt LDFLAGS} and {\tt LIBS} environment variables. |
|---|
| 854 | |
|---|
| 855 | \begin{verbatim} |
|---|
| 856 | prompt% export CFLAGS="<other desired flags> -I/usr/local/pvfs2/include" |
|---|
| 857 | prompt% export LDFLAGS="-L/usr/local/pvfs2/lib" |
|---|
| 858 | prompt% export LIBS="-lpvfs2 -lpthread" |
|---|
| 859 | prompt% |
|---|
| 860 | \end{verbatim} |
|---|
| 861 | |
|---|
| 862 | The MPICH2 configure script needs a some additional arguments to build |
|---|
| 863 | ROMIO correctly. The {\tt enable-romio} flag builds ROMIO and the |
|---|
| 864 | {\tt with-file-system} flag tells ROMIO which file systems to support. |
|---|
| 865 | |
|---|
| 866 | \begin{verbatim} |
|---|
| 867 | configure --enable-romio --with-file-system=ufs+nfs+pvfs2 [other flags] |
|---|
| 868 | \end{verbatim} |
|---|
| 869 | |
|---|
| 870 | Now compile and install MPICH2 as you normally would. Applications accessing |
|---|
| 871 | PVFS2 through MPI-IO will bypass the kernel interface and talk to PVFS2 servers directly. |
|---|
| 872 | |
|---|
| 873 | \end{document} |
|---|