0

I've got an 16GB SD card with Raspbian on it.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 8.0 (jessie)
Release:    8.0
Codename:   jessie

There are (as usual) two partitions on the device. The boot partition and the root partition. The root partition uses almost all the space.

$ sudo fdisk -l /dev/mmcblk0 

Disk /dev/mmcblk0: 14.6 GiB, 15640559616 bytes, 30547968 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: 0x4ae87cfb

Device         Boot  Start      End  Sectors  Size Id Type
/dev/mmcblk0p1      204800   729087   524288  256M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      729088 30547967 29818880 14.2G 83 Linux

But the filesystem only uses something around 7GB of this partition:

$ df -T /
Filesystem     Type 1K-blocks    Used Available Use% Mounted on
/dev/root      ext4   7155064 5881840    893372  87% /
$  df -Th /   
Filesystem     Type  Size  Used Avail Use% Mounted on
/dev/root      ext4  6.9G  5.7G  873M  87% /

The Problem

For some reason resize2fs denies to resize the filesystem on-line to the partitions size:

$ sudo resize2fs /dev/mmcblk0p2 
resize2fs 1.43.3 (04-Sep-2016)
Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
resize2fs: Permission denied to resize filesystem

Any ideas, what the reason could be?

exilit
  • 151
  • 1
  • 5
  • Possible duplicate of [Permission denied to resize filesystem](https://serverfault.com/questions/662715/permission-denied-to-resize-filesystem) – Thomas Jul 07 '18 at 12:22
  • Right, corruption seems most likely. Especially since people like to unplug their Pis without properly shutting down the OS. – Michael Hampton Jul 07 '18 at 12:47
  • Thank you for your suggestions. That was also my first assumption but after I (thought, that I) forced an fsck I dismissed that idea quickly. Now after further investigation I realised that fsck did not run on the root partition. Further research showed, that it seems to be some kind of magic that just does not work on raspbian the way it should work. While I searched the (whole) internet for a solution I found a lot of issues, questions and bug-reports related to '/forcefsck', 'fsck.mode=force' and similar options. – exilit Jul 08 '18 at 15:59

0 Answers0