Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of CentOS mounting lvm Partition renaming

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to solve the CentOS mount lvm partition renaming problem", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "how to solve the CentOS mount lvm partition renaming problem"!

Using pvs to view the display is as follows:

The code is as follows:

[root@localhost ~] # pvs

PV VG Fmt Attr PSize PFree

/ dev/sda2 VolGroup00 lvm2 a-372.50G 0

/ dev/sdb2 VolGroup00 lvm2 a-136.62G 0

It is found that the two VG can be correctly identified, but with the same name, how to mount it?

The solution is to rename the original VG to resolve the conflict and mount it.

Rename format to: vgrename VolGroup00 VolGroup01

You will be prompted:

The code is as follows:

[root@localhost ~] # vgrename VolGroup00 VolGroup01

Found more than one VG called VolGroup00. Please supply VG uuid.

The reason is that there are two VolGroup00, the modified method he has prompted to specify VG uuid.

The command to view VG uuid is:

The code is as follows:

[root@localhost] # vgs-v

Finding all volume groups

Finding volume group "VolGroup00"

Finding volume group "VolGroup00"

VG Attr Ext # PV # LV # SN VSize VFree VG UUID

VolGroup00 wz--n- 32.00M 120372.50G 0 dcHa6G-abU2-Xfq8-EPBm-jBLj-sf18-O5uH0U

VolGroup00 wz--n- 32.00M 120136.62G 0 OF8g7h-PQJB-9D9z-yPxn-1kfY-Advq-YbNHJ9

Once the VG uuid is found, perform the renaming again:

The code is as follows:

[root@localhost ~] # vgrename OF8g7h-PQJB-9D9z-yPxn-1kfY-Advq-YbNHJ9 VolGroup01

Volume group "VolGroup00" still has active LVs

After the modification is successful, execute: lvscan

The code is as follows:

[root@localhost ~] # lvscan

Inactive'/ dev/VolGroup01/LogVol00' [130.84 GB] inherit

Inactive'/ dev/VolGroup01/LogVol01' [1.94 GB] inherit

ACTIVE'/ dev/VolGroup00/LogVol00' [367.09 GB] inherit

ACTIVE'/ dev/VolGroup00/LogVol01' [5.41 GB] inherit

You can see that the newly modified VolGroup01 is the inactive state.

Then use vgchange to load VolGroup01

The code is as follows:

[root@localhost ~] # vgchange-ay / dev/VolGroup01

2 logical volume (s) in volume group "VolGroup01" now active

Execute again: lvscan

The code is as follows:

[root@localhost ~] # lvscan

ACTIVE'/ dev/VolGroup01/LogVol00' [134.69 GB] inherit

ACTIVE'/ dev/VolGroup01/LogVol01' [1.94 GB] inherit

ACTIVE'/ dev/VolGroup00/LogVol00' [367.09 GB] inherit

ACTIVE'/ dev/VolGroup00/LogVol01' [5.41 GB] inherit

You can find that VolGroup01 is already in ACTIVE state.

In the end, mount can.

The code is as follows:

[root@localhost ~] # mount / dev/VolGroup01/LogVol00 / data/www

Thank you for your reading, the above is the content of "how to solve the problem of CentOS mounting lvm partition renaming". After the study of this article, I believe you have a deeper understanding of how to solve the problem of CentOS mounting lvm partition renaming problem, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report