"/etc/init.d/oracleasm is deprecated in favor of userspace tool /usr/sbin/oracleasm" - error while restarting oracleasm service
The Problem
We had Upgraded oracleasm tools and system to latest. Restarting the oracleasm service triggers below message:
/etc/init.d/oracleasm is deprecated in favor of userspace tool /usr/sbin/oracleasm
What is the meaning of this message and how can this be rectified?
The Solution
This is expected behaviour from Oracle Linux 7 onwards that /etc/init.d/oracleasm script deprecated. Follow the steps below in order to use the new systemctl commands along with /usr/bin/oracleasm instead.
1. Use /usr/bin/oracleasm userspace tool instaed of the old tool “/etc/init.d/oracleasm”:
# /usr/sbin/oracleasm
Usage: oracleasm [--exec-path=] [ ]
oracleasm --exec-path
oracleasm -h
oracleasm -V
The basic oracleasm commands are:
configure Configure the Oracle Linux ASMLib driver init Load and initialize the ASMLib driver exit Stop the ASMLib driver scandisks Scan the system for Oracle ASMLib disks status Display the status of the Oracle ASMLib driver listdisks List known Oracle ASMLib disks listiids List the iid files deleteiids Delete the unused iid files querydisk Determine if a disk belongs to Oracle ASMlib createdisk Allocate a device for Oracle ASMLib use deletedisk Return a device to the operating system renamedisk Change the label of an Oracle ASMlib disk update-driver Download the latest ASMLib driver
2. To start/stop/status of oracleasm service use systemctl command:
# systemctl status oracleasm.service
# systemctl start oracleasm.service
# systemctl stop oracleasm.service