折腾OpenWrt (istoreos)系统软件包如何扩容
标签搜索

折腾OpenWrt (istoreos)系统软件包如何扩容

丶曲終人散ゞ
2024-04-24 / 0 评论 / 77 阅读 / 正在检测是否收录...
# 执行parted
root@iStoreOS:~# parted
# 执行print命令,查看当前分区情况
(parted) print                                                            
Model: QEMU QEMU HARDDISK (scsi)
Disk /dev/sda: 131GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                  Flags
128     17.4kB  262kB   245kB                                      bios_grub
 1      262kB   134MB   134MB   fat16        EFI System Partition  boot, esp
 2      135MB   403MB   268MB                                      msftdata
 3      403MB   2551MB  2147MB  ext4                               msftdata

# 这里对分区3进行扩容,完成后退出
(parted) resizepart                                                       
Partition number? 3                                                       
Warning: Partition /dev/sda3 is being used. Are you sure you want to continue?
Yes/No? yes                                                               
End?  [2551MB]? 122.4G 
(parted) quit                                                             
Information: You may need to update /etc/fstab.

# 执行resize2fs对文件系统进行扩容
root@iStoreOS:~# resize2fs -p /dev/sda3
resize2fs 1.45.6 (20-Mar-2020)
Filesystem at /dev/sda3 is mounted on /overlay; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 15
The filesystem on /dev/sda3 is now 29784316 (4k) blocks long.

# 执行df -h可以看到分区大小已经更新
root@iStoreOS:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/sda3               111.8G    285.4M    111.5G   0% /overlay
0

评论 (0)

取消