- 论坛徽章:
- 0
|
本帖最后由 ziluopao 于 2017-03-27 09:12 编辑
大家知道一般扩容磁盘用的几乎全是Lvm方式,但是这种方式似乎有很多缺陷!比如下面的操作是我把一个新加的物理卷加入了一个卷组vg_centos中了,我是先vgextend vg_centos /dev/sdb然后lvextend -L +7G /dev/vg_centos/lv_root,而这个卷组的挂载点是 / 根分区,当然加进去很容易的,但是我发现向要退出来就不行。比如此时我想把加进的物理卷删掉,按说要先umount / 这个根,可是提示总是说在忙,我一想也是根目录下有很多应该程序,肯定忙啊,但真要是这样,那看来linux中增加到根分区的物理卷进去容易,出来就是不可能的了。看来这真是LVM设计者当时没有想到的事,一个bug
[root@centos ~]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vg_centos-lv_root
ext4 14G 755M 13G 6% /
tmpfs tmpfs 491M 0 491M 0% /dev/shm
/dev/sda1 ext4 477M 28M 425M 7% /boot
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
下面删除物理卷时的提示
[root@centos ~]# pvremove /dev/sdb1
WARNING: PV /dev/sdb1 belongs to Volume Group vg_centos (consider using vgreduce).
/dev/sdb1: physical volume label not removed.
(If you are certain you need pvremove, then confirm by using --force twice.)
[root@centos ~]#
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
下面的是卸载 / 根分区挂载点的提示
[root@centos ~]# umount /
umount: /: device is busy.
(In some cases useful info about processes that use
the device is found by lsof( 8 ) or fuser(1))
[root@centos ~]#
|
|