逻辑卷管理实验----缩减/home目录使用空间并创建新的LVM(初学者学习使用)

参考:http://blog.51cto.com/dreamfire/1084729
实验环境:redhat6.5

实验过程
显示物理卷:
[[email protected] ~]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               vg_clark
  PV Size               299.51 GiB / not usable 3.00 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              76674
  Free PE               142
  Allocated PE          76532
  PV UUID               fusHvY-5mpq-X2bO-pbdC-2AWl-m4wO-cUf07p
  
查看磁盘挂载:
[[email protected] ~]# df -h
Filesystem                    Size  Used Avail Use% Mounted on
/dev/mapper/vg_clark-lv_root  231G   27G  193G  13% /
tmpfs                          16G  228K   16G   1% /dev/shm
/dev/sda1                     485M   39M  421M   9% /boot
/dev/mapper/vg_clark-lv_home   49G  226M   46G   1% /home
/dev/sr0                      3.6G  3.6G     0 100% /media/RHEL_6.5 x86_64 Disc 1
umount home目录:
[[email protected] /]# umount /home
检查lvm:
[[email protected] /]# e2fsck -f /dev/vg_clark/lv_home
e2fsck 1.41.12 (17-May-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/vg_clark/lv_home: 504/3203072 files (0.0% non-contiguous), 258764/12800000 blocks
resize lvm(注意不要在生产环境使用):
[[email protected] /]# resize2fs  /dev/vg_clark/lv_home 2G
resize2fs 1.41.12 (17-May-2010)
Resizing the filesystem on /dev/vg_clark/lv_home to 524288 (4k) blocks.
The filesystem on /dev/vg_clark/lv_home is now 524288 blocks long.
减少lvm空间:
[[email protected] /]# lvreduce -L 2G /dev/vg_clark/lv_home
  WARNING: Reducing active logical volume to 2.00 GiB
  THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce lv_home? [y/n]: y
  Reducing logical volume lv_home to 2.00 GiB
  Logical volume lv_home successfully resized
重新挂载/home目录
[[email protected] /]# mount /dev/vg_clark/lv_home /home
[[email protected] /]# df -h
Filesystem                    Size  Used Avail Use% Mounted on
/dev/mapper/vg_clark-lv_root  231G   27G  193G  13% /
tmpfs                          16G  228K   16G   1% /dev/shm
/dev/sda1                     485M   39M  421M   9% /boot
/dev/sr0                      3.6G  3.6G     0 100% /media/RHEL_6.5 x86_64 Disc 1
/dev/mapper/vg_clark-lv_home  2.0G  198M  1.7G  11% /home
[[email protected] /]# fdisk -l

Disk /dev/sda: 322.1 GB, 322122547200 bytes
255 heads, 63 sectors/track, 39162 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: 0x000ba939

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       39163   314059776   8e  Linux LVM

Disk /dev/mapper/vg_clark-lv_root: 251.7 GB, 251658240000 bytes
255 heads, 63 sectors/track, 30595 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/vg_clark-lv_swap: 16.9 GB, 16911433728 bytes
255 heads, 63 sectors/track, 2056 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/vg_clark-lv_home: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 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
空间释放到物理卷中:
[[email protected] /]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               vg_clark
  PV Size               299.51 GiB / not usable 3.00 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              76674
  Free PE               12130
  Allocated PE          64544
  PV UUID               fusHvY-5mpq-X2bO-pbdC-2AWl-m4wO-cUf07p
查看卷组发现减少的空间已经自动释放到卷组中:
[[email protected] /]# vgdisplay
  --- Volume group ---
  VG Name               vg_clark
  System ID            
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  5
  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               299.51 GiB
  PE Size               4.00 MiB
  Total PE              76674
  Alloc PE / Size       64544 / 252.12 GiB
  Free  PE / Size       12130 / 47.38 GiB
  VG UUID               1IW8eG-arlp-kvje-wFLT-pC5d-AcY0-RulpNe
创建名为lv_test的lvm:
[[email protected] /]# lvcreate -L 15G -n lv_test vg_clark
  Logical volume "lv_test" created
[[email protected] /]# lvdisplay
  --- Logical volume ---
  LV Path                /dev/vg_clark/lv_root
  LV Name                lv_root
  VG Name                vg_clark
  LV UUID                shkBg6-9RqZ-AhDG-qfVf-d51Z-nsoS-qvF7Da
  LV Write Access        read/write
  LV Creation host, time clark, 2017-02-10 10:33:09 +0800
  LV Status              available
  # open                 1
  LV Size                234.38 GiB
  Current LE             60000
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
  
  --- Logical volume ---
  LV Path                /dev/vg_clark/lv_swap
  LV Name                lv_swap
  VG Name                vg_clark
  LV UUID                FQE8o0-yOKG-S4ip-Cvry-qSdk-v3f9-uPSa1e
  LV Write Access        read/write
  LV Creation host, time clark, 2017-02-10 10:33:50 +0800
  LV Status              available
  # open                 1
  LV Size                15.75 GiB
  Current LE             4032
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
  
  --- Logical volume ---
  LV Path                /dev/vg_clark/lv_home
  LV Name                lv_home
  VG Name                vg_clark
  LV UUID                FTLjIk-zr5B-M5ak-WdXB-c2Zs-c0eC-xZ6YBp
  LV Write Access        read/write
  LV Creation host, time clark, 2017-02-10 10:33:51 +0800
  LV Status              available
  # open                 1
  LV Size                2.00 GiB
  Current LE             512
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2
  
  --- Logical volume ---
  LV Path                /dev/vg_clark/lv_test
  LV Name                lv_test
  VG Name                vg_clark
  LV UUID                l1IhX5-LOKf-lOaH-K5nZ-3wod-2X7m-07cogG
  LV Write Access        read/write
  LV Creation host, time clark, 2017-11-28 13:19:39 +0800
  LV Status              available
  # open                 0
  LV Size                15.00 GiB
  Current LE             3840
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:3
 
 
[[email protected] /]# lvdisplay
  --- Logical volume ---
  LV Path                /dev/vg_clark/lv_root
  LV Name                lv_root
  VG Name                vg_clark
  LV UUID                shkBg6-9RqZ-AhDG-qfVf-d51Z-nsoS-qvF7Da
  LV Write Access        read/write
  LV Creation host, time clark, 2017-02-10 10:33:09 +0800
  LV Status              available
  # open                 1
  LV Size                234.38 GiB
  Current LE             60000
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
  
  --- Logical volume ---
  LV Path                /dev/vg_clark/lv_swap
  LV Name                lv_swap
  VG Name                vg_clark
  LV UUID                FQE8o0-yOKG-S4ip-Cvry-qSdk-v3f9-uPSa1e
  LV Write Access        read/write
  LV Creation host, time clark, 2017-02-10 10:33:50 +0800
  LV Status              available
  # open                 1
  LV Size                15.75 GiB
  Current LE             4032
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
  
  --- Logical volume ---
  LV Path                /dev/vg_clark/lv_home
  LV Name                lv_home
  VG Name                vg_clark
  LV UUID                FTLjIk-zr5B-M5ak-WdXB-c2Zs-c0eC-xZ6YBp
  LV Write Access        read/write
  LV Creation host, time clark, 2017-02-10 10:33:51 +0800
  LV Status              available
  # open                 1
  LV Size                2.00 GiB
  Current LE             512
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2
  
  --- Logical volume ---
  LV Path                /dev/vg_clark/lv_test
  LV Name                lv_test
  VG Name                vg_clark
  LV UUID                l1IhX5-LOKf-lOaH-K5nZ-3wod-2X7m-07cogG
  LV Write Access        read/write
  LV Creation host, time clark, 2017-11-28 13:19:39 +0800
  LV Status              available
  # open                 0
  LV Size                15.00 GiB
  Current LE             3840
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:3
  
[[email protected] /]# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Fri Feb 10 10:35:59 2017
#
# Accessible filesystems, by reference, are maintained under ‘/dev/disk‘
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_clark-lv_root /                       ext4    defaults        1 1
UUID=3b96274e-550d-43fa-96c3-2a4b0b6684dc /boot                   ext4    defaults        1 2
/dev/mapper/vg_clark-lv_home /home                   ext4    defaults        1 2
/dev/mapper/vg_clark-lv_swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
格式化lvm:
[[email protected] /]# mkfs.ext4 /dev/vg_clark/lv_test
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
983040 inodes, 3932160 blocks
196608 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4026531840
120 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

Writing inode tables: done                           
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
挂载lv_test到/test目录
[[email protected] /]# mkdir /test
[[email protected] /]# mount /dev/vg_clark/lv_test /test
[[email protected] /]# df -h
Filesystem                    Size  Used Avail Use% Mounted on
/dev/mapper/vg_clark-lv_root  231G   27G  193G  13% /
tmpfs                          16G  228K   16G   1% /dev/shm
/dev/sda1                     485M   39M  421M   9% /boot
/dev/sr0                      3.6G  3.6G     0 100% /media/RHEL_6.5 x86_64 Disc 1
/dev/mapper/vg_clark-lv_home  2.0G  198M  1.7G  11% /home
/dev/mapper/vg_clark-lv_test   15G  166M   14G   2% /test

接下删除lv_test逻辑卷,并创建名为lv_asm的逻辑卷用作数据库使用:
[[email protected] /]# umount /test
[[email protected] /]#
[[email protected] /]# df -h
Filesystem                    Size  Used Avail Use% Mounted on
/dev/mapper/vg_clark-lv_root  231G   27G  193G  13% /
tmpfs                          16G  228K   16G   1% /dev/shm
/dev/sda1                     485M   39M  421M   9% /boot
/dev/sr0                      3.6G  3.6G     0 100% /media/RHEL_6.5 x86_64 Disc 1
/dev/mapper/vg_clark-lv_home  2.0G  198M  1.7G  11% /home
[[email protected] /]# lvdisplay
  --- Logical volume ---
  LV Path                /dev/vg_clark/lv_root
  LV Name                lv_root
  VG Name                vg_clark
  LV UUID                shkBg6-9RqZ-AhDG-qfVf-d51Z-nsoS-qvF7Da
  LV Write Access        read/write
  LV Creation host, time clark, 2017-02-10 10:33:09 +0800
  LV Status              available
  # open                 1
  LV Size                234.38 GiB
  Current LE             60000
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
  
  --- Logical volume ---
  LV Path                /dev/vg_clark/lv_swap
  LV Name                lv_swap
  VG Name                vg_clark
  LV UUID                FQE8o0-yOKG-S4ip-Cvry-qSdk-v3f9-uPSa1e
  LV Write Access        read/write
  LV Creation host, time clark, 2017-02-10 10:33:50 +0800
  LV Status              available
  # open                 1
  LV Size                15.75 GiB
  Current LE             4032
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
  
  --- Logical volume ---
  LV Path                /dev/vg_clark/lv_home
  LV Name                lv_home
  VG Name                vg_clark
  LV UUID                FTLjIk-zr5B-M5ak-WdXB-c2Zs-c0eC-xZ6YBp
  LV Write Access        read/write
  LV Creation host, time clark, 2017-02-10 10:33:51 +0800
  LV Status              available
  # open                 1
  LV Size                2.00 GiB
  Current LE             512
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2
  
  --- Logical volume ---
  LV Path                /dev/vg_clark/lv_test
  LV Name                lv_test
  VG Name                vg_clark
  LV UUID                l1IhX5-LOKf-lOaH-K5nZ-3wod-2X7m-07cogG
  LV Write Access        read/write
  LV Creation host, time clark, 2017-11-28 13:19:39 +0800
  LV Status              available
  # open                 0
  LV Size                15.00 GiB
  Current LE             3840
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:3

[[email protected] /]# vgdisplay
  --- Volume group ---
  VG Name               vg_clark
  System ID            
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  6
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                4
  Open LV               3
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               299.51 GiB
  PE Size               4.00 MiB
  Total PE              76674
  Alloc PE / Size       68384 / 267.12 GiB
  Free  PE / Size       8290 / 32.38 GiB
  VG UUID               1IW8eG-arlp-kvje-wFLT-pC5d-AcY0-RulpNe
  
[[email protected] /]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               vg_clark
  PV Size               299.51 GiB / not usable 3.00 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              76674
  Free PE               8290
  Allocated PE          68384
  PV UUID               fusHvY-5mpq-X2bO-pbdC-2AWl-m4wO-cUf07p
  
 
[[email protected] /]# lvremove /dev/vg_clark/lv_test
Do you really want to remove active logical volume lv_test? [y/n]: y
  Logical volume "lv_test" successfully removed
[[email protected] /]#
[[email protected] /]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               vg_clark
  PV Size               299.51 GiB / not usable 3.00 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              76674
  Free PE               12130
  Allocated PE          64544
  PV UUID               fusHvY-5mpq-X2bO-pbdC-2AWl-m4wO-cUf07p
  
[[email protected] /]# vgdisplay
  --- Volume group ---
  VG Name               vg_clark
  System ID            
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  7
  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               299.51 GiB
  PE Size               4.00 MiB
  Total PE              76674
  Alloc PE / Size       64544 / 252.12 GiB
  Free  PE / Size       12130 / 47.38 GiB
  VG UUID               1IW8eG-arlp-kvje-wFLT-pC5d-AcY0-RulpNe
  
[[email protected] /]#
[[email protected] /]# lvcreate -L 45G -n lv_asm vg_clark
  Logical volume "lv_asm" created
[[email protected] /]# mkfs.ext4 /dev/vg_clark/lv_asm
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
2949120 inodes, 11796480 blocks
589824 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
360 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424

Writing inode tables: done                           
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 30 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[[email protected] /]#
[[email protected] /]#
[[email protected] /]# lvdisplay
  --- Logical volume ---
  LV Path                /dev/vg_clark/lv_root
  LV Name                lv_root
  VG Name                vg_clark
  LV UUID                shkBg6-9RqZ-AhDG-qfVf-d51Z-nsoS-qvF7Da
  LV Write Access        read/write
  LV Creation host, time clark, 2017-02-10 10:33:09 +0800
  LV Status              available
  # open                 1
  LV Size                234.38 GiB
  Current LE             60000
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
  
  --- Logical volume ---
  LV Path                /dev/vg_clark/lv_swap
  LV Name                lv_swap
  VG Name                vg_clark
  LV UUID                FQE8o0-yOKG-S4ip-Cvry-qSdk-v3f9-uPSa1e
  LV Write Access        read/write
  LV Creation host, time clark, 2017-02-10 10:33:50 +0800
  LV Status              available
  # open                 1
  LV Size                15.75 GiB
  Current LE             4032
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
  
  --- Logical volume ---
  LV Path                /dev/vg_clark/lv_home
  LV Name                lv_home
  VG Name                vg_clark
  LV UUID                FTLjIk-zr5B-M5ak-WdXB-c2Zs-c0eC-xZ6YBp
  LV Write Access        read/write
  LV Creation host, time clark, 2017-02-10 10:33:51 +0800
  LV Status              available
  # open                 1
  LV Size                2.00 GiB
  Current LE             512
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2
  
  --- Logical volume ---
  LV Path                /dev/vg_clark/lv_asm
  LV Name                lv_asm
  VG Name                vg_clark
  LV UUID                Fa3ufV-6Pjn-Sncv-KyKd-x6BD-GWoi-yFXjMv
  LV Write Access        read/write
  LV Creation host, time clark, 2017-11-28 14:00:39 +0800
  LV Status              available
  # open                 0
  LV Size                45.00 GiB
  Current LE             11520
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:3

时间: 2024-10-05 05:21:37

逻辑卷管理实验----缩减/home目录使用空间并创建新的LVM(初学者学习使用)的相关文章

[Linux] centOS 6.5 LVM 逻辑卷 管理 实验报告

目录 1.      LVM 简介 2.      LVM基本术语 3.      LVM的安装 4.      LVM的使用 4.1        物理卷的管理 4.2        卷组的管理: 4.3        逻辑卷的管理: 5.      一个例子 5.1        练习: 5.2        开始部署 1.   LVM 简介 LVM逻辑卷管理器(英语:Logical Volume Manager,缩写为LVM),又译为逻辑卷宗管理器.逻辑扇区管理器.逻辑磁盘管理器,是Lin

逻辑卷管理(LVM)

参考资料列表 本文部分资料参考自以下列表 https://www.ibm.com/developerworks/cn/linux/l-lvm2/ 比较详细地描述了Linux 逻辑卷的管理 https://linux.die.net/man/8/lvm Linux LVM2工具手册 本文将从以下几个方面介绍LVM 什么是逻辑卷 逻辑卷的结构 逻辑卷的管理 迁移逻辑卷到新的系统 删除逻辑卷 逻辑卷快照 什么是逻辑卷 逻辑卷管理(LVM)指系统将物理卷管理抽象到更高的层次,常常会形成更简单的管理模式.

【转载】Linux磁盘管理:LVM逻辑卷管理

Linux学习之CentOS(二十五)--Linux磁盘管理:LVM逻辑卷基本概念及LVM的工作原理 这篇随笔将详细讲解Linux磁盘管理机制中的LVM逻辑卷的基本概念以及LVM的工作原理!!! 一.传统的磁盘管理 其实在Linux操作系统中,我们的磁盘管理机制和windows上的差不多,绝大多数都是使用MBR(Master Boot Recorder)都是通过先对一个硬盘进行分区,然后再将该分区进行文件系统的格式化,在Linux系统中如果要使用该分区就将其挂载上去即可,windows的话其实底

RAID(独立冗余磁盘阵列)与LVM(逻辑卷管理器)

RAID(独立冗余磁盘阵列)RAID 0:数据依次写入不同的硬盘,提升速度,但不具备数据备份和错误修复功能.RAID 1:将同一个数据分别写入2个硬盘(一个作为在用,一个作为备份),提升安全性,成本加大,速度不变.RAID 5:将硬盘设备的数据奇偶校验信息保存到其他硬盘设备中,出问题后通过再其他盘的parity重建损坏数据.成本有所增加,安全性提升,速度有所提升.RAID 10:通过RAID1和RAID0组合,采用4个硬盘组成,每2个盘组成一个RAID1,然后用组成的RAID1,组成RAID10

LVM逻辑卷管理--在线扩容、逻辑卷与卷组容量缩减、逻辑卷快照

LVM逻辑卷管理公司生产环境中使用了LVM逻辑卷管理,所以今天花时间整理一下.通过LVM技术整合所有的磁盘资源进行分区,然后创建PV物理卷形成一个资源池,再划分卷组,最后在卷组上创建不同的逻辑卷,继而初始化逻辑卷,挂载到系统中使用.LVM对比传统硬盘存储的优点1. 统一管理:整合多个磁盘或分区形成一个资源池2. 灵活性:可以使用不同磁盘.不同分区来组成一个逻辑卷3. 可伸缩性:逻辑卷和卷组的容量都可以使用命令来扩展或者缩减,且不会影响破坏原有数据,支持磁盘热插拔.4. 支持热插拔5. 支持在线数

Linux 服务器配置LVM(逻辑卷管理)

LVM简介 LVM是 Logical Volume Manager(逻辑卷管理)的简写,它是Linux环境下对磁盘分区进行管理的一种机制,LVM是建立在硬盘和 分区之上的一个逻辑层,来提高磁盘分区管理的灵活性.LVM将若干个磁盘分区连接为一个整块的卷组 (volumegroup),形成一个存储池.管理员可以在卷组上随意创建逻辑卷组(logicalvolumes),并进一步在逻辑卷组上创建文件系 统. 与传统的磁盘与分区相比,LVM为计算机提供了更高层次的磁盘存储.它使系统管理员可以更方便的为应用

Centos 6.6配置LVM(逻辑卷管理)

LVM简介 LVM是 Logical Volume Manager(逻辑卷管理)的简写,它是Linux环境下对磁盘分区进行管理的一种机制,LVM是建立在硬盘和 分区之上的一个逻辑层,来提高磁盘分区管理的灵活性.LVM将若干个磁盘分区连接为一个整块的卷组 (volumegroup),形成一个存储池.管理员可以在卷组上随意创建逻辑卷组(logicalvolumes),并进一步在逻辑卷组上创建文件系 统. 与传统的磁盘与分区相比,LVM为计算机提供了更高层次的磁盘存储.它使系统管理员可以更方便的为应用

十三、LVM 逻辑卷管理

http://note.youdao.com/noteshare?id=0252cd5dcf7f2e5f11de5b3672779201&sub=ED011464ADA3467D94242717C8996048 LVM2  逻辑卷管理器第二版,Logical Volume Manager Version 2, dm:device mapper 将一个或多个底层块设备组织成一个逻辑设备的模块. 创建后逻辑卷的路径(lvpath) 原始路径:/dev/dm-# 其链接文件有: 1)/dev/mapp

LVM逻辑卷管理

本次内容 1.什么是LVM 2.为什么使用LVM 3.LVM的操作命令 4.LVM的具体操作实现 一.什么是LVM LVM:Logical Volume Manager,即逻辑卷管理,它是Linux环境下的一种磁盘管理方式,其功能在于能弹性调整文件系统的容量.LVM中有几个专业名词,重点来说以下一个 PV:物理卷 LVM的基本存储逻辑块,但和基本的物理存储介质(如分区.磁盘等)比较,却包含有与LVM相关的管理参数. VG:卷组 由一个或多个PV构成,为上层的逻辑卷提供空间 LV:逻辑卷 类似于磁