#!/bin/bash
1. Create a volume in DTSS and add it to you instance. Allow the volume to associate itself with the instance. This may take a little while.
2. View current layout
fdisk -l
3. View the current layout and observe the new disk.
fdisk -l
4. Partition the disk
sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | fdisk /dev/vdb
n # new partition
p # primary partition
1 # partition number 1
# default, start immediately after preceding partition
# default, extend partition to end of disk
t # make a partition bootable
83 # bootable partition is partition 1 -- /dev/sda1
w # write the partition table
q # and we're done
EOF
6. Create the filesystem
mkfs.ext4 /dev/vdb1
7. Make the directory that you want to mount the partition to
mkdir /var/lib/docker
8. Mount it
mount /dev/vdb1 /var/lib/docker
9. Add the following line to the /etc/fstab file.
/dev/vdb1 /var/lib/docker ext4 defaults 0 0