...
Tip |
---|
Those will only be visible and mountable from that particular VM, so if you want to share this storage with other VMs, you may want to expose it through NFS. |
Table of Contents |
---|
Creating a new instance with extra storage disks
If you haven't created the instance yet, this is how you can provision extra volumes along with the creation of the instance itself
- Follow the steps described in Provision a new instance - web
- When configuring the volumes, create a new one clicking on the + sign and customise the label and size
- Complete the process until the new instance is up and running.
Adding a disk to existing instances
If you want to expand the storage of an existing instance with extra volumes, you can do so following these steps:
...
Warning |
---|
Current to 2022, there is a bug in Morpheus such that if the disk creation fails (e.g. due to hitting a quota limit), no error is reported. You can check in the instance details → storage if the disk is there before proceeding. |
Configuring the extra volume in the instance
That extra volume is not mounted (or even formatted) by default. You must log in to your VM and then follow the instructions below:
- 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)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!
- 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:
-
sudo echo 1 > /sys/class/block/vdb/device/rescan
If still no new disk is visiblebut not visible in the VM, please contact supportCode Block sudo apt-get install scsitools # or yum install sg3_utils for CentOS sudo rescan-scsi-bus.sh
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:
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
Code Block echo "LABEL=data-1 /data1 ext4 defaults 0 0" | sudo tee -a /etc/fstab > /dev/null
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 |
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 |
Warning | ||
---|---|---|
| ||
Due to limitations in the underlying OpenStack infrastructure at ECMWF, a user cannot hot-plug more than 12-13 pci devices. This means that if a user wants more than 12-13 volumes, the the VM must be powered off, before more devices are added. |
Related articles
Content by Label | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...