systemd is a new system and service manager for Linux system implemented/adapted into all the major Linux distributions over the traditional SysV init systems due to lots of issue/improvement has to be on SysVinit systems.
All the service files are available on /etc/init.d/
directory for SysVinit system.
For systemd system, the service files are available on /usr/lib/systemd/system/
directory.
To perform any kind of actions like start, stop, restart, enable, reload & status against the specific service then use the following commands.
Make sure that you should have admin privileges to run these commands except status command. It should be root
or sudo
permission needed to run the below commands.
What is OracleASM?
ASMLib is an optional support library for the Automatic Storage Management feature of Oracle Database.
Automatic Storage Management (ASM) is an integrated, high-performance database file system and disk manager.
ASM groups the disks in your storage system into one or more disk groups. You can manage a small set of disk groups and ASM automates the placement of the database files within those disk groups.
1) How to list available options for OracleASM service?
If you are new to Linux or don’t know much about this service before, just use the following command to know the list of the available options for the given service.
For SysV (System V) or Upstart init system.
# /etc/init.d/oracleasm Usage: /etc/init.d/oracleasm {start|stop|restart|enable|disable|configure|createdisk|deletedisk|querydisk|listdisks|scandisks|status}
2) How to start OracleASM service in Linux?
Use the below commands to start the OracleASM service in Linux, depends on your init system manager.
The following command could run in all kind of systems.
# oracleasm start
For SysVinit
Systems
# /etc/init.d/oracleasm start or # service oracleasm start
For systemd
Systems
# systemctl start oracleasm.service or # systemctl start oracleasm
3) How to Stop OracleASM service in Linux?
Use the below commands to stop the OracleASM service in Linux, depends on your init system manager.
The following command could run in all kind of systems.
# oracleasm stop
For SysVinit
Systems
# /etc/init.d/oracleasm stop or # service oracleasm stop
For systemd
Systems
# systemctl stop oracleasm.service or # systemctl stop oracleasm
4) How to Restart OracleASM service in Linux?
Use the below commands to restart the OracleASM service in Linux, depends on your init system manager.
The following command could run in all kind of systems.
# oracleasm restart
For SysVinit
Systems
# /etc/init.d/oracleasm restart or # service oracleasm restart
For systemd
Systems
# systemctl restart oracleasm.service or # systemctl restart oracleasm
5) How to check the status of OracleASM service in Linux?
Use the below commands to check the status of OracleASM service in Linux, make sure you have to run an appropriate command depends up on your init system manager.
The following command could run in all kind of systems.
# oracleasm status
For SysVinit
Systems
# service oracleasm status or # /etc/init.d/oracleasm status
For systemd
Systems
# systemctl status oracleasm or # systemctl status oracleasm.service Checking if ASM is loaded: yes Checking if /dev/oracleasm is mounted: yes
6) How to Enable OracleASM service in Linux?
Use the below commands to enable the OracleASM service in Linux, depends on your init system manager.
The following command could run in all kind of systems.
# oracleasm enable
For SysVinit
Systems
# chkconfig oracleasm on
For systemd
Systems
# systemctl enable oracleasm.service or # systemctl enable oracleasm Writing Oracle ASM library driver configuration [ OK ] Loading module "oracleasm" [ OK ] Mounting ASMlib driver filesystem [ OK ] Scanning system for ASM disks [ OK ]
7) How to Disable OracleASM service in Linux?
Use the below commands to disable the OracleASM service in Linux, depends on your init system manager.
The following command could run in all kind of systems.
# oracleasm disable
For SysVinit
Systems
# chkconfig oracleasm off
For systemd
Systems
# systemctl disable oracleasm.service or # systemctl disable oracleasm Writing Oracle ASM library driver configuration [ OK ] Unmounting ASMlib driver filesystem [ OK ] Unloading module "oracleasm" [ OK ]