ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

Linux_CentOS8_磁盘管理_磁盘大小调整_`No space left on device` (2)

2021-03-17 14:57:07  阅读:276  来源: 互联网

标签:extend No partition logical volume new press 磁盘 left


Issue : CentOS8 in the VMware: No space left on device
1. Issue Description :

Initially, 20G Hard Disk(SCSI) was portioned to the CentOS8 in the virtual machine. For disk room occupied by the genome index file , genome reference ,rawdata and so on, and larger room would be required in the downstream analysis, so the disk resize would be rather necessary.

2. Solutions :

extend the logical volume :

NOTE : backup of the virtual machine through snapshots or commands (e.g. cp )

    1. identify the device and confirm the size : fdisk -l :

    2. create a new primary partition :

      • (1) operate on the new device :fdisk /dev/sd[a-p]

      • (2) print the partition table : press p

      • (3) create a new primary partition: press n

      • (4) primary type : press p

      • (5) partition number , depending on the output of the partition table print. :

      • (6) change system’s partition ID : t

      • (7) select the newly creation partition :

      • (8) change the Hex Code of the partition for Linux LVM : type 8e

      • (9) write the change to the partition table : press w

    1. reboot the system CentOS8

    2. verify the changes has been written into the partition table and the type of the new partition is 8e : fdisk -l

    3. convert the new partition to a physical volume : pvcreate /dev/sd*

    4. extend the physical volume :

      • (1) df : show information about the file system , identify the high used , low available and Mountpoint
      • (2) vgdisplay: to check the volume group
      • (3) extend physical volume : vgextend VolumeGroup /dev/sd*
    5. verify how many physical extents are available to the VolumeGroup : vgdisplay VolumeGroup | grep "Free"

    6. extend the logical volume :

      lvdisplay : to determine which logical volume to extend

      lvextend -L+*G /dev/VolumeGroup/LogicalVolume :

    7. expand the ext3 filesystem online , inside of logical volume :

      xfs_growfs dir : dir is the volume group mountpoint

    8. verify that the dir file system has the new space available :

      df -h dir

    ----
    
    reference :  
    
    [1.Extending a logical volume in a virtual machine running Red Hat or Cent OS ](https://kb.vmware.com/s/article/1006371?lang=en_us)
    
    2.[CentOS Manual Partitioning](https://docs.centos.org/en-US/centos/install-guide/CustomSpoke-x86/)
    

标签:extend,No,partition,logical,volume,new,press,磁盘,left
来源: https://blog.csdn.net/weixin_38872771/article/details/114930415

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有