Last update at :2023-12-12,Edit by888u
Sometimes we use a new hard disk to install the system under Linux, and then mount the original hard disk after installation. The partition formats are all system default partitions, and the system uses them by default
It is in lvm format, and the default volumes are VolGroup00
Use pvs to view the display as follows:
[root@localhost ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 VolGroup00 lvm2 a- 136.62G 0
/dev/sdb2 VolGroup00 lvm2 a- 136.62G 0
I found that two VGs can be correctly identified, but they have the same name. How to mount them?
The solution is to rename the original VG, resolve the conflict, and then mount it.
The rename format is: vgrename VolGroup00 VolGroup01
At this time it will prompt:
[root@localhost ~]# vgrename VolGroup00 VolGroup01
Found more than one VG called VolGroup00. Please supply VG uuid.
The reason is that there are two VolGroup00, and he has already prompted you to specify the VG uuid for the modification method.
The command to view VG uuid is:
[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 1 2 0 136.62G 0 dcHa6G-abU2-Xfq8-EPBm-jBLj-sf18-O5uH0U
VolGroup00 wz–n- 32.00M 1 2 0 136.62G 0 OF8g7h-PQJB-9D9z-yPxn-1kfY-Advq-YbNHJ9
After finding the VG uuid, perform the name change again: (Note that when modifying, you need to change the name of the disk that needs to be mounted, here is the second one)
[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
[root@localhost ~]# lvscan
inactive ‘/dev/VolGroup01/LogVol00′ [130.84 GB] inherit
inactive ‘/dev/VolGroup01/LogVol01′ [5.78 GB] inherit
ACTIVE ‘/dev/VolGroup00/LogVol00′ [130.84 GB] inherit
ACTIVE ‘/dev/VolGroup00/LogVol01′ [5.78 GB] inherit
You can see that the newly modified VolGroup01 is inactive state.
Use vgchange to load VolGroup01
[root@localhost ~]# vgchange -ay /dev/VolGroup01
2 logical volume(s) in volume group “VolGroup01″ now active
Finally, just mount
[root@localhost ~]# mount /dev/VolGroup01/LogVol00 /mnt/old
At this point, everything is completed. Note that the front is the drive path, and the latter is hung in the file directory.
Recommended site searches: local ip query, ip detailed address query, US virtual host purchase, online registration query, registration-free CDN, overseas host, US domain name registration, me domain name registration, app server rental, Taiwan host,
发表评论