甲骨文扩容Oracle VPS安装CentOS 100G硬盘只显示39G

甲骨文扩容Oracle VPS安装CentOS 100G硬盘只显示39G

岳小威子
2023-04-01 / 58 个字 / 0 评论 / 91 阅读 / 加载耗时:36ms / 正在检测是否收录...
温馨提示:
本文最后更新于2023年04月01日,已超过640天没有更新,若内容或图片失效,请留言反馈。

甲骨文创建完VPS后,本来设定的硬盘是100G,结果安装完宝塔以后,只显示39G,然后从网上找到教程,按教程操作后,即可显示正常。

命令顺序

[root@sssss ~]# parted -l
Error: The backup GPT table is not at the end of the disk, as it should be.
This might mean that another operating system believes the disk is smaller.
Fix, by moving the backup to the end (and removing the old backup)?
Fix/Ignore/Cancel? fix
Warning: Not all of the space available to /dev/sda appears to be used, you can fix the GPT to use all of the space (an extra 112037888
blocks) or continue with the current setting? 
Fix/Ignore? fix                                                           
Model: ORACLE BlockVolume (scsi)
Disk /dev/sda: 107GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name                  Flags
 1      1049kB  538MB   537MB   fat16           EFI System Partition  boot
 2      538MB   9128MB  8590MB  linux-swap(v1)
 3      9128MB  50.0GB  40.9GB  xfs


[root@sssss ~]# fdisk /dev/sda
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p

Disk /dev/sda: 107.4 GB, 107374182400 bytes, 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 1048576 bytes
Disk label type: gpt
Disk identifier: 93417F67-B879-4BB1-BFD6-5503F0468687


#         Start          End    Size  Type            Name
 1         2048      1050623    512M  EFI System      EFI System Partition
 2      1050624     17827839      8G  Linux swap      
 3     17827840     97675263   38.1G  Microsoft basic 

Command (m for help): d
Partition number (1-3, default 3): 
Partition 3 is deleted

Command (m for help): n
Partition number (3-128, default 3): 
First sector (34-209715166, default 17827840): 
Last sector, +sectors or +size{K,M,G,T,P} (17827840-209715166, default 209715166): 
Created partition 3


Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.

[root@instance-20230329-2326 ~]# partprobe
[root@instance-20230329-2326 ~]# xfs_growfs /
meta-data=/dev/sda3              isize=512    agcount=4, agsize=2495232 blks
         =                       sectsz=4096  attr=2, projid32bit=1
         =                       crc=1        finobt=0 spinodes=0
data     =                       bsize=4096   blocks=9980928, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal               bsize=4096   blocks=4873, version=2
         =                       sectsz=4096  sunit=1 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data blocks changed from 9980928 to 23985915
[root@instance-20230329-2326 ~]# lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0  100G  0 disk 
├─sda1   8:1    0  512M  0 part /boot/efi
├─sda2   8:2    0    8G  0 part [SWAP]
└─sda3   8:3    0 91.5G  0 part /

文章到这里就结束了

您在本文章已经停留了大概
喜欢的话就点个赞吧!或着请我喝个冰可乐,我就太感谢你了!


1
打赏
拜谢打赏(☆ω☆)

感谢老板,老板大气。。

评论 (0)

取消