快速业务通道

linux软raid和lvm

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-04-04
ailed: Read-only file system Attempt to close device ''/dev/cdrom'' which is not open. PV /dev/hdd1 lvm2 [1.86 GB] PV /dev/hdd2 lvm2 [1.86 GB] PV /dev/hdd3 lvm2 [1.86 GB] Total: 4 [35.46 GB] / in use: 1 [29.88 GB] / in no VG: 3 [5.59 GB] 建立卷组: [root@qiuri ~]# vgcreate vg0 /dev/hdd1 /dev/hdd2 /dev/hdd3 Volume group "vg0" successfully created [root@qiuri ~]# [root@qiuri ~]# vgscan Reading all physical volumes. This may take a while... /dev/cdrom: open failed: Read-only file system Attempt to close device ''/dev/cdrom'' which is not open. Found volume group "vg0" using metadata type lvm2 建立逻辑卷: [root@qiuri ~]# lvcreate -n lv0 -L 1000M vg0 Logical volume "lv0" created [root@qiuri ~]# 格式化: [root@qiuri ~]# mkfs.ext3 /dev/vg0/lv0 [root@qiuri ~]# mkdir /mnt/lv0 [root@qiuri ~]# mount /dev/vg0/lv0 /mnt/lv0/ 查看: [root@qiuri ~]# pvdisplay /dev/hdd1 --- Physical volume --- PV Name 163M 0 163M 0% /dev/shm /dev/mapper/vg0-lv0 1.5G 18M 1.4G 2% /mnt/lv0 [root@qiuri ~]# 减小逻辑卷大小: 注意:如果当前逻辑卷有数据的话,注意先备份 [root@qiuri ~]# lvreduce -L -200M /dev/vg0/lv0 卸载: [root@qiuri ~]# lvremove /dev/vg0/lv0 Logical volume "lv0" successfully removed [root@qiuri ~]# vgremove vg0 Volume group "vg0" successfully removed [root@qiuri ~]# pvremove /dev/hdd1 /dev/hdd2 /dev/hdd3 /dev/hdd4 /dev/cdrom: open failed: Read-only file system Attempt to close device ''/dev/cdrom'' which is not open. Labels on physical volume "/dev/hdd1" successfully wiped Labels on physical volume "/dev/hdd2" successfully wiped Labels on physical volume "/dev/hdd3" successfully wiped Labels on physical volume "/dev/hdd4" successfully wiped [root@qiuri ~]# pvscan /dev/cdrom: open failed: Read-only file system Attempt to close device ''/dev/cdrom'' which is not open. PV /dev/hda2 VG VolGroup00 lvm2 [29.88 GB / 0 free] Total: 1 [29.88 GB] / in use: 1 [29.88 GB] / in no VG: 0 [0 ] [root@qiuri ~]# 实验: RAID:5 LVM

本文出自 “it民工” 博客,请务必保留此出处http://zyw1209.blog.51cto.com/1266169/441583

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号