进入LEDE shell,输入 fdisk /dev/sda

root@Openwrt:~# fdisk /dev/sda

Welcome to fdisk (util-linux 2.35.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help):   

然后输入n

Partition number (3-127, default 3): ##按回车
First sector (410112-62533262, default 1435648): ##按回车
Last sector, +/-sectors or +/-size{K,M,G,T,P} (1435648-62533262, default 62533262): ##按回车
Created a new partition 3 of type 'Linux filesystem' and of size 29.1 GiB.
Command (m for help): ##输入p查看分区表信息
Disk /dev/sda: 29.84 GiB, 32017047552 bytes, 62533296 sectors
Disk model: Hoodisk SSD     
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 96D19681-874F-790D-BFCB-39DF4B319A00

Device        Start      End  Sectors  Size Type
/dev/sda1       512   410111   409600  200M EFI System
/dev/sda2    410624  1434623  1024000  500M Microsoft basic data
/dev/sda3   1435648 62533262 61097615 29.1G Linux filesystem  ##已成功写入
/dev/sda128      34      511      478  239K BIOS boot
Partition table entries are not in disk order.
Command (m for help): ##输入w回车保持
The partition table has been altered.
Syncing disks.

开始格式化分区,输入mkfs.ext4 /dev/sda3

root@Openwrt:~# mkfs.ext4 /dev/sda3
mke2fs 1.45.6 (20-Mar-2020)
Discarding device blocks: done                            
Creating filesystem with 7637201 4k blocks and 1909440 inodes
Filesystem UUID: 9ffd5fe0-b673-435c-83be-514ef5ab2645
Superblock backups stored on blocks: 
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
    4096000

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done  

进入LEDE Web管理页面, 系统——挂载点——添加

选择启用挂载点——UUID选择刚刚分好的磁盘——挂载点自定义为/mnt/sda3然后保存

然后保存并应用

回到shell,输入df -h即可看到剩余空间已成功挂载

root@Openwrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                42.5M     42.5M         0 100% /rom
tmpfs                     1.8G      4.2M      1.8G   0% /tmp
/dev/loop0              455.5M    148.8M    306.7M  33% /overlay
overlayfs:/overlay      455.5M    148.8M    306.7M  33% /
/dev/sda1               199.8M      5.4M    194.4M   3% /boot
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/sda3                28.6G     44.0M     27.0G   0% /mnt/sda3   ##已成功
Last modification:April 28th, 2020 at 08:46 pm
如果觉得我的文章对你有用,请随意赞赏