Your virtual machine will have a root drive which includes all the configuration settings, the installed software and your home folder. This is about 40GB in size as standard.

Most users will request additional storage on the virtual machine for their data. This secondary TANGO Cloud storage is provisioned with your virtual machine, but there are a couple of steps required to mount it and make it available for the first time.

Mounting Secondary TANGO Storage Disk

Important - only follow these steps when you are first setting up the virtual machine. These instructions will format (i.e. delete all contents on) the secondary disk.

  1. First, look at the storage blocks that are available. If you requested a VM with additional storage above the 40GB minimum, you should see something like the following screenshot when you enter the command : 
    lsblk -d



    The "sda" refers to the root disk at 40GB. Ignore the sr0 rom.

  2. The other disk is called "sdb", and this is the extra storage that must be formatted and mounted. If it has a different name on your machine, please put that name in the following commands in place of "sdb"

  3. The following commands format the disk, create a directory as a mount location, mount the storage, and give the user ownership of the directory. In this example we use the location "/mnt/localdisk2" , but you are free to use a different name if you wish. Enter the following commands in the order shown. 

    sudo mkfs.ext4 /dev/sdb
    sudo mkdir -p /mnt/localdisk2
    sudo mount /dev/sdb /mnt/localdisk2
    sudo chown $USER /mnt/localdisk2


  4. In order for the disk to remount each time the VM is rebooted, a command needs to be added to a text document on the VM "/etc/fstab" (this is an important configuration file, so we make a backup copy of it first). 

    sudo cp /etc/fstab /etc/fstab.bak
    sudo nano /etc/fstab

    Use an arrow key to move the cursor to the bottom of the document and enter 

    /dev/sdb /mnt/localdisk2 ext4 defaults 0 0

    Press control and X and save the document without changing the name.

  5. You may wish to create a symbolic link to this storage in your home directory with the following command 

    ln -s /mnt/localdisk2 ~/localdisk2

You can check the amount of available space on your disks using the following command. It should show the use% of the root disk and the secondary local disk.

df -ht ext4


Did you find this information useful? Share your feedback here.