esxi报错There is no more space for virtual disk--逻辑卷缩减!

来自 localhost.localdomain 的消息: There is no more space for virtual disk ftp-000001.vmdk. You might be able to continue this session by freeing disk space on the elevant volume, and clicking _Retry. Click Cancel to terminate this session. 

问题:磁盘空间分配不合理。

解决方式,合理分配磁盘空间。磁盘做的逻辑卷,温习一下。

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

温习下逻辑卷:

1、物理卷创建

[[email protected] ~]# vgcreate renzhiyuan_vg /dev/sd[bcd]

  Physical volume "/dev/sdb" successfully created

  Physical volume "/dev/sdc" successfully created

  Physical volume "/dev/sdd" successfully created

  Volume group "renzhiyuan_vg" successfully created

[[email protected] ~]# pvdisplay 

  --- Physical volume ---

  PV Name               /dev/sdb

  VG Name               renzhiyuan_vg

  PV Size               1.00 GiB / not usable 4.00 MiB

  Allocatable           yes 

  PE Size               4.00 MiB

  Total PE              255

  Free PE               255

  Allocated PE          0

  PV UUID               qwEDNa-gBDf-oQXK-Rlqk-j3OS-Zh05-MKJBUZ

   

  --- Physical volume ---

  PV Name               /dev/sdc

  VG Name               renzhiyuan_vg

  PV Size               1.00 GiB / not usable 4.00 MiB

  Allocatable           yes 

  PE Size               4.00 MiB

  Total PE              255

  Free PE               255

  Allocated PE          0

  PV UUID               n1E2Ej-W4jN-5AB5-fewR-j8df-2mZt-zrb05b

   

  --- Physical volume ---

  PV Name               /dev/sdd

  VG Name               renzhiyuan_vg

  PV Size               1.00 GiB / not usable 4.00 MiB

  Allocatable           yes 

  PE Size               4.00 MiB

  Total PE              255

  Free PE               255

  Allocated PE          0

  PV UUID               GkCwJI-B7Eo-tqD2-lR95-MDh9-qeGq-szacD4

   

  --- Physical volume ---

  PV Name               /dev/sda2

  VG Name               vg_node6

  PV Size               19.51 GiB / not usable 3.00 MiB

  Allocatable           yes (but full)

  PE Size               4.00 MiB

  Total PE              4994

  Free PE               0

  Allocated PE          4994

  PV UUID               jg3eKt-8cF0-JvMa-xyge-WBW4-kzOc-6iKXa6

   

[[email protected] ~]#

#[[email protected] ~]# pv

pvchange   pvck       pvcreate   pvdisplay  pvmove     pvremove   pvresize   pvs        pvscan     

[[email protected] ~]# pv

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2、卷组创建

[[email protected] ~]# vgcreate renzhiyuan_vg /dev/sd[bcd]

  A volume group called renzhiyuan_vg already exists.

[[email protected] ~]# vgdisplay 

  --- Volume group ---

  VG Name               renzhiyuan_vg

  System ID             

  Format                lvm2

  Metadata Areas        3

  Metadata Sequence No  1

  VG Access             read/write

  VG Status             resizable

  MAX LV                0

  Cur LV                0

  Open LV               0

  Max PV                0

  Cur PV                3

  Act PV                3

  VG Size               2.99 GiB

  PE Size               4.00 MiB

  Total PE              765

  Alloc PE / Size       0 / 0   

  Free  PE / Size       765 / 2.99 GiB

  VG UUID               yEw1o5-XuUF-zk1Z-Jiu4-1kpo-Tsy2-Ca3d2n

   

  --- Volume group ---

  VG Name               vg_node6

  System ID             

  Format                lvm2

  Metadata Areas        1

  Metadata Sequence No  3

  VG Access             read/write

  VG Status             resizable

  MAX LV                0

  Cur LV                2

  Open LV               2

  Max PV                0

  Cur PV                1

  Act PV                1

  VG Size               19.51 GiB

  PE Size               4.00 MiB

  Total PE              4994

  Alloc PE / Size       4994 / 19.51 GiB

  Free  PE / Size       0 / 0   

  VG UUID               Mbyeih-93jl-ejwH-TV44-Pq2O-vady-QXKfz7

   

