How do I format and mount a volume?

How do I format and mount a volume?

Supercomputing FAQs

SSH to your VM and check if the volume is present (/dev/vdb) with ls

Use mkfs.ext4 (or another mkfs.* command) to format the POSIX filesystem on the volume: 

   sudo mkfs.ext4 /dev/vdb

Remember to use sudo for these commands!

 

The filesystem is ready, but still needs to be mounted.

Create a mountpoint with mkdir -p, then mount the filesystem to the mountpoint:

   sudo mkdir -p /mnt/workspace
   sudo mount /dev/vdb /mnt/workspace

Check the status with df -h

Notice that filesystems lose some capacity due to formatting. We’ll teach you how to adjust the volume size later

 

You’re almost ready to use the new workspace!

Final detail: the mounted filesystem is read-only for regular users. If you want to avoid sudo on every command, open the permissions with chmod:

   chmod 777 /mnt/workspace

Discover Advanced Computing and Data Solutions at MSI

Our Services