• 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 Change or Rename a Mount Point in Linux

by admin

As a Linux admin, you must have got a request for renaming a mount point. Well, it is fairly easy to rename the mount point name in Linux, but it needs some mount point.

Note: You may have clustering software like Veritas Infoscale or PCS cluster which might be controlling the mount point configuration. This post only discusses cases where no external clustering software is controlling the mount point configuration.

In our example, we need to change the /ORABIN12c mount point to /grid on our server.

Follow below steps to change the mount point name.

$ df -hP
Filesystem                                 Size  Used Avail Use% Mounted on
devtmpfs                                   126G     0  126G   0% /dev
tmpfs                                      126G  640M  126G   1% /dev/shm
tmpfs                                      126G  4.1G  122G   4% /run
tmpfs                                      126G     0  126G   0% /sys/fs/cgroup
/dev/mapper/vg_os-lv_root                  296G   52G  229G  19% /
/dev/mapper/vg_os2-lv_data                 197G   15G  173G   8% /data
/dev/mapper/vg_os2-ora12c                   50G   18G   30G  38% /ORABIN12c

1. Login as root.

$ sudo su -

2. Create a directory with name /grid. This directory will be used to mount.

# mkdir -p /oracle/app

3. edit the /etc/fstab file, replace /ORABIN12c with /grid in fstab file.

# vi /etc/fstab

Before:

/dev/mapper/vg_os2-ora12c /ORABIN12c       ext4    defaults        0 0

After:

/dev/mapper/vg_os2-ora12c /grid       ext4    defaults        0 0

4. Check if any process is utilizing the /ORABIN12c mount point. You may have to kill the processes running on this mount point or ask app/DBA team to shutdown the app/DB. The command to check if any process is running:

# fuser -cu /ORABIN12c

5. Once you have confirmed that nothing is running on the /ORABIN12c mount point, unmount it using the umount command:

# umount /ORABIN12c

6. Now mount the new mount point /grid

# mount /grid

7. Verify if the new mount point is reflected in the df command output:

# df -hP /grid
Filesystem                     Size  Used Avail Use% Mounted on
/dev/mapper/vg_os2-ora12c       50G   18G   30G  38% /grid

Filed Under: Linux

Some more articles you might also be interested in …

  1. macchanger Command Examples in Linux
  2. How to install and configure MariaDB in CentOS / RHEL 7
  3. opkg Command Examples in Linux
  4. Installation Steps of jEdit on Ubuntu Linux
  5. How To Setup UDEV Rules For RAC OCR And Voting Devices on Partitions
  6. last: command not found
  7. uuidgen: command not found
  8. What is SUID, SGID and Sticky bit ?
  9. How to disable “Alt+Ctrl+Del” causing system reboot in CentOS/RHEL 7
  10. ufw Command Options

You May Also Like

Primary Sidebar

Recent Posts

  • qm Command Examples in Linux
  • qm wait Command Examples in Linux
  • qm start Command Examples in Linux
  • qm snapshot Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright