You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by jason hadoop <ja...@gmail.com> on 2009/05/14 17:26:24 UTC

Re: How to replace the storage on a datanode without formatting the namenode?

You can decommission the datanode, and then un-decommission it.

On Thu, May 14, 2009 at 7:44 AM, Alexandra Alecu
<al...@gmail.com>wrote:

>
> Hi,
>
> I want to test how Hadoop and HBase are performing. I have a cluster with 1
> namenode and 4 datanodes. I use Hadoop 0.19.1 and HBase 0.19.2.
>
> I first ran a few tests when the 4 datanodes use local storage specified in
> dfs.data.dir.
> Now, I want to see what is the tradeoff if I switch from local storage to
> network mounted storage (I know it sounds like a crazy idea but
> unfortunately I have to explore this possibility).
>
> I would like to be able to change the dfs.data.dir and maybe in two steps
> be
> able to switch to the network mounted storage.
>
> What I had in mind was the following steps :
>
> 0. Assume initial status is a working cluster with local storage, e.g.
> dfs.data.dir set to local_storage_path.
> 1. Stop cluster: bin/stop-dfs
> 2. Change dfs.data.dir by adding the network_storage_path to the local
> storage_path.
> 3. Start cluster: bin/start-dfs (this will format the new network
> locations,
> which is nice)
> 4. <Perform some sort of directed balancing of all the data towards the
> network storage location>
> 5. Stop cluster: bin/stop-dfs
> 6. Change dfs.data.dir parameter to only contain local_storage_path
> 7.  Start cluster and live happily ever after :-).
>
> The problem is , I don;t know if there is a command or an option to achieve
> step 4.
> Do you have any suggestions ?
>
> I found some info on how to add datanodes, but there is not much info on
> how
> to remove safely (without losing data etc) datanodes or storage locations
> on
> a particular node.
> Is this possible?
>
> Many thanks,
> Alexandra.
>
>
>
>
>
> --
> View this message in context:
> http://www.nabble.com/How-to-replace-the-storage-on-a-datanode-without-formatting-the-namenode--tp23542127p23542127.html
> Sent from the Hadoop core-user mailing list archive at Nabble.com.
>
>


-- 
Alpha Chapters of my book on Hadoop are available
http://www.apress.com/book/view/9781430219422
www.prohadoopbook.com a community for Hadoop Professionals

Re: How to replace the storage on a datanode without formatting the namenode?

Posted by Alexandra Alecu <al...@gmail.com>.

jason hadoop wrote:
> 
> You can decommission the datanode, and then un-decommission it.
> 

Thanks Jason, I went off and figured out what to decomission a datanode
means and this looks like a very neat idea.

 Decommissioning requires that the nodes be listed in the dfs.hosts.excludes
file. The administrator runs the "dfsadmin -refreshNodes" command. 

I will need some reconfiguring to be able to do this as the local storage
has exactly the same path on all my datanodes. Essentially, if I change
dfs.data.dir taking away the path to the local storage, it will take it away
on all the datanodes. Therefore I wonder if this advice uncovers a problem
with my cluster configuration. 

When i first installed hadoop on the cluster, since most settings looked the
same for all nodes, I thought  to set same location paths for the local
storage and this way making it easier to put the configuration files in one
directory and then create symlinks from all the hadoop home folders to this
one configuration directory.

Is this what usually people do or have I gone in a completely wrong
direction?
-- 
View this message in context: http://www.nabble.com/How-to-replace-the-storage-on-a-datanode-without-formatting-the-namenode--tp23542127p23544682.html
Sent from the Hadoop core-user mailing list archive at Nabble.com.