Support Questions

Find answers, ask questions, and share your expertise

add disk and storage to hdp sandbox vm

avatar
Explorer

I am running HDP Sandbox in an Azure VM. I can successfully add a disk to the VM and format / mount it. I would like to add it to HDFS to extend my storage. I am performing the following steps to get it recognized:

  1. Create directory on the volume: i.e. mkdir /data/hdfs/data
  2. Change perms: sudo chmod -R 755 /data/hdfs/data
  3. Change ownership: sudo chown -R hadoop:hdfs /data/hdfs/data
  4. Stop datanode through Ambari
  5. Change dfs.data.dir property in /etc/hadoop/conf/hdfs-site.xml, add directory comma delimited
  6. Restart datanode
Unfortunately, everytime I restart the datanode, the dfs.data.dir property reverts back to default. What am I doing wrong?
1 ACCEPTED SOLUTION

avatar
Expert Contributor

Have you tried changing the setting through the HDFS service in Ambari?

View solution in original post

5 REPLIES 5

avatar
Expert Contributor

Have you tried changing the setting through the HDFS service in Ambari?

avatar
Expert Contributor

4947-screen-shot-2016-06-10-at-25030-pm.png

It looks like you should be able to add a directory

avatar
Explorer

I get the following error adding it there:

4962-hdfs-data-error.png

avatar
Expert Contributor

Interesting. So it seems I actually got it to add another directory. These were the steps I followed:

I ran your commands above

mkdir /data/hdfs/data
chmod -R 755 /data/hdfs/data
sudo chown -R hdfs /data/hdfs/data

After running those commands I moved to Ambari. Moved to the HDFS service. From there instead of using a comma to separate the two, I just put the new directory on a separate line underneath so it looked like:

/hadoop/hdfs/data
/data/hdfs/data

After this I Ambari asked me to restart a few of the components. (It was taking a while so I ended up rebooting the Sandbox)

After rebooting the Sandbox I went back to the Ambari config and the new directory I added earlier was still present.

EDIT: Try removing the space after the comma. Ambari gave me an error when there was a space after the comma.

4950-screen-shot-2016-06-10-at-32405-pm.png

avatar
Explorer

Thanks @zblanco! Removing the comma did the trick.