...
- 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 |
...