.. _volume_mount_card: Volume: format and mount ========================= After a volume has been created and attached to a virtual machine (see :ref:`cloud/operative/storage_ops/volume_create:volume: create and attach`), in order to use for storing data you need to partition, format and mount it. To achieve this, these operations have to be performed inside the virtual machine: - Partition Table - Format the volume - Mount the volume How to perform the operations is specific to the Operative system of the Virtual Machine. Here you can find one suggestion to perform these operations. Another option can be to use parted. Partition Table ---------------- Suppose that the volume is attached to the virtual machine as device */dev/vdc*. Login in to the virtual machine and use `fdisk` to modify the partition table. - list the partition table .. code-block:: bash sudo fdisk -l - partition of device /dev/vdc .. code-block:: sudo fdisk /dev/vdc # 1 new partition, primary, with default sector numbers and type "Linux" ==> n; p; 1 ; ...default ; # check and write ==> p; w Format the volume ----------------- Format the device */dev/vdc* just partitioned as xfs: .. code-block:: sudo mkfs -t xfs /dev/vdc1 Mount the volume ----------------- .. code-block:: sudo mkdir /mnt/stuff_1 sudo mount /dev/vdc1 /mnt/stuff_1 To mount the volume automatically at each boot of the virtual machine, please modify the */etc/fstab* file. Following the example, in the */etc/fstab* could be written: .. code-block:: /dev/vdc1 /mnt/stuff_1 xfs auto,nofail,defaults 0 0