Disk Hot Plug

This page contains outdated information and we recommend using hot disk plug only from UI. For relevant instructions, refer to Manage CloudBoot Compute Resource Devices.

Starting from the 3.1.2 version, OnApp Cloud supports disk hot plug for CloudBooted compute resources using the Integrated Storage platform. You can now assign and unassign drives from the IO controllers on the compute resources, using a CLI utility that is provided on the root FS of the CloudBoot compute resource. If no free slots are available while assigning disks using hotplug, the system will automatically initialize new controllers to assign the required number of disks.

To use the hotplug, run the following command from the required compute resource:

diskhotplug

The list of available disk hotplug comands:

  • diskhotplug list
  • diskhotplug assign <Controller> <Slot> <device>
  • diskhotplug unassign <Controller> <Slot>
  • diskhotplug initNewController
  • diskhotplug restartController <Controller>

After the upgrade (both live and non-live compute resource reboot) you will now see drives appear in the diskhotplug 'list’ output.

Example for a system with 6 disk drives set with default 4 drives per controller:

> [root@x.x.x.x ~]# /usr/pythoncontroller/diskhotplug list
> Controller 0
>       Slot 0 - /dev/sda (SCSIid:Z2A7VJQD_Z2A7VJQD,NodeID:130322041)
>       Slot 1 - /dev/sdb (SCSIid:9WM6B5WQS_9WM6B5WQ,NodeID:4043912490)
>       Slot 2 - /dev/sdc (SCSIid:9WM6B955S_9WM6B955,NodeID:2281894381)
>       Slot 3 - /dev/sdd (SCSIid:CVPR116003YH160DGN_2CW16_CVPR116003YH160DGN,NodeID:476612602)
> Controller 1
>       Slot 0 - /dev/sde (SCSIid:350025388500786eb_S1D9NEAD904298P,NodeID:235613508)
>       Slot 1 - /dev/sdf (SCSIid:35000cca0220b54c8_KPV675RF,NodeID:2574447922)
>       Slot 2 - EMPTY
>       Slot 3 - EMPTY


Use the 'unassign' command to remove a drive, e.g. due to mechanical drive failure, or to manually move it to another server:

diskhotplug unassign <Controller> <Slot>


In the example below, /dev/sdf is being removed:

> [root@x.x.x.x ~]# /usr/pythoncontroller/diskhotplug unassign 1 1
Result of diskhotplug unassign:
> [root@x.x.x.x ~]# /usr/pythoncontroller/diskhotplug list
> Controller 0
>       Slot 0 - /dev/sda (SCSIid:Z2A7VJQD_Z2A7VJQD,NodeID:130322041)
>       Slot 1 - /dev/sdb (SCSIid:9WM6B5WQS_9WM6B5WQ,NodeID:4043912490)
>       Slot 2 - /dev/sdc (SCSIid:9WM6B955S_9WM6B955,NodeID:2281894381)
>       Slot 3 - /dev/sdd (SCSIid:CVPR116003YH160DGN_2CW16_CVPR116003YH160DGN,NodeID:476612602)
> Controller 1
>       Slot 0 - /dev/sde (SCSIid:350025388500786eb_S1D9NEAD904298P,NodeID:235613508)
>       Slot 1 - EMPTY
>       Slot 2 - EMPTY
>       Slot 3 - EMPTY


To insert a new drive into the IO controller, use the 'assign' command:

diskhotplug assign <Controller> <slot> <device>

For example:

> [root@x.x.x.x ~]# /usr/pythoncontroller/diskhotplug assign 1 1 /dev/sdf
> [root@x.x.x.x ~]# /usr/pythoncontroller/diskhotplug list
> Controller 0
>       Slot 0 - /dev/sda (SCSIid:Z2A7VJQD_Z2A7VJQD,NodeID:130322041)
>       Slot 1 - /dev/sdb (SCSIid:9WM6B5WQS_9WM6B5WQ,NodeID:4043912490)
>       Slot 2 - /dev/sdc (SCSIid:9WM6B955S_9WM6B955,NodeID:2281894381)
>       Slot 3 - /dev/sdd (SCSIid:CVPR116003YH160DGN_2CW16_CVPR116003YH160DGN,NodeID:476612602)
> Controller 1
>       Slot 0 - /dev/sde (SCSIid:350025388500786eb_S1D9NEAD904298P,NodeID:235613508)
>       Slot 1 - /dev/sdf (SCSIid:35000cca0220b54c8_KPV675RF,NodeID:2574447922)
>       Slot 2 - EMPTY
>       Slot 3 - EMPTY
NOTE:
  • Use the UI diagnostic view to query the current state of the Integrated Storage platform.
  • Check that all VDisk content is redundant and allvdisksare in-sync before attempting tounassigna physical drive when it is still active in the system.
  • If no free slots are available while assigning disks using hotplug, the system will automatically initialize new controllers to assign the required number of disks.


To avoid warning messages such as DELAYED_PING showing on the diagnostics page, it will also be necessary to forget the disk drive. Whenever removing a disk drive permanently from OnApp Integrated Storage forget should be used. This can be performed by selecting nodes, finding the corresponding node and then using the Forget option.