[[email protected] ~]#

[[email protected] ~]# vg

vgcfgbackup    vgck           vgdisplay      vgimport       vgmknodes      vgrename       vgsplit        

vgcfgrestore   vgconvert      vgexport       vgimportclone  vgreduce       vgs            

vgchange       vgcreate       vgextend       vgmerge        vgremove       vgscan         

[[email protected] ~]# vg

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

3、逻辑卷创建

[[email protected] ~]# lvcreate -L 2G -n renzhiyuan_lv renzhiyuan_vg

  Logical volume "renzhiyuan_lv" created

[[email protected] ~]# lvdisplay 

  --- Logical volume ---

  LV Path                /dev/renzhiyuan_vg/renzhiyuan_lv

  LV Name                renzhiyuan_lv

  VG Name                renzhiyuan_vg

  LV UUID                nW3HXj-CwOI-8lVo-B3Zo-nVKd-fNa6-1tUy3m

  LV Write Access        read/write

  LV Creation host, time node6, 2016-08-26 09:33:50 +0800

  LV Status              available

  # open                 0

  LV Size                2.00 GiB

  Current LE             512

  Segments               3

  Allocation             inherit

  Read ahead sectors     auto

  - currently set to     256

  Block device           253:2

   

  --- Logical volume ---

  LV Path                /dev/vg_node6/lv_root

  LV Name                lv_root

  VG Name                vg_node6

  LV UUID                Jgu4Y4-ZT8T-ooW6-riiH-Xt4y-Jq30-d5qyvL

  LV Write Access        read/write

  LV Creation host, time node6, 2016-04-28 09:13:33 +0800

  LV Status              available

  # open                 1

  LV Size                17.57 GiB

  Current LE             4498

  Segments               1

  Allocation             inherit

  Read ahead sectors     auto

  - currently set to     256

  Block device           253:0

   

  --- Logical volume ---

  LV Path                /dev/vg_node6/lv_swap

  LV Name                lv_swap

  VG Name                vg_node6

  LV UUID                waK7aN-5CLw-Mkkw-l1o1-BXny-q71j-vPLV5I

  LV Write Access        read/write

  LV Creation host, time node6, 2016-04-28 09:13:36 +0800

  LV Status              available

  # open                 1

  LV Size                1.94 GiB

  Current LE             496

  Segments               1

  Allocation             inherit

  Read ahead sectors     auto

  - currently set to     256

  Block device           253:1

   

[[email protected] ~]#

[[email protected] ~]# lv

lvchange     lvdisplay    lvmchange    lvmdump      lvmsar       lvrename     lvscan       

lvconvert    lvextend     lvmconf      lvmetad      lvreduce     lvresize     

lvcreate     lvm          lvmdiskscan  lvmsadc      lvremove     lvs          

[[email protected] ~]# lv

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

4、格式化逻辑卷

[[email protected] ~]# mkfs.ext4 /dev/renzhiyuan_vg/renzhiyuan_lv 

mke2fs 1.41.12 (17-May-2010)

文件系统标签=

操作系统:Linux

块大小=4096 (log=2)

分块大小=4096 (log=2)

Stride=0 blocks, Stripe width=0 blocks

131072 inodes, 524288 blocks

26214 blocks (5.00%) reserved for the super user

第一个数据块=0

Maximum filesystem blocks=536870912

16 block groups

32768 blocks per group, 32768 fragments per group

8192 inodes per group

Superblock backups stored on blocks: 

32768, 98304, 163840, 229376, 294912

正在写入inode表: 完成                            

Creating journal (16384 blocks): 完成

Writing superblocks and filesystem accounting information: 完成

This filesystem will be automatically checked every 36 mounts or

180 days, whichever comes first.  Use tune2fs -c or -i to override.

[[email protected] ~]#


5、挂载逻辑卷

[[email protected] ~]# mount /dev/renzhiyuan_vg/renzhiyuan_lv /opt/renzhiyuan/

[[email protected] ~]# df -TH

Filesystem           Type   Size  Used Avail Use% Mounted on

/dev/mapper/vg_node6-lv_root

                     ext4    19G  1.2G   17G   7% /

tmpfs                tmpfs  515M     0  515M   0% /dev/shm

/dev/sda1            ext4   500M   27M  448M   6% /boot

/dev/mapper/renzhiyuan_vg-renzhiyuan_lv

                     ext4   2.1G  3.2M  2.0G   1% /opt/renzhiyuan

[[email protected] ~]#

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

6、缩减逻辑卷


6.1)卸载

[[email protected] ~]# umount  /opt/renzhiyuan/

[[email protected] ~]# df -TH

Filesystem           Type   Size  Used Avail Use% Mounted on

/dev/mapper/vg_node6-lv_root

                     ext4    19G  1.2G   17G   7% /

tmpfs                tmpfs  515M     0  515M   0% /dev/shm

/dev/sda1            ext4   500M   27M  448M   6% /boot

[[email protected] ~]#

6.2)强制对文件系统进行检查

[[email protected] ~]# e2fsck -f /dev/renzhiyuan_vg/renzhiyuan_lv 

e2fsck 1.41.12 (17-May-2010)

第一步: 检查inode,块,和大小

第二步: 检查目录结构

第3步: 检查目录连接性

Pass 4: Checking reference counts

第5步: 检查簇概要信息

/dev/renzhiyuan_vg/renzhiyuan_lv: 11/131072 files (0.0% non-contiguous), 25388/524288 blocks

[[email protected] ~]#

6.3)对文件系统进行缩减

[[email protected] ~]# resize2fs /dev/renzhiyuan_vg/renzhiyuan_lv 1G

resize2fs 1.41.12 (17-May-2010)

Resizing the filesystem on /dev/renzhiyuan_vg/renzhiyuan_lv to 262144 (4k) blocks.

The filesystem on /dev/renzhiyuan_vg/renzhiyuan_lv is now 262144 blocks long.

[[email protected] ~]#


6.4)对逻辑卷进行缩减

[[email protected] ~]# lvreduce -L 1G /dev/renzhiyuan_vg/renzhiyuan_lv 

  WARNING: Reducing active logical volume to 1.00 GiB

  THIS MAY DESTROY YOUR DATA (filesystem etc.)

Do you really want to reduce renzhiyuan_lv? [y/n]: y

  Size of logical volume renzhiyuan_vg/renzhiyuan_lv changed from 2.00 GiB (512 extents) to 1.00 GiB (256 extents).

  Logical volume renzhiyuan_lv successfully resized

[[email protected] ~]#

[[email protected] ~]# lvdisplay 

  --- Logical volume ---

  LV Path                /dev/renzhiyuan_vg/renzhiyuan_lv

  LV Name                renzhiyuan_lv

  VG Name                renzhiyuan_vg

  LV UUID                nW3HXj-CwOI-8lVo-B3Zo-nVKd-fNa6-1tUy3m

  LV Write Access        read/write

  LV Creation host, time node6, 2016-08-26 09:33:50 +0800

  LV Status              available

  # open                 0

  LV Size                1.00 GiB

  Current LE             256

  Segments               2

  Allocation             inherit

  Read ahead sectors     auto

  - currently set to     256

  Block device           253:2


6.5)挂载验证

[[email protected] ~]# mount /dev/renzhiyuan_vg/renzhiyuan_lv  /opt/renzhiyuan/

[[email protected] ~]# df -TH

Filesystem           Type   Size  Used Avail Use% Mounted on

/dev/mapper/vg_node6-lv_root

                     ext4    19G  1.2G   17G   7% /

tmpfs                tmpfs  515M     0  515M   0% /dev/shm

/dev/sda1            ext4   500M   27M  448M   6% /boot

/dev/mapper/renzhiyuan_vg-renzhiyuan_lv

                     ext4   990M  2.7M  934M   1% /opt/renzhiyuan

[[email protected] ~]#


完成!

时间: 2024-11-09 17:20:39

esxi报错There is no more space for virtual disk--逻辑卷缩减!的相关文章

vSphere Client 虚拟机报错:There is no more space for virtual disk

