• 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. CentOS / RHEL : How to add a null route in Linux
  2. pgrep: command not found
  3. Warning: ORA-16829: fast-start failover configuration is lagging
  4. Red Hat / CentOS : How to create interface / NIC bonding
  5. How to view file size/details from ls command in Unix
  6. Oracle Database : How to set Environment Variables Using Srvctl
  7. Image optimization with webp
  8. Understanding Linux SCSI Reservation
  9. btrfs filesystem Command Examples in Linux
  10. free: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright