iStoreOS x86给根分区扩容,
来体验了吧istoreos , 新系统蛮好的 X86初始的根分区给了2G比以前的LEDE 500M好太多了,但是肯定是不够的,所以自己试了以下方法可以扩容文件系统大小. 原理 parted 修改分区大小,然后resize2fs修改分区所在的文件系统大小.
root@iStoreOS:~# parted
GNU Parted 3.4
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) help
align-check TYPE N check partition N for TYPE(min|opt) alignment
help [COMMAND] print general help, or help on COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition table)
mkpart PART-TYPE [FS-TYPE] START END make a partition
name NUMBER NAME name partition NUMBER as NAME
print [devices|free|list,all|NUMBER] display the partition table, available devices, free space, all found partitions, or a particular partition
quit exit program
rescue START END rescue a lost partition near START and END
resizepart NUMBER END resize partition NUMBER
rm NUMBER delete partition NUMBER
select DEVICE choose the device to edit
disk_set FLAG STATE change the FLAG on selected device
disk_toggle [FLAG] toggle the state of FLAG on selected device
set NUMBER FLAG STATE change the FLAG on partition NUMBER
toggle [NUMBER [FLAG]] toggle the state of FLAG on partition NUMBER
unit UNIT set the default unit to UNIT
version display the version number and copyright information of GNU Parted
(parted) print
Model: ATA WDC WD5000AZLX-7 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags 1 262kB 134MB 134MB primary ext2 boot 2 135MB 403MB 268MB primary 3 403MB 2551MB 2147MB primary ext4
(parted) resizepart
Partition number? 3
Warning: Partition /dev/sda3 is being used. Are you sure you want to continue?
Yes/No? yes
End? [2551MB]? 24GB
(parted) print
Model: ATA WDC WD5000AZLX-7 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags 1 262kB 134MB 134MB primary ext2 boot 2 135MB 403MB 268MB primary 3 403MB 24.0GB 23.6GB primary ext4
(parted) help
align-check TYPE N check partition N for TYPE(min|opt) alignment
help [COMMAND] print general help, or help on COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition table)
mkpart PART-TYPE [FS-TYPE] START END make a partition
name NUMBER NAME name partition NUMBER as NAME
print [devices|free|list,all|NUMBER] display the partition table, available devices, free space, all found partitions, or a particular partition
quit exit program
rescue START END rescue a lost partition near START and END
resizepart NUMBER END resize partition NUMBER
rm NUMBER delete partition NUMBER
select DEVICE choose the device to edit
disk_set FLAG STATE change the FLAG on selected device
disk_toggle [FLAG] toggle the state of FLAG on selected device
set NUMBER FLAG STATE change the FLAG on partition NUMBER
toggle [NUMBER [FLAG]] toggle the state of FLAG on partition NUMBER
unit UNIT set the default unit to UNIT
version display the version number and copyright information of GNU Parted
(parted)
(parted) quit
Information: You may need to update /etc/fstab.
root@iStoreOS:~# fdisk -l
Disk /dev/sda: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: WDC WD5000AZLX-7
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xa894ef3d
Device Boot Start End Sectors Size Id Type /dev/sda1 * 512 262655 262144 128M 83 Linux /dev/sda2 263168 787455 524288 256M 83 Linux /dev/sda3 787968 46875000 46087033 22G 83 Linux root@iStoreOS:~# df -h Filesystem Size Used Available Use% Mounted on /dev/root 126.8M 126.8M 0 100% /rom tmpfs 3.8G 5.6M 3.8G 0% /tmp /dev/sda3 1.9G 37.2M 1.8G 2% /overlay overlayfs:/overlay 1.9G 37.2M 1.8G 2% / tmpfs 4.0M 0 4.0M 0% /mnt /dev/sda1 126.0M 5.1M 118.3M 4% /boot /dev/sda1 126.0M 5.1M 118.3M 4% /boot tmpfs 512.0K 0 512.0K 0% /dev cgroup 3.8G 0 3.8G 0% /sys/fs/cgroup tmpfs 512.0K 0 512.0K 0% /sys/module/md_mod/parameters/new_array /dev/sda3 1.9G 37.2M 1.8G 2% /overlay/upper/opt/docker
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 = 3 The filesystem on /dev/sda3 is now 5760879 (4k) blocks long.
root@iStoreOS:~# df -h Filesystem Size Used Available Use% Mounted on /dev/root 126.8M 126.8M 0 100% /rom tmpfs 3.8G 5.6M 3.8G 0% /tmp /dev/sda3 21.6G 42.1M 21.5G 0% /overlay overlayfs:/overlay 21.6G 42.1M 21.5G 0% / tmpfs 4.0M 0 4.0M 0% /mnt /dev/sda1 126.0M 5.1M 118.3M 4% /boot /dev/sda1 126.0M 5.1M 118.3M 4% /boot tmpfs 512.0K 0 512.0K 0% /dev cgroup 3.8G 0 3.8G 0% /sys/fs/cgroup tmpfs 512.0K 0 512.0K 0% /sys/module/md_mod/parameters/new_array /dev/sda3 21.6G 42.1M 21.5G 0% /overlay/upper/opt/docker