- Head to Compute => Volumes
- Click on Create Volume
- Give it a name: e.g. spark-worker1-data
- Select
gfs-r620
as the type (at least for the HDFS data volumes to make them local to the machine) - Do not give it a source (let it be an empty volume)
- Give it a size (I'm using 500 GB to start).
- Select an availability zone: there's only one (for now):
nova
Once the volume is available:
- Select Manage Attachments
- In the menu under
Attach to Instance
select the desired instance. - Click attach volume
- There is no step 4.
Login to the instance and format the volume with the command:
sudo mkfs.ext3 -L hdfs-1 /dev/vdb
- Create a mount point for the volume:
sudo mkdir /srv/hdfs-1
- fsent="LABEL=hdfs-1 /srv/hdfs-1 ext3 noatime 1 2"
- echo "$fsent" | sudo tee -a /etc/fstab
- sudo mount /srv/hdfs-1
Note: You should change the label to match the context of use. So, in the commands above hdfs-1
is just a label.
So, for worker 2, I'm going to change that label to be hdfs-2. It is not a set in stone
part of the command above
but something that varies as you create each volume.