• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to extend ASM disk from OS level in CentOS/RHEL

by admin

Question: How to expand the physical raw disk which is part of ASM diskgroup?

Below are the steps to extend the physical disk which is part of ASM diskgroup.

1. First, you have to unmount the disk you want to extend at the ASM level.

2. Check the disks present at the OS level and their size.

# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 12G 0 disk
├─sda1 8:1 0 500M 0 part /boot
└─sda2 8:2 0 11.5G 0 part
├─ol-root 251:0 0 10.3G 0 lvm /
└─ol-swap 251:1 0 1.2G 0 lvm [SWAP]
sdb 8:16 0 12G 0 disk
sdc 8:32 0 12G 0 disk
sdd 8:48 0 12G 0 disk
└─sdd1 8:49 0 4.7G 0 part
sr0 11:0 1 1024M 0 rom

3. Use parted command along with the disk you want to extend. Example here is /dev/sdd

# parted /dev/sdd
GNU Parted 3.1
Using /dev/sdd
Welcome to GNU Parted! Type 'help' to view a list of commands.

4. See the current partitions and the partition table. Note down the start and end sectors of the partition.

(parted) print
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdd: 12.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number     Start      End      Size      Type     File system Flags
  1        1049kB     5000MB   4999MB    primary

5. Remove the partition and create new partition with same partition number. You should give the same starting sector as printed before while creating the partition.

(parted) rm 1
(parted) mkpart
Partition type? primary/extended? primary
File system type? [ext2]? ext4
Start? 2048s
End? 10000

6. See the partition table after creating the new partition and exit from parted.

(parted) print
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdd: 12.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 10.0GB 9999MB primary
(parted) quit
Information: You may need to update /etc/fstab.

7. Now the partition has been extended and you can check the size of the partition as below.

# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 12G 0 disk
├─sda1 8:1 0 500M 0 part /boot
└─sda2 8:2 0 11.5G 0 part
├─ol-root 251:0 0 10.3G 0 lvm /
└─ol-swap 251:1 0 1.2G 0 lvm [SWAP]
sdb 8:16 0 12G 0 disk
sdc 8:32 0 12G 0 disk
sdd 8:48 0 12G 0 disk
└─sdd1 8:49 0 9.3G 0 part
sr0 11:0 1 1024M 0 rom

After extending the disk partition, changes at the ASM level also need to be made by a database administrator or ASM storage administrator with respect to the extended partition.

Filed Under: ASM, CentOS/RHEL 6, CentOS/RHEL 7, Linux, oracle

Some more articles you might also be interested in …

  1. ORA-354 ORA-353 and ORA-312: Possible corruption in Online Redo Log File Members in a Redo Log Group
  2. List of SELinux Utilities
  3. Beginners Guide to Oracle Password Management Policy
  4. Understanding SELinux File Labelling and SELinux Context
  5. mountstats Command Examples in Linux
  6. Oracle Database 19c: RMAN-06012: channel: d1 not allocated
  7. lvremove Command Examples in Linux
  8. Supported and Recommended File Systems on Linux
  9. CentOS / RHEL 7 : How to boot into emergency or multi-user mode from GRUB2
  10. sa Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • grpck command – Remove corrupt or duplicate entries in the /etc/group and /etc/gshadow files.
  • xxd command – Expressed in hexadecimal form
  • sesearch: command not found
  • macof: command not found

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright