Latest - pNFS Admin Documentation

Instructions for Installing

The format for releasing pNFS binaries is BFU archives. To use BFU, check out the instructions on the OpenSolaris.org website. We recommend installing Solaris Express, Community Edition (CD, DVD), then using BFU to update your machine(s) with the BFU archives provided. A good summary of this process is documented at the ON download site. Pay attention to steps 1, 2 and 3b.

To BFU pNFS, you will need to use the SUNWonbld tools that are available off of the pNFS download page. Please choose the build tools that are right for your platform.

Instructions for Setting Up and Using pNFS

There are 3 main components of a pNFS configuration; a client, a metadata server (MDS) and a data server (DS). The BFU archives that you have installed allow you to configure and run each of these components. What follows is information on how to get each component configured and running. If you have any problems with these instructions or find any errors in them along the way, send an email to nfsv41-discuss@opensolaris.org.

Currently, the DS and the MDS must be setup on separate machines. For the basic setup, we recommend that you have three machines. One to use as the client, one to use as the DS and one to use as the MDS. The following instructions give specific examples in order to create this exact setup, but the examples can be extended in order to create different configurations (e.g. MDS and multiple data server(s)). None the less, if you are just starting out with pNFS, we recommend for you to try the basic setup first and then build off of that.

Please note that the command line interfaces shown here are prototypical and will be changing in the future.

Quick and Easy Reference

This section is a quick reference to the commands you will need to issue in order to get your systems configured and running. More detailed information on what the commands do and an example on how to use them is available below!

On the Metadata Server

Step 1: Share a file system:
#share <path>

On the Data Server

Step 2: Share a file system:
#share <path>

Step 3: Create the zpool to use:
#zpool create <pool> <vdev>

Step 4: Create the pNFS dataset to use:
#zfs create -t pnfsdata <pnfs-dataset>

Step 5: Assign the pNFS dataset to the data server:
#dservadm addstor <pnfs-dataset-name>

Step 6: Specify the MDS to use:
#dservadm addmds <ip-addr-and-port-number-of-mds>

Step 7: Lastly, start the data server:
#dservadm enable

On the Client

Step 8: Mount the file system:
#mount -F nfs -o vers=4 <resource> <mount point>


Tips and Tricks

  • Every time you reboot the MDS, you need to reconfigure it. This is because the data server information is currently not stored persistently. This means that you will also have to re-enable the your data servers in order to allow them to report to the MDS. If the MDS reboots, execute the following commands:
Potential gotcha!
The following commands must be executed in order.

Step 1: On the MDS - Make sure the file system is still shared:
#share <path>

Step 2: On the DS - Restart the data server:
#dservadm disable
#dservadm enable

  • Anytime ZFS adds a new DMU object type, you need to rebuild your pools. If this occurs, it will be mentioned in the appropriate release notes.
  • To verify pNFS is working you can use snoop to watch the traffic between the client and the data servers. In your capture file, search for "pnfs write" or "pnfs read"
  • Do NOT create your zpools using files in /tmp as the backing store.

Detailed Information on the Commands Used to Manage pNFS

This section covers the same information as the "Quick and Easy Reference", but goes into more detail on what each command does.

Pre-configuration - Turn on Debugging (optional)

  1. To turn on debugging, add the following entry to /etc/syslog.conf:
    - *.info /var/adm/messages
  2. Set dserv:dserv_debug to 1 in /etc/system

Instructions for Setting up a Metadata Server

Share a file system. There are a few ways to do this, choose your favorite:

Method 1: (Please note that this is not persistent.)
#share <path>

Method 2:
#zfs set sharenfs=on <dataset>

Method 3:
#sharemgr create <group>
#sharemgr add-share -s <path> <group>

A default layout will be generated based on the device information reported via the control-protocol by the data-servers. This information is not currently stored persistently.

Instructions for Setting up a Data Server

Create a zpool

#zpool create <pool> <vdev>

Create a pNFS dataset

There should be at least one pNFS dataset per data server instance, so if you are planning on having multiple instances on your data server, be sure to create at least one dataset per instance. Although, for now we recommend using a single instance of the data server.

#zfs create -t pnfsdata <pnfs-dataset>

Simple (single instance) Data Server Configuration
dservadm Command

The configuration of the data server is done using the dservadm command. Please note that the dservadm command line interface is an interim solution. This command will be replaced with a more complete CLI in the near future. The syntax is as follows:

Command

Description

dservadm create <instance>

Creates an instance of the data server with the name as given. This can be used to create multiple instances of the data server on one physical machine. By default, there is one instance of the data server. This is referred to as the default instance. This capability is experimental and is not expected to be delivered with the final pNFS implementation.

dservadm destroy <instance>

Deletes the instance of the data server with the name given. This capability is experimental and is not expected to be delivered with the final pNFS implementation.

dservadm enable [ -i <instance> ]

Starts the data server SMF service. If given an instance name, that instance will be started. If not given an instance name, the default instance will be started.

dservadm disable [ -i <instance> ]

Stops the data server SMF service. If given an instance name, that instance will be stopped. If not given an instance name, the default instance will be stopped.

dservadm addstorage [ -i <instance> ] <pnfs-dataset-name>

Adds the given pNFS dataset to the data server for use in doing I/O. If given an instance name, the dataset will be added to that instance. If not given an instance name, the dataset will be added to the default instance.

dservadm addstor [ -i <instance> ] <pnfs-dataset-name>

Alias for dservadm addstorage.

dservadm dropstorage [ -i <instance> ] <pnfs-dataset-name>

Deletes the given pNFS dataset from the data server. This will stop the data server from using the dataset to do I/O. If given an instance name, the dataset will be deleted from that instance. If not given an instance name, the dataset will be deleted from the default instance.

dservadm dropstor [ -i <instance> ] <zpool-name>

Alias for dservadm dropstorage.

dservadm liststorage [ -i <instance> ]

Lists the pNFS datasets that are available to the data server. If given an instance name, the datasets that are available to that instance are displayed. If not given an instance name, the datasets for the default instance are displayed.

dservadm liststor [ -i <instance> ]

Alias for dservadm liststorage.

dservadm addmds [ -i <instance> ] <mds-universal-address>

Adds the given metadata server universal address to the data server. This will allow the data server and metadata server to communicate. If given an instance name, the mds is added to that instance. If not given an instance name, the mds is added to the default instance. There can only be one metadata server added to any instance of the data server.

dservadm dropmds [ -i <instance> ]

Deletes the metadata server. This will remove the metadata server from the data server and will stop the communication between the two. If given an instance name, the mds will be deleted from that instance. If not given an instance name, the mds will be deleted from the default instance.

dservadm listmds [ -i <instance> ]

Lists the metadata server that the data server is in communication with. If given an instance name, the mds that is in use by that instance is displayed. If not given an instance name, the mds being used by the default instance are displayed.

Instructions for Setting up a Client

#mount -F nfs -o vers=4 <resource> <mount point>
The resource will be the shared file system on the metadata server (e.g. mds:/export).
The mount point is where you want the file system mounted on the client.


Example of using the commands above to configure pNFS

(Note: In this example, the IP of the MDS is 172.20.48.143 and the IP of the DS is 172.20.48.115)

On the MDS:

Share a file system:
    #sharemgr create -P nfs mygroup
    #sharemgr add-share -s /export mygroup
    

On the DS:

Share a file system:

(Note: This step of sharing a file system on the data server is a temporary workaround. The data server will not actually use this file system. The data server SMF service (svc:/network/dserv:default) depends on the NFS server SMF service (svc:/network/nfs/server:default). Sharing a file system guarantees that the NFS server service is up and running.)

    #sharemgr create -P nfs mygroup
    #sharemgr add-share -s /export mygroup
    
Add the address of the MDS for use by the data server:
    #dservadm addmds 172.20.48.143.8.1
    
Handy Hint
172.20.48.143 is the IP address, 8.1 is the port number (8.1 or (8*256 + 1) = 2049). Unless you went out of your way to change the port that the Metadata Server is running on, this will always be 8.1
To list the MDS that has been assigned to the data server:
    #dservadm listmds
    mds:
        172.20.48.143.8.1
    
To create a pNFS dataset
    #zpool create dspool /dev/dsk/c1t1d0
    #zfs create -t pnfsdata dspool/pnfsds
    
To view all pNFS datasets on a data server:
    #zfs list -t pnfsdata
    NAME                                          USED  AVAIL  REFER  MOUNTPOINT
    dspool/pnfsds                                 572M  66.4G    15K  -
    
Add the pNFS dataset to the list of datasets for use by the data server:
    #dservadm addstor dspool/pnfsds
    
To list the datasets that have been added for use by the data server:
    #dservadm liststor
    storage:
        dspool/pnfsds
    
Start the data server service:
    #dservadm enable
    
To determine the state of the data server service:
    #svcs dserv
    STATE          STIME        FMRI
    online         19:29:24    svc:/network/dserv:default
    

On the client:

To mount the pNFS file system:
    #mount -F nfs -o vers=4 172.20.48.143:/export /mnt
    
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

© 2010, Oracle Corporation and/or its affiliates
Powered by Atlassian Confluence
Oracle Social Media Participation Policy Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact