Disk size on my router

My router has a disk of 16GB but in the system are not used. OpenWRT runs on /dev/sdb. How could i make use of it, in a live system, please?

root@OpenWrt:~# fdisk -l
Disk /dev/sda: 111.79 GiB, 120034123776 bytes, 234441648 sectors
Disk model: SATA 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: dos
Disk identifier: 0x23ebdf05

Device     Boot Start       End   Sectors   Size Id Type
/dev/sda1        2048 234441647 234439600 111.8G 83 Linux


Disk /dev/sdb: 15.06 GiB, 16172187648 bytes, 31586304 sectors
Disk model: Card  Reader
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: dos
Disk identifier: 0xc120d9f5

Device     Boot Start    End Sectors  Size Id Type
/dev/sdb1  *      512  33279   32768   16M 83 Linux
/dev/sdb2       33792 246783  212992  104M 83 Linux
root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root               102.3M     74.6M     25.7M  74% /
tmpfs                   987.9M      4.1M    983.8M   0% /tmp
/dev/sdb1                15.7M      5.2M     10.2M  34% /boot
/dev/sdb1                15.7M      5.2M     10.2M  34% /boot
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/sda1               109.5G      2.2G    101.7G   2% /mnt/sda1
root@OpenWrt:~#

add an additional partition, or resize /dev/sdb2, depending on if you want to use it as
general storage, or as part of the openwrt root FS.

1 Like

I would like to expand it, without removing it from the router. How could i do it please?

If my memory doesn't fail me...

mount -o ro /dev/sdb2
in fdisk delete /dev/sdb2
recreate it with the new size, using the same start sector as the old one
resize2fs /dev/sdb2
mount -o rw /dev/sdb2

Make sure you've got the required packages installed, before you attempt the resize.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.