Description:-
In this article we are going to see step by step Resizing a Block Volume Using the Oracle cloud infrastructure Console
Overview:-
- 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:-2 Testing purpose i created oracledbwr.txt file inside /backup mount point
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
Step:-6 Copy iSCSI commands and execute in putty session
Step:-7 Click continue detachment button
Click in “Ok”
Step:-8 Go to Block stoarge -> block volumes -> block volume details
Step:-9 Resize Block volume size from 50 GB to 75 GB
Step:-10 See the Block Volume in status Provisioning
Step:-11 Now Block Volume is ready to reattach
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:-15 Once the volume is attached, you can click on the ellipsis and then click iSCSI Command and Information link.
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:-
Telegram App:https://t.me/oracledbwr
LinkedIn:https://www.linkedin.com/in/hariprasathdba
Facebook:https://www.facebook.com/HariPrasathdba
FB Group:https://www.facebook.com/groups/894402327369506/
FB Page : https://www.facebook.com/dbahariprasath/?
Twitter : https://twitter.com/hariprasathdba