故障描述: 开发人员说192.168.xxx.216连接不上了,ping不通. 因为这个是物理机虚拟出来的linux虚拟机,通过vsphere client登录,发现操作界面报错如下: There is no more space for virtual disk 192.168.xxx.216 you might be able to continue this session by freeing disk space on the relevant volume,and clicking

8.5 sikuli 集成进eclipse 报错:can't be found on the disk

运行提示can't be found on the disk 如图..代码中的文件路径(不注明应该就是直接在test文件夹下)和实际放图片的路径不一致(test\src\img). 指定路径 String imgpath = ".\\src\\img\";    //相对路径 // String  imgpath="D:\workspace\test\src\img";   //绝对路径 s.find(imgpath+"txt.png"); ..

使用Oracle SQL Developer报错:Unable to find a Java Virtual Machine

1.环境 win7 x64,oracle 11g r2,jdk6 x64 2.问题 第一次启动Oracle SQL Developer的时候会让我们填写java.exe的路径,我在jdk安装目录下的bin中找到了java.exe,但是填写以后报如下错误: 3.原因 oracle 11g中安装的Oracle SQL Developer是32位的,而我们现在给他指定的java.exe却是64位的,所以会出现这种错误. 4.解决方法 1)从网上下载Oracle SQL Developer x64,然后

解决Eclipse启动报错【Failed to create the Java Virtual Machine】

电脑:2G内存,WIN7 32位. 启动adt-bundle-windows-x86-20140702\eclipse\eclipse.exe时,报错[Failed to create the Java Virtual Machine].点确定后,Eclipse自动关闭 解决方法如下: 修改Eclipse目录下的配置文件[eclipse.iniadt-bundle-windows-x86-20140702\eclipse\eclipse.ini] 将下面两个值改为原来的0.5倍,然后保存,重新启

Tomcat启动报错 Could not reserve enough space for object heap

报错信息: Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine. 解决方法: 在catalina.bat中增加如下设置 set JAVA_OPTS=-server -XX:MaxHeapSize=256m -Xms512m -Xmx512m

Oracle SQL Developer报错:Unable to find a Java Virtual Machine解决办法

安装了64位的Oracle数据库以及32位的Oracle客户端,在开始菜单中第一次打开客户端的SQL Developer时提示输入java.exe的路径,我选择了Oracle数据库自带的jdk路径,确定之后报错: 百度查找解决办法,原因是64位的Oracle数据库中自带的jdk也是64位的,但安装的Oracle客户端是32位的,所以不兼容. 解决办法一般有两种做法: 1)从网上下载Oracle SQL Developer x64(http://www.oracle.com/technetwork

启动tomcat报错 Could not reserve enough space for object heap的解决办法

问题:打开eclips启动tomcat发现报出Could not reserve enough space for object heap错误. 解决办法:1.首先检查tomcat是否能正常启动.remove掉tomcat里所有的项目启动.如果仍然有错就说明是tomcat有问题.删除tomcat 重新部署一个,即可解决.    2.如果启动tomcat没错,项目添加后有问题,就是jvm 溢出  内存不够.就要进行修改jvm内存启动即可.

Eclipse中启动tomcat报错java.lang.OutOfMemoryError: PermGen space的解决方法

首先需要双击tomcat server,如下图所示: 双击上图后会出现,tomcat配置的界面: 然后再点击上图的,红色矩形框的链接,会弹出tomcat参数配置的节面,要选择Arguments参数框: 如上图在VM arguments文本框内设置 -XX:MaxPermSize=256m的值即可, 当然此处还可以添加其他jvm参数,比如最大内存,最小内存等.

Oracle11g x64使用Oracle SQL Developer报错:Unable to find a Java Virtual Machine

原因oracle 11g中安装的Oracle SQL Developer是32位的,而我们现在给他指定的java.exe却是64位的,所以会出现这种错误.解决方法1)从网上下载Oracle SQL Developer x64,然后替换原目录:D:\app\oracle\product\11.1.0\db_1\sqldeveloper下的32位的Oracle SQL Developer.这样重新启动Oracle SQL Developer 并制定java.exe的路径就可以了.2)安装JDK6 x