你好,游客 登录 注册 搜索
背景:
阅读新闻

虚拟化基础服务器模板用CentOS6的mini版安装后的在线扩展基本存储

[日期:2013-06-13] 来源:Linux社区  作者:leotime [字体:大 中 小]

四、检验
可用情况先用DF
df -h

分区空间用fdisk
fdisk -l

Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000855ab


Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 1045 7875584 8e Linux LVM


Disk /dev/sdb: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe4f0a131


Device Boot Start End Blocks Id System
/dev/sdb1 1 13054 104856223+ 8e Linux LVM


Disk /dev/mapper/VolGroup-lv_root: 113.3 GB, 113288151040 bytes
255 heads, 63 sectors/track, 13773 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/VolGroup-lv_swap: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


==================================================
其它记录:
cat /etc/fstab


几个命令:
扩展vg: vgextend vg0(卷组名) /dev/sdc1(pv名)
扩展lv: lvextend -L +200m /dev/vg0/home(lv名)
查看信息:vgdisplay /dev/vg0 ,lvdisplay /dev/vg0/logVol00
数据迁移:pvmove /dev/sda1 /dev/sdc1
删除逻辑卷步骤:
A.umout所有lv
B.lvremove /dev/vgo/logVol00(有快照要先删除快照)
C.vgchange -an /dev/vg0 (休眠vg0,-ay是激活vg0)
D.vgremove vg0 (移除)
注意:迁移时注意PE、LE是一一对应的,大小要一致,迁移时不能改变大小。


检查vg还有多少空间没有分配以及当前lv的大小
vgdisplay | egrep "Volume group|VG Name|Alloc PE|Free PE"

lvdisplay | egrep " Logical volume|LV Name|VG Name|LV Size"

 

这样就可以挂载到你要用的地方了

更多CentOS相关信息见CentOS 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=14

linux
相关资讯       服务器虚拟化 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款