[SOLVED] Problem getting Arch to use full size of SD

Ask questions about Arch Linux ARM. Please search before making a new topic.

[SOLVED] Problem getting Arch to use full size of SD

Postby hjmuller » Fri Oct 10, 2014 2:43 am

I've been running out of space on my system. Here is the output of df -h:

$this->bbcode_second_pass_code('', '[joe@archpi ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 1.7G 1.4G 200M 88% /
devtmpfs 213M 0 213M 0% /dev
tmpfs 217M 0 217M 0% /dev/shm
tmpfs 217M 340K 217M 1% /run
tmpfs 217M 0 217M 0% /sys/fs/cgroup
tmpfs 217M 0 217M 0% /tmp
/dev/mmcblk0p1 90M 26M 64M 29% /boot
tmpfs 44M 0 44M 0% /run/user/1000
192.168.1.4:/volume1/tv 2.3T 1.7T 584G 75% /mnt/tv')

I followed the instructions at http://raspberry-hosting.com/en/faq/cras-quis-nibh to resize the partion. It worked until the last step where I get this:

$this->bbcode_second_pass_code('', '[joe@archpi ~]$ sudo resize2fs /dev/mmcblk0p5
[sudo] password for joe:
resize2fs 1.42.10 (18-May-2014)
Filesystem at /dev/mmcblk0p5 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
resize2fs: Permission denied to resize filesystem')

Although this is the output of fdisk -l:

$this->bbcode_second_pass_code('', '[joe@archpi ~]$ sudo fdisk -l

Disk /dev/mmcblk0: 14.7 GiB, 15811477504 bytes, 30881792 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: 0x417ee54b

Device Boot Start End Blocks Id System
/dev/mmcblk0p1 2048 186367 92160 c W95 FAT32 (LBA)
/dev/mmcblk0p2 186368 30881791 15347712 5 Extended
/dev/mmcblk0p5 188416 30881791 15346688 83 Linux')

I tried loading the SD card into Windows and resizing the partition using a different program. The card appears to be configured for the full 16GB.
Any advice on what I can do? Here is my fstab (not sure if it needs to be changed):

$this->bbcode_second_pass_code('', '
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>

/dev/mmcblk0p1 /boot vfat defaults 0 0

# Begin Synology shares using NFS protocol

192.168.1.4:/volume1/downloads /mnt/downloads nfs
192.168.1.4:/volume1/games /mnt/games nfs
192.168.1.4:/volume1/movies /mnt/movies nfs
192.168.1.4:/volume1/music /mnt/music nfs
192.168.1.4:/volume1/pictures /mnt/pictures nfs
192.168.1.4:/volume1/tv /mnt/tv nfs
')
Last edited by hjmuller on Tue Oct 14, 2014 2:21 am, edited 1 time in total.
hjmuller
 
Posts: 5
Joined: Fri Oct 10, 2014 2:40 am

Re: Problem getting Arch to use full size of SD

Postby pepedog » Fri Oct 10, 2014 10:02 am

Login as root
With fdisk, delete /dev/mmcblk0p5 and immediately recreate with start as 188416, and default for the rest.
Reboot and resize2fs /dev/mmcblk0p5
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Problem getting Arch to use full size of SD

Postby hjmuller » Sat Oct 11, 2014 4:05 am

I still get the same error after deleting and re-creating partition 5:

$this->bbcode_second_pass_code('', '[root@archpi ~]# resize2fs /dev/mmcblk0p5
resize2fs 1.42.10 (18-May-2014)
Filesystem at /dev/mmcblk0p5 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
resize2fs: Permission denied to resize filesystem
[root@archpi ~]#
')
hjmuller
 
Posts: 5
Joined: Fri Oct 10, 2014 2:40 am

Re: Problem getting Arch to use full size of SD

Postby opotonil » Mon Oct 13, 2014 12:26 pm

The file system can't be resized if it is mounted.
opotonil
 
Posts: 40
Joined: Sat Feb 08, 2014 1:17 pm

Re: Problem getting Arch to use full size of SD

Postby hjmuller » Tue Oct 14, 2014 12:26 am

Is there a way to issue the resize command during the boot up sequence (before the device is mounted)? Or do I have to use another linux distro to resize the SD card?
hjmuller
 
Posts: 5
Joined: Fri Oct 10, 2014 2:40 am

Re: Problem getting Arch to use full size of SD

Postby pepedog » Tue Oct 14, 2014 12:30 am

Did you reboot between fdisk and resize? You must.
You can do this on a mounted partition
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Problem getting Arch to use full size of SD

Postby hjmuller » Tue Oct 14, 2014 1:35 am

I did reboot in between. I'm not sure why I'm getting permission denied errors.
hjmuller
 
Posts: 5
Joined: Fri Oct 10, 2014 2:40 am

Re: Problem getting Arch to use full size of SD

Postby hjmuller » Tue Oct 14, 2014 1:55 am

I managed to fix the space issue by running the command using a live version gparted in VirtualBox. The system forced me to run e2fsck first, which actually fixed some errors prior to re-sizing.
hjmuller
 
Posts: 5
Joined: Fri Oct 10, 2014 2:40 am

Re: [SOLVED] Problem getting Arch to use full size of SD

Postby pepedog » Tue Oct 14, 2014 10:35 am

That explains it, best to resize first thing on first boot, before corruption kills it
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK


Return to User Questions

Who is online

Users browsing this forum: No registered users and 25 guests