Skip to main content

Increase data node volume

The method for increasing data node volume is as follows.

Increase data volume

  1. In the KakaoCloud console > Beyond Compute Service > Virtual Machine > Volume, create a volume.

  2. Attach the created volume to an instance.

  3. Access the instance via SSH.

    Mount the added volume to the system
    sudo mkfs -t xfs /dev/vdb
    sudo mkdir -p /data/vdb
    sudo mount /dev/vdb /data/vdb
    sudo chown ubuntu:ubuntu /data
    sudo chown ubuntu:ubuntu /data/vdb

    ubuntu@host-10-182-101-5:~$ df -h
    Filesystem Size Used Avail Use% Mounted on
    udev 32G 0 32G 0% /dev
    tmpfs 6.3G 700K 6.3G 1% /run
    /dev/vda1 97G 21G 76G 22% /
    tmpfs 32G 0 32G 0% /dev/shm
    tmpfs 5.0M 0 5.0M 0% /run/lock
    tmpfs 32G 0 32G 0% /sys/fs/cgroup
    /dev/vda15 105M 3.6M 101M 4% /boot/efi
    /dev/vdb 500G 543M 500G 1% /data/vdb
    tmpfs 6.3G 0 6.3G 0% /run/user/1000

    Add the mounted volume to /etc/fstab
    sudo lsblk -o +UUID
  4. Modify data node information.

    Add path to dfs.datanode.data.dir in /etc/hadoop/conf/hdfs-site.xml
    <property>
    <name>dfs.datanode.data.dir</name>
    <value>/hadoop/hdfs/data,/data/vdb</value>
    </property>
  5. Restart the data node.