linux下挂载lvm分区方法
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash
免费下载资源
·
1.首先使用vgscan 扫描 lvm 结果如下
[root@localhost ~]# vgscan
Reading all physical volumes. This may take a while…
WARNING: Duplicate VG name VolGroup00: Existing bgKw70-NEBI-QY6s-RvqU-3a59-N8E1-ruOWwh (created here) takes precedence over 1WnXRG-M0t1-z1A6-rppv-lltN-oDQB-IDonTM
WARNING: Duplicate VG name VolGroup00: Existing bgKw70-NEBI-QY6s-RvqU-3a59-N8E1-ruOWwh (created here) takes precedence over 1WnXRG-M0t1-z1A6-rppv-lltN-oDQB-IDonTM
WARNING: Duplicate VG name VolGroup00: Existing 1WnXRG-M0t1-z1A6-rppv-lltN-oDQB-IDonTM (created here) takes precedence over 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 over 1WnXRG-M0t1-z1A6-rppv-lltN-oDQB-IDonTM
Found volume group “VolGroup00″ using metadata type lvm2
[root@localhost ~]# vgdisplay VolGroup00
WARNING: Duplicate VG name VolGroup00: Existing bgKw70-NEBI-QY6s-RvqU-3a59-N8E1-ruOWwh (created here) takes precedence over 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
可以看出当前操作系统使用的VolGroup00的 VG UUID 是 bgKw70-NEBI-QY6s-RvqU-3a59-N8E1-ruOWwh
说明 1WnXRG-M0t1-z1A6-rppv-lltN-oDQB-IDonTM 这个VG UUID 是要另一块硬盘的lvm 分区
[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 over 1WnXRG-M0t1-z1A6-rppv-lltN-oDQB-IDonTM
WARNING: Duplicate VG name VolGroup00: Existing bgKw70-NEBI-QY6s-RvqU-3a59-N8E1-ruOWwh (created here) takes precedence over 1WnXRG-M0t1-z1A6-rppv-lltN-oDQB-IDonTM
WARNING: Duplicate VG name VolGroup00: Existing 1WnXRG-M0t1-z1A6-rppv-lltN-oDQB-IDonTM (created here) takes precedence over bgKw70-NEBI-QY6s-RvqU-3a59-N8E1-ruOWwh
Volume group “VolGroup00″ successfully renamed to “vg01″
这个时候通过 vgdisplay 就可以看到 VG的信息了
[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
VG重命名后,默认是非ACTIVE状态,我们要通过以下方式激活VG
[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
激活 VG
[root@localhost ~]# vgchange -ay /dev/vg01
2 logical volume(s) in volume group “vg01″ now active
查看状态
[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 may take a while…
Found volume group “vg01″ using metadata type lvm2
Found volume group “VolGroup00″ using metadata type lvm2
到此为止,可以挂载系统了!
[root@localhost mnt]# mount /dev/vg01 /mnt/sdb3
就可以访问了
源 : http://www.opensolution.org.cn/archives/431.html
[root@localhost ~]# vgscan
Reading all physical volumes. This may take a while…
WARNING: Duplicate VG name VolGroup00: Existing bgKw70-NEBI-QY6s-RvqU-3a59-N8E1-ruOWwh (created here) takes precedence over 1WnXRG-M0t1-z1A6-rppv-lltN-oDQB-IDonTM
WARNING: Duplicate VG name VolGroup00: Existing bgKw70-NEBI-QY6s-RvqU-3a59-N8E1-ruOWwh (created here) takes precedence over 1WnXRG-M0t1-z1A6-rppv-lltN-oDQB-IDonTM
WARNING: Duplicate VG name VolGroup00: Existing 1WnXRG-M0t1-z1A6-rppv-lltN-oDQB-IDonTM (created here) takes precedence over 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 over 1WnXRG-M0t1-z1A6-rppv-lltN-oDQB-IDonTM
Found volume group “VolGroup00″ using metadata type lvm2
[root@localhost ~]# vgdisplay VolGroup00
WARNING: Duplicate VG name VolGroup00: Existing bgKw70-NEBI-QY6s-RvqU-3a59-N8E1-ruOWwh (created here) takes precedence over 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
可以看出当前操作系统使用的VolGroup00的 VG UUID 是 bgKw70-NEBI-QY6s-RvqU-3a59-N8E1-ruOWwh
说明 1WnXRG-M0t1-z1A6-rppv-lltN-oDQB-IDonTM 这个VG UUID 是要另一块硬盘的lvm 分区
[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 over 1WnXRG-M0t1-z1A6-rppv-lltN-oDQB-IDonTM
WARNING: Duplicate VG name VolGroup00: Existing bgKw70-NEBI-QY6s-RvqU-3a59-N8E1-ruOWwh (created here) takes precedence over 1WnXRG-M0t1-z1A6-rppv-lltN-oDQB-IDonTM
WARNING: Duplicate VG name VolGroup00: Existing 1WnXRG-M0t1-z1A6-rppv-lltN-oDQB-IDonTM (created here) takes precedence over bgKw70-NEBI-QY6s-RvqU-3a59-N8E1-ruOWwh
Volume group “VolGroup00″ successfully renamed to “vg01″
这个时候通过 vgdisplay 就可以看到 VG的信息了
[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
VG重命名后,默认是非ACTIVE状态,我们要通过以下方式激活VG
[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
激活 VG
[root@localhost ~]# vgchange -ay /dev/vg01
2 logical volume(s) in volume group “vg01″ now active
查看状态
[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 may take a while…
Found volume group “vg01″ using metadata type lvm2
Found volume group “VolGroup00″ using metadata type lvm2
到此为止,可以挂载系统了!
[root@localhost mnt]# mount /dev/vg01 /mnt/sdb3
就可以访问了
源 : http://www.opensolution.org.cn/archives/431.html
GitHub 加速计划 / li / linux-dash
10.39 K
1.2 K
下载
A beautiful web dashboard for Linux
最近提交(Master分支:2 个月前 )
186a802e
added ecosystem file for PM2 4 年前
5def40a3
Add host customization support for the NodeJS version 4 年前
更多推荐
已为社区贡献5条内容
所有评论(0)