Add a new hard disk to Linux and create an LVM group

Source: Internet
Author: User

1. Take the virtual machine as an example, add a new hard disk to the virtual machine, create an LVM group, and use the new hard disk to hold the Oracle database files.

2. Fdisk-ll to see if the newly added hard drive is recognized, and the SDB has been identified.

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/80/32/wKioL1c7BHHCP-nBAADpMkdsLRo231.png "title=" 111. PNG "alt=" Wkiol1c7bhhcp-nbaadpmkdslro231.png "/>

3. # vcreate/dev/sdb (Create PV, equivalent to win will convert the base disk to dynamic disk)

4, # vgcreate Oracle_vg/dev/sdb (Create VG, create virtual volume group, no this concept in win)

5, # lvcreate-l +100%free oracle_vg-n oracle_lv (create LV,LV equivalent to the logical partition in Win)

6, use Lvdisplay to view the created VG and LV information.

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/80/32/wKioL1c7BZTRWxj-AAGuZ4YopU8416.png "title=" 111. PNG "alt=" Wkiol1c7bztrwxj-aaguz4yopu8416.png "/>

7. # MKFS.EXT4/DEV/ORACLE_VG/ORACLE_LV (format created LV and formatted with EXT4 file system)

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/80/35/wKiom1c7BUXzqMwZAAC5UfI8Vk4450.png "title=" 111. PNG "alt=" Wkiom1c7buxzqmwzaac5ufi8vk4450.png "/>

8. Create a directory and mount the LV

Mkdir/oracledata

Mount/dev/oracle_vg/oracle_lv/oracledata

9. Modify the/etc/fstab file and add a line at the end:

/dev/oracle_vg/oracle_lv/oracledata ext3 defaults 0 0

To automatically mount each time the reboot is carried out

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/80/35/wKiom1c7BeGAChJQAABUkTksl6s644.png "title=" 111. PNG "alt=" Wkiom1c7begachjqaabuktksl6s644.png "/>

10, assign the directory to the specified user, and give read and write permissions.

Chmod-r 775/oracledata (give directory Read and write permission)

Chown Oracle:oinstall/oracledata (Set attribution Group, user name: Oracle user group: Oinstall)

This article is from "I'm Still alive" blog, please be sure to keep this source http://hujizhou.blog.51cto.com/514907/1774464

Add a new hard disk to Linux and create an LVM group

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.