Preparing a client instance to be added to the cluster

In this post I describe how to prepare a Client node with with attached volume.

The Client and the volume are created through the WebUI on the OpenStack private cloud. The volume is attached to the Client in the WebUI, as well.
The volume is attached to device like this:

/user – /dev/vdb

After the new “soon-to-be” Client instance has been created and volume attached there is some work to be done in the command line interface:

Connect to the new client
Since the client is going to be exposed, there is a public IP address available for it.
Another option is to connect from another instance in the cluster (make sure to update /etc/hosts on all instances in the cluster).

ssh -i .ssh/key client-instance

Update, upgrade and reboot the system.

sudo apt-get update -y && sudo apt-get upgrade -y && sudo reboot

Create the directory where the data for the volume will be stored.

sudo mkdir -p /user

Format file system for the volume to be attached.

sudo mkfs.ext4 /dev/vdb

Mount the volume to the respective directory.

sudo mount /dev/vdb /user

Label the volume for easier future work.

sudo e2label /dev/vdb "user"

Open and update /etc/fstab.
This is smart to do to keep the volumes mounted to the directories after the Client is restarted.

LABEL=user /user ext4 defaults,nobootwait 0 0

Check if volumes are mounted to correct directories.

df -h

Something like this should appear:

/dev/vdb        197G        60M         187G    1%      /user

For future reference, you can check the size of all monuted folders under directory /user.

sudo du -hs /user

Something similar to this should be in the output.

20K /user

Next steps

Adding client to the cluster

Now the Client with added volume is ready to be added to the cluster. This is, to some extent, described in Adding new DataNode to the cluster using Ambari. Although the post describes how to add a DataNode, adding Client is the same except that in step Assign Slaves and Clients, the Client checkbox should be checked.

Configuring home directory

The users working on the client should have their home directory under /user. How this is achieved is described in Configuring home directory on client nodes.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s