The image I'm using for the RPI3 doesn't utilize all of the SD card its space.
I'm trying to expand the partition to utilize the full 16GB on the SD card but it doesn't seem to work:
root@openwrt:~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 478.5M 37.1M 431.8M 8% /
tmpfs 464.9M 292.0K 464.6M 0% /tmp
tmpfs 512.0K 0 512.0K 0% /dev
root@openwrt:~# umount -f /
root@openwrt:~# fdisk /dev/mmcblk0
Welcome to fdisk (util-linux 2.28).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/mmcblk0: 14.5 GiB, 15523119104 bytes, 30318592 sectors
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: 0x5452574f
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 * 8192 417791 409600 200M c W95 FAT32 (LBA)
/dev/mmcblk0p2 425984 1409023 983040 480M 83 Linux
Command (m for help): d
Partition number (1,2, default 2):
Partition 2 has been deleted.
Command (m for help): p
Disk /dev/mmcblk0: 14.5 GiB, 15523119104 bytes, 30318592 sectors
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: 0x5452574f
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 * 8192 417791 409600 200M c W95 FAT32 (LBA)
Command (m for help): n
Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p):
Using default response p.
Partition number (2-4, default 2):
First sector (2048-30318591, default 2048): 425984
Last sector, +sectors or +size{K,M,G,T,P} (425984-30318591, default 30318591):
Created a new partition 2 of type 'Linux' and of size 14.3 GiB.
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Resource busy
The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).
root@openwrt:~# reboot
root@openwrt:~# resize2fs /dev/root
resize2fs 1.42.12 (29-Aug-2014)
Filesystem at /dev/root is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
resize2fs: Invalid argument While checking for on-line resizing support
root@openwrt:~# resize2fs /dev/root
resize2fs 1.42.12 (29-Aug-2014)
Filesystem at /dev/root is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
Performing an on-line resize of /dev/root to 3736576 (4k) blocks.
resize2fs: Operation not permitted While trying to add group #5
When I check Kernel log:
[ 61.283001] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[ 94.396389] EXT4-fs (mmcblk0p2): re-mounted. Opts: block_validity,delalloc,barrier,user_xattr,acl
[ 95.711277] EXT4-fs (mmcblk0p2): resizing filesystem from 122880 to 3736576 blocks
[ 95.780817] EXT4-fs warning (device mmcblk0p2): reserve_backup_gdb:968: reserved block 32 not at offset 31
[ 95.799098] EXT4-fs (mmcblk0p2): resized filesystem to 3736576
[ 95.810053] EXT4-fs warning (device mmcblk0p2): ext4_group_extend:1730: can't shrink FS - resize aborted
[ 106.246223] EXT4-fs (mmcblk0p2): resizing filesystem from 163840 to 3736576 blocks
[ 106.268424] EXT4-fs warning (device mmcblk0p2): reserve_backup_gdb:968: reserved block 32 not at offset 31
[ 106.286995] EXT4-fs (mmcblk0p2): resized filesystem to 3736576
[ 106.307088] EXT4-fs warning (device mmcblk0p2): ext4_group_add:1605: No reserved GDT blocks, can't resize
Does anyone know how to fix this?