Linux modify the partition name created during installation

  
        

1. Modify the partition target

Modify the “/oracle” partition to “/dba” partition

1.1 Partition the disk when installing Linux

For example:

Serial Number

Disk Device Name

Partition Name

Remarks

1

/dev/sda3

/boot

Boot Partition

2

tmpfs

/

Root Partition

3

/dev/sda1

/dev/shm

SWAP Partition

4

/dev/sda2

/oracle

Preparing to install oracle partition


1.2 Modifying “/oracle” partition to “/dba” partition

The modified partition structure needs to be as follows:

Serial number

Disk device name

Partition name

Remarks

1

/dev/sda3

/boot

Boot partition

2

tmpfs

/

Root partition

3

/dev/sda1

/dev/shm

SWAP Partition

4

/dev/sda2

/dba

Prepare Install oracle partition


2, umount off /oracle mount point

#umount/oracle

3, create /dba in the root directory Directory

#mkdir -p /dba

4, modify the mount point information in the fstab file to automatically mount the new mount point when restarting

#vi/etc /fstab

#

# /etc/fstab

# Created by anaconda on Mon Jan 20 05:59:16 2014

#

# Accessible filesystems, by reference, a Re maintained under '/dev/disk'

# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info

#

UUID=a4011859-9a90-4a1b-96d8-90403810ff20 /ext4 defaults 1 1

UUID=d27a474f-b2bb-461e-834e-a1b29dc9988b /boot ext4 defaults 1 2

UUID=8a2febda-3626-43d4-a463-16f07f3973ff /oracle ext4 defaults 1 2

UUID=5cd77e82-5bf0-4ac4-b789-0b17118d6dfe swap swap defaults 0 0

tmpfs /dev/Shm tmpfs defaults 0 0

devpts /dev/pts devpts gid=5,mode=620 0 0

sysfs /sys sysfs defaults 0 0

proc /proc proc defaults 0 0


Locate the red content above and modify “/oracle” as “/dba”, after the change is as follows:

#
< #>etc/fstab

# Created by anaconda on Mon Jan 20 05:59:16 2014

#

# Accessible filesystems, by reference, are maintained under '/dev/d Isk'

# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info

#

UUID =a4011859-9a90-4a1b-96d8-90403810ff20 /ext4 defaults 1 1

UUID=d27a474f-b2bb-461e-834e-a1b29dc9988b /boot ext4 defaults 1 2

UUID=8a2febda-3626- 43d4-a463-16f07f3973ff /dba ext4 defaults 1 2

UUID=5cd77e82-5bf0-4ac4-b789-0b17118d6dfe swap swap defaults 0 0

tmpfs /dev/shm tmpfs defaults 0 0

devpts /dev/pts devpts gid=5,mode=620 0 0

sysfs /sys sysfs defaults 0 0

proc /proc proc defaults 0 0


5, make the partition mount point effective

5.1 temporary effective

#mount /dev/sda2 /dba

5.2 restart automount < Br>

Since the fstab file has been modified in step 4, the new mount point will be automatically mounted when the Linux system is restarted. /dba”

6. Data retention
>

In this way, change the original “/oracle” directory to “/dba&rdq Uo; after the directory, the original “ /oracle & rdquo; directory data will not be lost

Copyright © Windows knowledge All Rights Reserved