Personal tools
You are here: Home Documentation Archive documentation Usage Guide 0.7.4

Usage Guide 0.7.4

Release 0.7.4

October 16, 2007

Slicestor Usage

1. Managing accounts with PAM
2. Starting and stopping the Slicestor

iSCSI Target Usage

1. Creating the account credentials
2. Creating a vault on the dsNet
3. Setting up the iSCSI Target
4. Starting and stopping the iSCSI Target

iSCSI Initiator Usage

1. Log on to the iSCSI Target
2. Partitioning the device
3. Creating a file system on the disk partition(s)
4. Mounting the file system

Using the dsNet

1. dsNet Usage

Slicestor Usage

You need to create a Linux system account on each of the Slicestors and then create a dsNet account using the same username and password on the Accesser machine.

1. Managing accounts with PAM

By default, dsNet Slicestors use PAM for authentication. There must be a system account on each of the Slicestors and PAM must be correctly configured to work with dsNet. See the installation guide for more information about PAM configuration.

In order to create an account on a slice server execute the following steps:

  • Create an account by specifying a <username> and the necessary <group> to satisfy your PAM rules:
useradd -G <group> -m <username>

By default there is a dsgridusers group that is created after installation. If you want to use another group you must modify the /etc/pam.d/dsgrid-server file:   

auth   required   pam_succeed_if.so user ingroup <group>

You also need to add this new group to your system through:

groupadd <group>

After this, '/etc/group' contains the group just created.

  • Set the account password:
passwd <username>

Where <username> is the name of the user you created above.

NOTE: An account can be removed from the dsNet by deleting the account on each of the Slicestors by using a command like:
userdel -r <username>     

However, this will not remove any data stored by clients on this dsNet account. Future versions of dsNet will allow you to remove this data.

2. Starting and stopping the Slicestor

Start the Slicestor daemon by issuing the following command:

/etc/init.d/dsgrid-server start

Check if the Slicestor is running by issuing:

/etc/init.d/dsgrid-server status

To stop the daemon, issue the same command only this time with the 'stop' options. You can find what other options are available by issuing the command without any options. You need to start a Slicestor on each Slicestors the iSCSI Target will connect to. You need to start this daemon as a user with enough privileges to write to the Slice directories.

iSCSI Target Usage

1. Creating the account credentials

You create the account credentials to be used by the target by issuing the following command:

dsgrid-create-account --username=<username> --password=<password>

Run this command in the Source computer, that is, the machine that runs the initiator.

Where <username> and <password> must correspond to similar options on each of the Slicestors. This command will create a Java Key Store (JKS) file and a credentials file on the "account path" directory.

 

Note: See the installation instructions for more information about changing the location of this directory. 

2. Creating a vault on the dsNet

 You can find a default vault configuration file after installation at:

/usr/share/dsgrid/conf/vaults/remote-local-vault-descriptor.xml

This file has a 1GB vault by default.

You create a vault on the dsNet by issuing the following command:

dsgrid-create-vault --username=<username> --password=<password> --descriptor=<vault-descriptor>

Where <username> and <password> must correspond to the same values used above for creating an account and <vault-descriptor> is the location of the vault descriptor file.

On this file XML-based configuration file, you can configure things like the block size, the IDA configuration, the location of Slicestors and their listening ports.

You must modify this file to accommodate your dsNet set up. For example, the host address and port number of the Slicestors should be changed to correspond to your environment.

NOTE: The dsNet will acknowledge the creation of the vault with a message like the following:
Created new vault.
New vault identifier: e2ed0d68-9bac-4156-8071-bf3671f12a92
dsNet account of vault owner: 5d9c68c6-c50e-33d0-aa2f-cf54f63993b6

3. Setting up the iSCSI Target

Modify '/etc/dsgrid/dsgrid-iscsi.conf' with your iSCSI Target's parameters. Detailed instructions for configuring the iSCSI Target can be found on the installation instructions.

You will be required to change the 'username', 'password', and 'vault' parameters. Other parameters can be changed to accommodate your environment. Information about these parameters can be found in the configuration file itself.

4. Starting and stopping the iSCSI Target

Start the iSCSI Target daemon by issuing the following command:

/etc/init.d/dsgrid-iscsi {start, stop}

To stop the daemon you issue the same command only this time with the 'stop' option. You can find what other options are available by issuing the command without any options.

iSCSI Initiator Usage

1. Log on to the iSCSI Target

You can use the Open-iSCSI's projects 'iscsiadm' program to log in to the target by typing:
 iscsiadm --mode node --targetname <target-name> --portal <portal> --login

<target-name> refers to the IQN name as explained on the dsgrid-iscsi configuration file. <portal> refers to the iSCSI Target host address and port like '127.0.0.1:3260'. If only a host address is specified the port defaults to 3260.

You can find the targets advertising on a particular IP address by issuing the command:

iscsiadm -m discovery -t sendtargets -p <portal>

Where <portal> is the portal name of the target which is composed of an IP address and a port in the form IP:port.

To log out of the target you need to type a command similar to the one for logging in except that you need to replace the '--login' option with  '--logout'.

2. Partitioning the device

Use a partition manipulation program like fdisk or parted to partition the device created then the initiator logs into the target. This device  could be something like '/dev/sdb' or '/dev/hdb' depending on your environment. With fdisk, you would type 'fdisk /dev/sdb' and follow the interactive instructions to partition a device like '/dev/sdb'. Instructions to use fdisk can be found on its man page.

You can find the particular device created when you logged in to the iSCSI initiator to the target by typing the following command:

iscsiadm -m session -i

The device name will appear under the 'Attached SCSI devices' section.

3. Creating a file system on the disk partition(s)

Use a file system creation tool like 'mke2fs' to create an ext2 or ext3 file system on the partition created above, for example, by typing 'mke2fs /dev/sdb1' where '/dev/sdb1' is the partition created after the previous step to create an ext2 partition.

4. Mounting the file system

Use the mount command to mount a mount point to the file system created above: 'mount /dev/sdb1 <mount-point>', where <mount-point> is a mount point of your choice.

NOTE: Unmount your partition with 'umount'

Using the dsNet

1. dsNet Usage

You can use the mounted filesystem as you would any other, for example by copying files to it with 'cp', removing them with 'rm', etc.