In this article we are going to see step by step Resizing a Block Volume Using the Oracle cloud infrastructure Console
- Whenever you detach and re-attach volumes, there are complexities and risks for both Linux-based and Windows-based instances. This applies to both paravirtualized and iSCSI attachment types.
- When you re-attach a volume to an instance after resizing, if you are not using consistent device paths, or the instance does not support consistent device paths, device order and path may change. If you are using a tool such as Logical Volume Manager (LVM), you may need to fix the device mappings. For more information about consistent device paths.
- When you detach and then re-attach an iSCSI-attached volume to an instance, the volume’s IP address will increment.
- Before you resize a volume, you should create a full backup of the volume.
Let’s start demo:-
Step:-1 Check before resizing Block Volume is mounted and files count. /backup mount point is now 50 GB
Step:-3 Proceed to unmount the /backup mount point
#sudo umount /backup
Step:-4 Open the navigation menu
Compute -> Instances -> Instance Details -> Attached Block Volumes ->
Step:-5 Click detach the block volume
Click in “Ok”
Step:12 Open the navigation menu Compute -> Instances
Step:-13 -> Open the navigation menu Compute -> Instances ->Instance Details -> Click DEVDB
Step:-14 Reattach block volume “oracledbwr”
- Attachement mode: iSCSI
- Block Volume: Select the volume created
- Device Path: Select /dev/oracleoci/oraclevdb
- Cick Attach
Step:-16 Once the disk is attached, you can run the following commands to format the disk and mount it.
[root@devdb ~]# sudo fuser -km /dev/sdb
[root@devdb ~]# umount /dev/sdb
[root@devdb ~]# sudo e2fsck -f /dev/sdb
e2fsck 1.42.9 (28-Dec-2013)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sdb: 12/3276800 files (0.0% non-contiguous), 251791/13107200 blocks
[root@devdb ~]# sudo resize2fs /dev/sdb
resize2fs 1.42.9 (28-Dec-2013)
Resizing the filesystem on /dev/sdb to 19660800 (4k) blocks.
The filesystem on /dev/sdb is now 19660800 blocks long.
[root@devdb ~]# sudo mount /dev/sdb /backup
[root@devdb ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 3.8G 0 3.8G 0% /dev
tmpfs 3.8G 0 3.8G 0% /dev/shm
tmpfs 3.8G 8.6M 3.8G 1% /run
tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup
/dev/sda3 39G 2.8G 36G 8% /
/dev/sda1 200M 9.7M 191M 5% /boot/efi
/dev/sda4 250G 19G 219G 8% /u01
tmpfs 771M 0 771M 0% /run/user/1000
/dev/sdb 74G 52M 70G 1% /backup
[root@devdb ~]# cd /backup
[root@devdb backup]# cat oracledbwr.txt
Hariprasath Rajaram File is available
Successfully resized the block volume storage to Oracle cloud infrastructure instance
Connect with me:-
FB Page : https://www.facebook.com/dbahariprasath/?
Twitter : https://twitter.com/hariprasathdba