Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Simplify

...

  1. After booting up, the VM should now have an additional disk, typically named vd(SOME_LETTER) - below, we assume the disk is named vdb, but it may be vdc, vdd, etc if you already had a second, third, etc disk.  You can check what disks are attached by running lsblk , which shows disks (e.g. vda, vdb) and partitions on the disks (vda1, vda2, etc for partitions 1 & 2 on vda)
    1. You should expect to see something like this, showing vdb with no partitions:


      Code Block
      NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
      vda     252:0    0   20G  0 disk 
      ├─vda1  252:1    0 19.9G  0 part /
      ├─vda14 252:14   0    4M  0 part 
      └─vda15 252:15   0  106M  0 part /boot/efi
      vdb     252:16   0  128G  0 disk 


      Warning

      vda is your root disk - do not reformat this!


    2. If you don't see the new disk, check that it was successfully created by Morpheus (see creation section above). If it's there in Morpheus, you can try triggering a rescan of the new disk with either one of:
    3.  sudo echo 1 > /sys/class/block/vdb/device/rescan
    4. Code Block
      sudo apt-get install scsitools # or yum install sg3_utils for CentOS
      sudo rescan-scsi-bus.sh
      If still no new disk is visiblebut not visible in the VM, please contact support
  2. Create a single partition (number 1, so vdb1) filling the disk, labelled "data-1" here, and format it. You may use parted and mkfs.ext4:

    1. Please change the label name to match what you called the new disk in the Morpheus interface (this is not a requirement, but reduces confusion later)

      Code Block
      sudo parted --script  -- /dev/vdb mklabel gpt
      sudo parted --script --align optimal -- /dev/vdb mkpart primary ext4 0% 100%
      sudo mkfs.ext4 -L data-1 /dev/vdb1


      Info

      You may partition the disk differently and use any other filesystem type. It is a good idea to use the same name for the volume to set the label of the new filesystem


  3. To have the disk automounted on start up, add an entry to your VM's /etc/fstab, adapting the label to the name you chose earlier:

    1. Code Block
      ​echo "LABEL=data-1 /data1 ext4 defaults 0 0" | sudo tee -a /etc/fstab > /dev/null


  4. Create the directory where you are mounting your filesystem. Make sure you use the same path as defined in fstab:

    No Format
    sudo mkdir /data1


  5. Mount the file system this first time around and check its ok.  It should be automatically mounted on future reboots (test this now if it's important).

    No Format
    sudo mount -av


...