# OCI Block Volume
# Attach Block Volume
- sudo fdisk /dev/sdb
- n,,,wq
- sudo mkfs.xfs /dev/sdb1
- sudo mount /dev/sdb1 /u01
# list UUID
sudo blkid
# Volume resize
- After the volume is provisioned, you need to run the following rescan commands.
sudo dd iflag=direct if=/dev/oracleoci/oraclevdb of=/dev/null count=1
echo "1" | sudo tee /sys/class/block/`readlink /dev/oracleoci/oraclevdb | cut -d'/' -f 2`/device/rescan
- After you've run the volume rescan commands, you need to extend the partition for the volume resize to take effect
- xfs resize
To identify the volume that you want to extend the partition for, run the following command to list the attached block volumes:
lsblk
parted <volume_id>
<volume_id> is the volume identifier, for example /dev/sdc.
(parted) unit s
(parted) print
(parted) rm <partition_number>
(parted) mkpart [xfs,1,100%]
(parted) quit
lsblk
xfs_repair <partition_id>
<partition_id> is the partition identifier, for example /dev/sdc1. See Checking and Repairing an XFS File System for more information.
mkdir <directory_name>
mount <partition_id> <directory_name> -o nouuid
<partition_id> is the partition identifier, for example /dev/sdc1, and <directory_name> is the directory name, for example data.
xfs_growfs -d <directory_name>
<directory_name> is the name for the directory you created in the previous step, for example data.
df -lh
# Storage VPUs
- https://docs.cloud.oracle.com/en-us/iaas/Content/Block/Concepts/blockvolumeelasticperformance.htm
# Reference Link
- https://docs.cloud.oracle.com/en-us/iaas/Content/Block/References/fstaboptions.htm