LVM在线增加LV的大小
2014-04-29 13:41
399 查看
[root@cacti ~]# lvcreate -L 2G -n lvtest vg01 //创建一个2G大小lvtest逻辑卷隶属于vg01卷组
/dev/hdc: open failed: No medium found
Logical volume "lvtest" created
[root@cacti ~]# mkfs.ext3 /dev/vg01/lvtest //格式化lvtest逻辑卷
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
262144 inodes, 524288 blocks
26214 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=536870912
16 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 22 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@cacti ~]# mount /dev/vg01/lvtest /mnt //挂在逻辑卷lvtest到/mnt目录下
[root@cacti ~]# df -h //查看逻辑卷的大小为2G
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 8.7G 2.7G 5.5G 33% /
/dev/hda1 99M 19M 76M 20% /boot
tmpfs 440M 0 440M 0% /dev/shm
none 440M 104K 440M 1% /var/lib/xenstored
/dev/mapper/vg01-lvtest
2.0G 68M 1.9G 4% /mnt //lvtest大小为2g
[root@cacti ~]# ls /mnt //拷贝东西到/mnt目录下。
lost+found openssl-0.9.8e.tar.gz
[root@cacti ~]# lvextend -L +2G /dev/vg01/lvtest //扩展lvtest大小加2个G。
/dev/hdc: open failed: No medium found
Extending logical volume lvtest to 4.00 GB
Logical volume lvtest successfully resized
[root@cacti ~]# resize2fs -f /dev/vg01/lvtest //在线生效lvtest
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/vg01/lvtest is mounted on /mnt; on-line resizing required
Performing an on-line resize of /dev/vg01/lvtest to 1048576 (4k) blocks.
The filesystem on /dev/vg01/lvtest is now 1048576 blocks long.
[root@cacti ~]# df -h //查看lvtest的大小
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 8.7G 2.7G 5.5G 33% /
/dev/hda1 99M 19M 76M 20% /boot
tmpfs 440M 0 440M 0% /dev/shm
none 440M 104K 440M 1% /var/lib/xenstored
/dev/mapper/vg01-lvtest
4.0G 72M 3.7G 2% /mnt //lvtest逻辑卷已经成功增大到4g.
[root@cacti ~]# ls /mnt //查看/mnt内容还在。
lost+found openssl-0.9.8e.tar.gz
本文出自 “有志者事竟成!” 博客,请务必保留此出处http://zh888.blog.51cto.com/1684752/1404523
/dev/hdc: open failed: No medium found
Logical volume "lvtest" created
[root@cacti ~]# mkfs.ext3 /dev/vg01/lvtest //格式化lvtest逻辑卷
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
262144 inodes, 524288 blocks
26214 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=536870912
16 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 22 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@cacti ~]# mount /dev/vg01/lvtest /mnt //挂在逻辑卷lvtest到/mnt目录下
[root@cacti ~]# df -h //查看逻辑卷的大小为2G
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 8.7G 2.7G 5.5G 33% /
/dev/hda1 99M 19M 76M 20% /boot
tmpfs 440M 0 440M 0% /dev/shm
none 440M 104K 440M 1% /var/lib/xenstored
/dev/mapper/vg01-lvtest
2.0G 68M 1.9G 4% /mnt //lvtest大小为2g
[root@cacti ~]# ls /mnt //拷贝东西到/mnt目录下。
lost+found openssl-0.9.8e.tar.gz
[root@cacti ~]# lvextend -L +2G /dev/vg01/lvtest //扩展lvtest大小加2个G。
/dev/hdc: open failed: No medium found
Extending logical volume lvtest to 4.00 GB
Logical volume lvtest successfully resized
[root@cacti ~]# resize2fs -f /dev/vg01/lvtest //在线生效lvtest
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/vg01/lvtest is mounted on /mnt; on-line resizing required
Performing an on-line resize of /dev/vg01/lvtest to 1048576 (4k) blocks.
The filesystem on /dev/vg01/lvtest is now 1048576 blocks long.
[root@cacti ~]# df -h //查看lvtest的大小
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 8.7G 2.7G 5.5G 33% /
/dev/hda1 99M 19M 76M 20% /boot
tmpfs 440M 0 440M 0% /dev/shm
none 440M 104K 440M 1% /var/lib/xenstored
/dev/mapper/vg01-lvtest
4.0G 72M 3.7G 2% /mnt //lvtest逻辑卷已经成功增大到4g.
[root@cacti ~]# ls /mnt //查看/mnt内容还在。
lost+found openssl-0.9.8e.tar.gz
本文出自 “有志者事竟成!” 博客,请务必保留此出处http://zh888.blog.51cto.com/1684752/1404523
相关文章推荐
- AIX环境通过增加lv大小来增加ASM diskgroup 大小----非常规方法
- Linux的lvm管理:修改LV大小
- LVM删除、合并LV,resize2fs调整文件系统大小
- 深度分析lvm和VG(卷组)以及pv(物理卷)和lv(逻辑卷)的关系 详解如何增加磁盘容量 2
- 利用LVM增加根分区大小
- AIX环境通过增加lv大小来增加ASM diskgroup 大小----非常规方法
- 利用LVM增加根分区大小
- LVM在线扩展linux文件系统磁盘大小
- LVM使用之一-从实际需要出发,缩小LV大小
- Linux的lvm管理:修改LV大小
- 问题:LVM lvextend增加空间后,df查看还是原来空间
- 增加LV swap分区大小
- Linux的lvm管理:修改LV大小
- lvm在线调整lv的容量
- VMware esxi在线增加Linux LVM硬盘不需重新启动
- Linux LVM系列(五)lv xfs文件系统在线扩容
- Redhat Linux5.3 32bit操作系统LVM学习笔记之二(在线调整镜像卷大小)
- centos7增加一块硬盘在线扩容lvm(生产环境)
- 使用LVM功具增加文件系统对应的逻辑卷大小
- gparted在线扩分区大小