3 月 012014
 

 



lvm在线扩容

#fdisk -l

Disk /dev/sdb: 107.4 GB, 107374182400 bytes
#lvm
lvm> vgdisplay
— Volume group —
VG Name               VolGroup
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               19.51 GiB
PE Size               4.00 MiB
Total PE              4994
Alloc PE / Size       4994 / 19.51 GiB
Free  PE / Size       0 / 0
VG UUID               rkR8iG-uw5Y-o70f-Eoms-Wh9D-fCGR-KrUygy
 pvcreate /dev/sdb
vgextend /dev/VolGroup /dev/sdb
lvm> vgdisplay
— Volume group —
VG Name               VolGroup
System ID
Format                lvm2
Metadata Areas        2
Metadata Sequence No  4
VG Access             read/write
VG Status             resizable
MAX LV                0
Cur LV                2
Open LV               2
Max PV                0
Cur PV                2
Act PV                2
VG Size               119.50 GiB
PE Size               4.00 MiB
Total PE              30593
Alloc PE / Size       4994 / 19.51 GiB
Free  PE / Size       25599 / 100.00 GiB
VG UUID               rkR8iG-uw5Y-o70f-Eoms-Wh9D-fCGR-KrUygy
vm> lvdisplay
  — Logical volume —
LV Path                /dev/VolGroup/lv_root
LV Name                lv_root
VG Name                VolGroup
LV UUID                AZ0kor-WV8L-VnYo-Pz2o-OFfm-j6VE-kLcA5P
LV Write Access        read/write
LV Creation host, time localhost.localdomain, 2013-05-29 06:31:35 +0800
LV Status              available
# open                 1
LV Size                15.57 GiB
Current LE             3986
Segments               1
Allocation             inherit
Read ahead sectors     auto
– currently set to     256
Block device           253:0

— Logical volume —
LV Path                /dev/VolGroup/lv_swap
LV Name                lv_swap
VG Name                VolGroup
LV UUID                lI8ei8-j9GB-68cg-wJuC-0e2H-137J-3ec9df
LV Write Access        read/write
LV Creation host, time localhost.localdomain, 2013-05-29 06:31:37 +0800
LV Status              available
# open                 1
LV Size                3.94 GiB
Current LE             1008
Segments               1
Allocation             inherit
Read ahead sectors     auto
– currently set to     256
Block device           253:1

lvextend -L +99G /dev/VolGroup00/lv_root
lvm> lvdisplay
— Logical volume —
LV Path                /dev/VolGroup/lv_root
LV Name                lv_root
VG Name                VolGroup
LV UUID                AZ0kor-WV8L-VnYo-Pz2o-OFfm-j6VE-kLcA5P
LV Write Access        read/write
LV Creation host, time localhost.localdomain, 2013-05-29 06:31:35 +0800
LV Status              available
# open                 1
  LV Size                114.57 GiB
  Current LE             29330
Segments               2
Allocation             inherit
Read ahead sectors     auto
– currently set to     256
Block device           253:0

— Logical volume —
LV Path                /dev/VolGroup/lv_swap
LV Name                lv_swap
VG Name                VolGroup
LV UUID                lI8ei8-j9GB-68cg-wJuC-0e2H-137J-3ec9df
LV Write Access        read/write
LV Creation host, time localhost.localdomain, 2013-05-29 06:31:37 +0800
LV Status              available
# open                 1
LV Size                3.94 GiB
Current LE             1008
Segments               1
Allocation             inherit
Read ahead sectors     auto
– currently set to     256
Block device           253:1

lvm> quit
 resize2fs -p /dev/VolGroup/lv_root

 

 Posted by at 下午 3:50

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny