全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 1715|回复: 13

求助,甲骨文怎么扩大引导卷?

[复制链接]
发表于 2023-6-12 19:40:24 | 显示全部楼层 |阅读模式
arm,dd成了debian,然后安装了pve.
硬盘原来是50g,已经在甲骨文后台增加到100g了,但是系统里要怎么扩容呢?

root@instance-20230607:~# fdisk -l
GPT PMBR size mismatch (104857599 != 209715199) will be corrected by write.
The backup GPT table is not on the end of the device.
Disk /dev/sda: 100 GiB, 107374182400 bytes, 209715200 sectors
Disk model: BlockVolume     
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 1048576 bytes
Disklabel type: gpt
Disk identifier: 195A40D8-F9B7-44D4-B7F1

Device         Start       End   Sectors  Size Type
/dev/sda1       2048   1050623   1048576  512M EFI System
/dev/sda2    1050624 102856703 101806080 48.5G Linux filesystem
/dev/sda3  102856704 104855551   1998848  976M Linux swap


root@instance-20230607:~# parted
GNU Parted 3.4
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) select /dev/sda                                                  
Using /dev/sda
(parted) print                                                            
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 104857600 blocks) or continue with
the current setting?
Fix/Ignore? I                                                            
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                 boot, esp
2      538MB   52.7GB  52.1GB  xfs
3      52.7GB  53.7GB  1023MB  linux-swap(v1)        swap

(parted)                       
发表于 2023-6-12 19:46:19 | 显示全部楼层
重新dd个系统  或者  查看硬盘 手动挂载
 楼主| 发表于 2023-6-12 19:46:58 | 显示全部楼层
worryfree 发表于 2023-6-12 19:46
重新dd个系统  或者  查看硬盘 手动挂载

好主意
发表于 2023-6-12 19:47:09 | 显示全部楼层
签名有115空间卡5TB,alist挂载,小鸡鸡秒变大盘鸡,需要的look一下
发表于 2023-6-12 20:30:51 | 显示全部楼层
不懂的就问chatgpt,我就问他帮我扩的
发表于 2023-6-12 20:48:25 | 显示全部楼层
一、先创建分区

fdisk /dev/sda(sda为一整块的硬盘)

#########此时如果出现数据不匹配的时候请安装parted,输入parted -l,然后输入fix(修复)即可#########


然后输入 n(新建分区)

分区号 随便输入(一般默认即可)

起始扇区 (一般默认最小值)

终止扇区, +扇区 or +size{K,M,G} (一般默认最大值)

然后输入  w  (保存修改)






二、添加分区格式

1.先安装parted软件

apt install parted -y
或者
yum install parted -y

2.输入 parted /dev/sda (同理sda也是大硬盘的盘符号)

3.然后  (parted) unit s  (修改显示方式,默认以GB显示,修改后以扇区显示)

4.显示分区表中的当前分区
(parted) print
###请记录记下根分区的"Number、Start、End"和"File system"对应的列值#####

#####如果需要删除现有根分区,请输入 (parted) rm <partition_number> ######

5.重新创建分区:
(parted) mkpart
(然后输入上一步中记录的对应值)

6.退出并保存
(parted) quit
(然后会有提示需要更新一个文件,不用管,保存后立即生效)

7.验证根分区是否已扩展
lsblk






三、挂载分区
1.格式化新建分区
mkfs.ext4 /dev/sda  (以ext4格式进行格式化)

2.新建文件夹
mkdir /data

3.挂载到新建的文件夹下
mount /dev/sda /data

4.设置开机自动挂载
nano /etc/fstab

# 然后在内容结尾处增加一行(注意文件类型要对应):
/dev/sda    /data    ext4    defaults    0 0
发表于 2023-6-12 21:08:45 | 显示全部楼层
其实再dd一次比较快
 楼主| 发表于 2023-6-12 21:10:03 | 显示全部楼层
vps理论研究家 发表于 2023-6-12 20:48
一、先创建分区

fdisk /dev/sda(sda为一整块的硬盘)

你这个是新硬盘分区的操作吧?
发表于 2023-6-12 21:16:42 | 显示全部楼层
问chatgpt比问mjj快的多,尤其是这种基础问题
发表于 2023-6-12 21:17:53 | 显示全部楼层
后台实例编辑,直接可以扩大
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2026-1-21 09:24 , Processed in 0.063715 second(s), 10 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表