Views:

To create a new storage device and move the files:

  1. Log in to the SSFE server via SSH.
  2. Get the root permission.

    safesync@appliance1:~$sudo su -
    root@appliance1:~#

  3. Enter the command below and take a snapshot of the total number of files.

    mogstats

    Snapshot

  4. Add a new virtual disk to a virtual machine.
    1. Right-click a virtual machine and select Properties.
    2. Click the Add button.
    3. Choose Hard Disk to add a new virtual disk.

    Add virtual disk

  5. Go to Administration > Storage Management.
  6. Click Add and select Local Disk, then click Next.

    Choose local disk as storage type

  7. On the command line interface, run the following to stop the deviceChecker in /etc/crontab.

    sed -i '/deviceChecker/s/^/# /' /etc/crontab

    Stop deviceChecker

  8. Ensure that the deviceChecker has comment using the command below:

    cat /etc/crontab

  9. Set the $target_dev_id and the $hostname to be drained (e.g. target_id_dev=11 , hostname= appliance1).

    target_dev_id=11 && ( [ "$target_dev_id" = "ID" ] && echo "please enter the valid target_dev_id" ) || ( [ "$(hostname)" = "appliance1" ] && s_host="osdp-store1" || s_host="osdp-store2" && mogadm device mark $s_host $target_dev_id drain) 2> /dev/null

  10. Run the following command and wait for the status to reach 100%. The process may take some time.

    mogadm fsck reset && mogadm fsck start watch -n 1 mogadm fsck status

    Status check

  11. Run the command below to check if the file number of the drained device is close to zero (0).

    watch -n 1 'stats=$(mogstats 2> /dev/null) && last=$(echo "$stats" | grep -n "Statistics for file ids" | cut -d":" -f1) && echo "$stats" | sed -n "1,${last}p"'

    Check drained device

  12. Enter the following command to check if all the files have been moved. Compare the file count with the snapshot taken in step 3.

    mogstats

    Check the file count

  13. Delete the drained device using the appropriate procedure below:
     
    Make sure to replace "dev$devid" with the dev id of your drained device.
    • For local storage type, run /opt/SingleInstaller/nodeControl/bin/mount-local.bash --dead dev$devid
    • For iscsi storage type, run /opt/SingleInstaller/nodeControl/bin/mount-iscsi.bash --dead dev$devid

    Remove drained device

  14. Restore the deviceChecker in /etc/crontab using the command below:

    sed -i '/deviceChecker/s/# //' /etc/crontab

  15. Make sure the deviceChecker has uncomment using the command below:

    cat /etc/crontab

    Restore deviceChecker