2.2. Checkpoint the Active NameNode

If HDFS has been in use after you enabled NameNode HA, but you wish to revert back to a non-HA state, you must checkpoint HDFS state before proceeding with the rollback.

If the Enable NameNode HA wizard failed and you need to revert back, you can skip this step and move on to Stop All Services.

  • If Kerberos security has not been enabled on the cluster:

    On the Active NameNode host, execute the following commands to save the namespace. You must be the HDFS service user ($HDFS_USER) to do this.

    sudo su -l $HDFS_USER -c 'hdfs dfsadmin -safemode enter'
    sudo su -l $HDFS_USER -c 'hdfs dfsadmin -saveNamespace'                                
  • If Kerberos security has been enabled on the cluster:

    sudo su -l $HDFS_USER -c 'kinit -kt /etc/security/keytabs/nn.service.keytab nn/$HOSTNAME@$REALM;hdfs dfsadmin -safemode enter'
    sudo su -l $HDFS_USER -c 'kinit -kt /etc/security/keytabs/nn.service.keytab nn/$HOSTNAME@$REALM;hdfs  dfsadmin -saveNamespace'                               

    Where $HDFS_USER is the HDFS service user, $HOSTNAME is the Active NameNode hostname, and $REALM is your Kerberos realm.

loading table of contents...