Sub-mount LVM partition method under Linux __linux

Source: Internet
Author: User
Tags uuid
1. First Use Vgscan scan LVM results are as follows

[Root@localhost ~]# Vgscan
Reading all physical volumes. This could take a while ...
Warning:duplicate VG name Volgroup00:existing BGKW70-NEBI-QY6S-RVQU-3A59-N8E1-RUOWWH (created here) takes precedence ER 1wnxrg-m0t1-z1a6-rppv-lltn-odqb-idontm
Warning:duplicate VG name Volgroup00:existing BGKW70-NEBI-QY6S-RVQU-3A59-N8E1-RUOWWH (created here) takes precedence ER 1wnxrg-m0t1-z1a6-rppv-lltn-odqb-idontm
Warning:duplicate VG name Volgroup00:existing 1wnxrg-m0t1-z1a6-rppv-lltn-odqb-idontm (created here) takes precedence ER BGKW70-NEBI-QY6S-RVQU-3A59-N8E1-RUOWWH
Found Volume Group "volgroup00″using metadata type LVM2
Warning:duplicate VG name Volgroup00:existing BGKW70-NEBI-QY6S-RVQU-3A59-N8E1-RUOWWH (created here) takes precedence ER 1wnxrg-m0t1-z1a6-rppv-lltn-odqb-idontm
Found Volume Group "volgroup00″using metadata type LVM2



2. View LVM VG UUID via Vgdisplay VolGroup00

[Root@localhost ~]# Vgdisplay VolGroup00
Warning:duplicate VG name Volgroup00:existing BGKW70-NEBI-QY6S-RVQU-3A59-N8E1-RUOWWH (created here) takes precedence ER 1wnxrg-m0t1-z1a6-rppv-lltn-odqb-idontm
-volume group-
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access Read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
ACT PV 1
VG Size 129.31 GB
PE Size 32.00 MB
Total PE 4138
Alloc pe/size 4137/129.28 GB
Free Pe/size 1/32.00 MB
VG UUID BGKW70-NEBI-QY6S-RVQU-3A59-N8E1-RUOWWH

You can see that the VolGroup00 VG UUID used by the current operating system is BGKW70-NEBI-QY6S-RVQU-3A59-N8E1-RUOWWH
Description 1WNXRG-M0T1-Z1A6-RPPV-LLTN-ODQB-IDONTM This VG UUID is an LVM partition for another hard drive



3. Rename the VG name of the second hard drive

[Root@localhost ~]# Vgrename 1WNXRG-M0T1-Z1A6-RPPV-LLTN-ODQB-IDONTM/DEV/VG01
Warning:duplicate VG name Volgroup00:existing BGKW70-NEBI-QY6S-RVQU-3A59-N8E1-RUOWWH (created here) takes precedence ER 1wnxrg-m0t1-z1a6-rppv-lltn-odqb-idontm
Warning:duplicate VG name Volgroup00:existing BGKW70-NEBI-QY6S-RVQU-3A59-N8E1-RUOWWH (created here) takes precedence ER 1wnxrg-m0t1-z1a6-rppv-lltn-odqb-idontm
Warning:duplicate VG name Volgroup00:existing 1wnxrg-m0t1-z1a6-rppv-lltn-odqb-idontm (created here) takes precedence ER BGKW70-NEBI-QY6S-RVQU-3A59-N8E1-RUOWWH
Volume Group "volgroup00″successfully renamed to" Vg01″

This is the time to see the VG information through Vgdisplay.

[Root@localhost ~]# Vgdisplay
-volume group-
VG Name vg01
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access Read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 0
Max PV 0
Cur PV 1
ACT PV 1
VG Size 34.50 GB
PE Size 32.00 MB
Total PE 1104
Alloc pe/size 1103/34.47 GB
Free Pe/size 1/32.00 MB
VG UUID 1wnxrg-m0t1-z1a6-rppv-lltn-odqb-idontm

-volume group-
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access Read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
ACT PV 1
VG Size 129.31 GB
PE Size 32.00 MB
Total PE 4138
Alloc pe/size 4137/129.28 GB
Free Pe/size 1/32.00 MB
VG UUID BGKW70-NEBI-QY6S-RVQU-3A59-N8E1-RUOWWH



4. Activate VG

After the VG is renamed, the default is non-active, and we have to activate the VG in the following ways

[Root@localhost ~]# Lvscan
Inactive '/dev/vg01/logvol00′[31.50 GB] Inherit
Inactive '/dev/vg01/logvol01′[2.97 GB] Inherit
ACTIVE '/dev/volgroup00/logvol00′[125.41 GB] Inherit
ACTIVE '/dev/volgroup00/logvol01′[3.88 GB] Inherit

Activate VG
[Root@localhost ~]# VGCHANGE-AY/DEV/VG01
2 Logical Volume (s) in volume Group "Vg01″now Active

View status
[Root@localhost ~]# Lvscan
ACTIVE '/dev/vg01/logvol00′[31.50 GB] Inherit
ACTIVE '/dev/vg01/logvol01′[2.97 GB] Inherit
ACTIVE '/dev/volgroup00/logvol00′[125.41 GB] Inherit
ACTIVE '/dev/volgroup00/logvol01′[3.88 GB] Inherit
[Root@localhost ~]# Vgscan
Reading all physical volumes. This could take a while ...
Found Volume Group "vg01″using metadata type LVM2
Found Volume Group "volgroup00″using metadata type LVM2

So far, you can mount the system.



5. Mount LVM File System

[Root@localhost mnt]# MOUNT/DEV/VG01/MNT/SDB3

will be able to access the

Source: http://www.opensolution.org.cn/archives/431.html

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.