首页 > 其他分享 >阿里云ECS磁盘扩容

阿里云ECS磁盘扩容

时间:2023-03-28 14:37:38浏览次数:35  
标签:centos dev LV 2.9 阿里 ECS 磁盘 root 19c

环境:
OS:Centos 7

 

1.控制台添加云盘

 

2.创建pv
pvcreate /dev/sdc

 

3.扩充VG

[root@19c ~]# vgs
  VG     #PV #LV #SN Attr   VSize  VFree
  centos   2   2   0 wz--n- 42.99g    0 

[root@19c ~]# vgextend centos /dev/sdc
  Volume group "centos" successfully extended

 

4.扩充LV

[root@19c ~]# lvdisplay
  --- Logical volume ---
  LV Path                /dev/centos/swap
  LV Name                swap
  VG Name                centos
  LV UUID                1s5Iwx-Zr4D-H6Xa-z8wu-VVIC-F7EJ-VkIrxh
  LV Write Access        read/write
  LV Creation host, time 19c, 2023-02-13 02:18:05 -0500
  LV Status              available
  # open                 2
  LV Size                4.00 GiB
  Current LE             1024
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:1
   
  --- Logical volume ---
  LV Path                /dev/centos/root
  LV Name                root
  VG Name                centos
  LV UUID                AQS4Y1-D6Pn-pGmL-0JUb-KCs5-w8dk-WEulby
  LV Write Access        read/write
  LV Creation host, time 19c, 2023-02-13 02:18:06 -0500
  LV Status              available
  # open                 1
  LV Size                38.99 GiB
  Current LE             9982
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:0
   


[root@19c ~]# lvresize -l +100%FREE /dev/centos/root
  Size of logical volume centos/root changed from 38.99 GiB (9982 extents) to <42.99 GiB (11005 extents).
  Logical volume centos/root successfully resized.

 

5.扩充文件系统

[root@19c ~]# df -h
Filesystem               Size  Used Avail Use% Mounted on
devtmpfs                 2.9G     0  2.9G   0% /dev
tmpfs                    2.9G     0  2.9G   0% /dev/shm
tmpfs                    2.9G  9.0M  2.9G   1% /run
tmpfs                    2.9G     0  2.9G   0% /sys/fs/cgroup
/dev/mapper/centos-root   39G   28G   12G  70% /
/dev/sda1               1014M  161M  854M  16% /boot
tmpfs                    581M     0  581M   0% /run/user/0

[root@19c ~]# xfs_growfs /
meta-data=/dev/mapper/centos-root isize=512    agcount=5, agsize=2293504 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0 spinodes=0
data     =                       bsize=4096   blocks=10221568, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal               bsize=4096   blocks=4479, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data blocks changed from 10221568 to 11269120

 

标签:centos,dev,LV,2.9,阿里,ECS,磁盘,root,19c
From: https://www.cnblogs.com/hxlasky/p/17265020.html

相关文章

  • Android 阿里无线认证(扫脸)SDK集成问题
    今天早上集成了一下阿里的无线认证(扫脸)SDK,地址:https://help.aliyun.com/document_detail/57930.html?spm=a2c4g.11186623.6.574.73475b6aJg9NTH然后我发现了官方文档有......
  • Android 阿里云推送,针对安卓8.0、9.0以上系统收不到推送 的补丁文档
    官方的文档地址:Android8.0以上:https://help.aliyun.com/knowledge_detail/67398.htmlAndroid9.0以上:https://help.aliyun.com/knowledge_detail/141757.html......
  • Windows系统服务器如何磁盘挂载
       桌面远程登录服务器后,服务器桌面上只有一个回收站的,我们在桌面空白处右键属性-->桌面-->自定义桌面-->然后把我的电脑前面的框框勾上,再然后点应用、确定,ok回到桌面我......
  • 天池竞赛-阿里云注册
    1. 阿里云注册2.windows下安装docker和及ubuntu 3.学习视频......
  • python3实现阿里云短信发送功能
    #-*-coding:utf-8-*-importuuidimportsysimportjsonimportuuidfromaliyunsdkcore.clientimportAcsClientfromaliyunsdkcore.profileimportregion_pr......
  • Python实例讲解 -- 磁盘文件的操作
    在文件夹里有六十多个RM格式的视频文件,我现在需要把它们的文件名都提取出来,并去掉文件的扩展名,以便放到需要的网页里。 应该有什么软件可以完成这个简单的要求,可是一时间到......
  • 阿里巴巴为什么建议使用BigDecimal进行浮点数运算
    本文先引入一个例子,星期天你和女朋友去逛街,看到一家奶茶店。女朋友想喝奶茶了,你就去买了杯奶茶,然后你问了一下价格。店员说奶茶0.9元一杯。然后你给了1元钱。这个时候你忽......
  • 华为云ECS/HECS:中小企业上云第一步
    华为云ECS/HECS:中小企业上云第一步1.上云是目前中小企业最火热的话题博主目前担任中型企业架构师,在与客户的沟通过程中,”你们公司上云了吗“是谈及最多的话题,在客户的眼里,上......
  • 用DiskGenius打开虚拟机磁盘文件vmdk的方法
    如何用DiskGenius打开虚拟机磁盘文件vmdk当然此方法也适合虚拟机无法正常启动,但虚拟机里重要文件时可以用此方法将文件复制出来.1、启动DiskGenius分区工具,根据图上点击......
  • Windwos 磁盘设置图标
    新建一个inf配置文件并命名为autorun.autorun.inf在文件内添加信息[autorun]ICON=logo.ico,0logo.ico表示u盘内的图标,也可以在文件夹内定义如ICON=.\ico\logo.ic......