Skip to content

Instantly share code, notes, and snippets.

@shawonis08
Last active April 25, 2024 09:02
Show Gist options
  • Save shawonis08/42bc0e9272fa746c7ce8f253576d633b to your computer and use it in GitHub Desktop.
Save shawonis08/42bc0e9272fa746c7ce8f253576d633b to your computer and use it in GitHub Desktop.
This readme provides a step-by-step guide for attaching an Oracle Block Volume to an instance and creating a partition, file system, and mounting the file system. It also includes instructions for updating the /etc/fstab file to automatically mount the disk when the system boots, rebooting the instance, and checking the file system. The guide al…

Oracle Attach BLOCK Volume to Instance

  • Creating a partition with fdisk
  • Creating an ext3 file system
  • Mounting the file system
  • Updating the /etc/fstab file
  • Rebooting the instance
  • Checking the file system

Preparation

see the volume in the console

lsblk
sudo fdisk -l

Creating a partition with fdisk

sudo fdisk /dev/sdb

When you press "m" and confirm the entry with Enter, the program will provide a page of available commands

  1. use the entire disk space, press the "n" key and Enter.
  2. The system will ask about the type of partition select "p" - primary.
  3. The partition number select "1"

Save the changes by pressing "w" and confirm the selection with the Enter key.

see the volume in the console

lsblk

Creating an ext3 file system

sudo /sbin/mkfs.ext3 /dev/sdb1

Mounting the file system

Create a directory

sudo mkdir /oradiskvdb1

change the access rights to the directory. Only root and only read and write.

sudo chmod -R 660 /oradiskvdb1

Mount

sudo mount /dev/sdb1 /oradiskvdb1

Updating the /etc/fstab file

To mount the disk automatically when the system boots, edit the /etc/fstab file.

sudo nano /etc/fstab

At the very end of the file, insert the line:

/dev/sdb1 /oradiskvdb1 ext3 defaults 0 0

Rebooting the instance

sudo reboot

Checking the file system

lsblk

User Permissions

chown -R $USER:$USER /oradiskvdb1

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment