OpenWrt 23.05 安装之后默认空间小 磁盘扩容 教程 软路由实测 系列六

本文主要是介绍OpenWrt 23.05 安装之后默认空间小 磁盘扩容 教程 软路由实测 系列六,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

1 安装fdisk

opkg update
opkg install fdisk
#查看磁盘
root@OpenWrt:~# fdisk -l
GPT PMBR size mismatch (246303 != 250069679) will be corrected by write.
The backup GPT table is not on the end of the device.
Disk /dev/sda: 119.24 GiB, 128035676160 bytes, 250069680 sectors
Disk model: ASUS-S-128G1BYB0
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: 7117DB1B-5559-E8FA-6528-E16757565D00Device      Start    End Sectors  Size Type
/dev/sda1     512  33279   32768   16M Linux filesystem
/dev/sda2   33280 246271  212992  104M Linux filesystem
/dev/sda128    34    511     478  239K BIOS bootPartition table entries are not in disk order.

2 安装parted

opkg install parted
#修复
root@OpenWrt:~# parted -l
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 249823375 blocks) or continue with
the current setting? 
Fix/Ignore? fix                                                           
Model: ATA ASUS-S-128G1BYB0 (scsi)
Disk /dev/sda: 128GB
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_grub1      262kB   17.0MB  16.8MB  fat16              legacy_boot2      17.0MB  126MB   109MB   ext2
#查看磁盘
root@OpenWrt:~# parted -l
Model: ATA ASUS-S-128G1BYB0 (scsi)
Disk /dev/sda: 128GB
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_grub1      262kB   17.0MB  16.8MB  fat16              legacy_boot2      17.0MB  126MB   109MB   ext2

3 安装cfdisk ,分配剩余磁盘空间

opkg  update
opkg install cfdisk
#开始分区,未分配的磁盘空间
cfdisk /dev/sda

 

# 选择NEW --.输入空间大小

 

 

 4 分区查看格式

root@OpenWrt:~# fdisk -l
Disk /dev/sda: 119.24 GiB, 128035676160 bytes, 250069680 sectors
Disk model: ASUS-S-128G1BYB0
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: 7117DB1B-5559-E8FA-6528-E16757565D00Device       Start       End   Sectors   Size Type
/dev/sda1      512     33279     32768    16M Linux filesystem
/dev/sda2    33280    246271    212992   104M Linux filesystem
/dev/sda3   247808 250068991 249821184 119.1G Linux filesystem
/dev/sda128     34       511       478   239K BIOS bootPartition table entries are not in disk order.
root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root               102.3M     57.1M     43.1M  57% /
tmpfs                     3.8G     11.5M      3.8G   0% /tmp
/dev/sda1                16.0M      6.1M      9.8M  38% /boot
/dev/sda1                16.0M      6.1M      9.8M  38% /boot
tmpfs                   512.0K         0    512.0K   0% /dev
#新分区格式化
root@OpenWrt:~# mkfs.ext4 /dev/sda3
mke2fs 1.47.0 (5-Feb-2023)
Discarding device blocks: done                            
Creating filesystem with 31227648 4k blocks and 7806976 inodes
Filesystem UUID: 5f4ddd57-cf95-4953-b292-8a7b37cebc4b
Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (131072 blocks): done
Writing superblocks and filesystem accounting information: done 

5 OpenWrt web 导航菜单中没有,挂载点,需要安装

opkg update
opkg install block-mount
reboot

#web 登录openwrt 选择 系统-->挂载点 找到新创建的分区

 

 #ssh 登录openwrt

#逐条执行,确保成功
mkdir -p /tmp/introot
mkdir -p /tmp/extroot
mount --bind / /tmp/introot
mount /dev/sda3 /tmp/extroot #注意挂载新分区(⊙﹏⊙)
tar -C /tmp/introot -cvf - . | tar -C /tmp/extroot -xf -
umount /tmp/introot
umount /tmp/extroot

#WEB 页面 --挂载点--保存

6 重新启动openwrt服务器,查看磁盘

root@OpenWrt:~# df  -hT
Filesystem           Type            Size      Used Available Use% Mounted on
/dev/root            ext4          102.3M     57.9M     42.4M  58% /rom
tmpfs                tmpfs           3.8G      3.6M      3.8G   0% /tmp
/dev/sda3            ext4          116.7G     59.9M    110.7G   0% /
/dev/sda1            vfat           16.0M      6.1M      9.8M  38% /boot
/dev/sda1            vfat           16.0M      6.1M      9.8M  38% /boot
tmpfs                tmpfs         512.0K         0    512.0K   0% /dev

这篇关于OpenWrt 23.05 安装之后默认空间小 磁盘扩容 教程 软路由实测 系列六的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1010028

相关文章

ESP32 esp-idf esp-adf环境安装及.a库创建与编译

简介 ESP32 功能丰富的 Wi-Fi & 蓝牙 MCU, 适用于多样的物联网应用。使用freertos操作系统。 ESP-IDF 官方物联网开发框架。 ESP-ADF 官方音频开发框架。 文档参照 https://espressif-docs.readthedocs-hosted.com/projects/esp-adf/zh-cn/latest/get-started/index

Linux 安装、配置Tomcat 的HTTPS

Linux 安装 、配置Tomcat的HTTPS 安装Tomcat 这里选择的是 tomcat 10.X ,需要Java 11及更高版本 Binary Distributions ->Core->选择 tar.gz包 下载、上传到内网服务器 /opt 目录tar -xzf 解压将解压的根目录改名为 tomat-10 并移动到 /opt 下, 形成个人习惯的路径 /opt/tomcat-10

2024.6.24 IDEA中文乱码问题(服务器 控制台 TOMcat)实测已解决

1.问题产生原因: 1.文件编码不一致:如果文件的编码方式与IDEA设置的编码方式不一致,就会产生乱码。确保文件和IDEA使用相同的编码,通常是UTF-8。2.IDEA设置问题:检查IDEA的全局编码设置和项目编码设置是否正确。3.终端或控制台编码问题:如果你在终端或控制台看到乱码,可能是终端的编码设置问题。确保终端使用的是支持你的文件的编码方式。 2.解决方案: 1.File -> S

VMware9.0详细安装

双击VMware-workstation-full-9.0.0-812388.exe文件: 直接点Next; 这里,我选择了Typical(标准安装)。 因为服务器上只要C盘,所以我选择安装在C盘下的vmware文件夹下面,然后点击Next; 这里我把√取消了,每次启动不检查更新。然后Next; 点击Next; 创建快捷方式等,点击Next; 继续Cont

vcpkg安装opencv中的特殊问题记录(无法找到opencv_corexd.dll)

我是按照网上的vcpkg安装opencv方法进行的(比如这篇:从0开始在visual studio上安装opencv(超详细,针对小白)),但是中间出现了一些别人没有遇到的问题,虽然原因没有找到,但是本人给出一些暂时的解决办法: 问题1: 我在安装库命令行使用的是 .\vcpkg.exe install opencv 我的电脑是x64,vcpkg在这条命令后默认下载的也是opencv2:x6

【服务器运维】CentOS6 minimal 离线安装MySQL5.7

1.准备安装包(版本因人而异,所以下面的命令中版本省略,实际操作中用Tab自动补全就好了) cloog-ppl-0.15.7-1.2.el6.x86_64.rpmcpp-4.4.7-23.el6.x86_64.rpmgcc-4.4.7-23.el6.x86_64.rpmgcc-c++-4.4.7-23.el6.x86_64.rpmglibc-2.12-1.212.el6.x86_64.r

【服务器运维】CentOS7 minimal 离线安装 gcc perl vmware-tools

0. 本机在有网的情况下,下载CentOS镜像 https://www.centos.org/download/ 1. 取出rpm 有的情况可能不需要net-tools,但是如果出现跟ifconfig相关的错误,就把它安装上。另外如果不想升级内核版本的话,就找对应内核版本的rpm版本安装 perl-Time-Local-1.2300-2.el7.noarch.rpmperl-Tim

Windows/macOS/Linux 安装 Redis 和 Redis Desktop Manager 可视化工具

本文所有安装都在macOS High Sierra 10.13.4进行,Windows安装相对容易些,Linux安装与macOS类似,文中会做区分讲解 1. Redis安装 1.下载Redis https://redis.io/download 把下载的源码更名为redis-4.0.9-source,我喜欢跟maven、Tomcat放在一起,就放到/Users/zhan/Documents

Ubuntu20.04离线安装Docker

1.下载3个docker离线安装包,下载网址: https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/amd64/ 2.把3个离线安装包拷贝到ubuntu本地执行以下命令 sudo dpkg -i containerd.io_1.4.6-1_amd64.deb sudo dpkg -i docker-ce-c

vue子路由回退后刷新页面方式

最近碰到一个小问题,页面中含有 <transition name="router-slid" mode="out-in"><router-view></router-view></transition> 作为子页面加载显示的地方。但是一般正常子路由通过 this.$router.go(-1) 返回到上一层原先的页面中。通过路由历史返回方式原本父页面想更新数据在created 跟mounted