Move cloudera-scm-server-db to different location

By | September 3, 2014
We will move the files to different location and create the symlink

  1. Stop the scm service:
    # service cloudera-scm-server stop
    # service cloudera-scm-server-db stop 
  2. Copy the cloudera-scm-server-db, retaining the permissions as below:
    #cd /var/lib
    #cp -rp cloudera-scm-server-db /dir1/lib/
    #cd /var/lib/cloudera-scm-server-db
    #rm -rf data/
  3. Create symlink
    #cd /var/lib/cloudera-scm-server-db
    #ln -s /dir1/lib/cloudera-scm-server-db/data data 
  4. Note: Make sure you have preserved permissions as below:

    # ls -l /var/lib/
    drwx------  3 cloudera-scm cloudera-scm 4096 Aug 21 16:09 cloudera-scm-server-db
    # ls -l /var/lib/cloudera-scm-server-db/
    drwx------ 12 root root 4096 Sep  3 08:49 data
  5. Start services:
    # service cloudera-scm-server-db start
    DB initialization done.
    waiting for server to start.... done
    server started
    # service cloudera-scm-server start

Comment below if you find this blog useful.

Leave a Reply

Your email address will not be published. Required fields are marked *