Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

SD Card resize problem.

Need help with peripherals or devices?
Post Reply
Message
Author
heliar
Posts: 10
Joined: 2015-04-23 06:47

SD Card resize problem.

#1 Post by heliar »

Hello, i've got little issue with resize rootfs partiiton inside ODROID-C1. SD Card have 16GB, when typying

Code: Select all

df -Th
I see on rootfs partition Size 2.8G,Used 1.9G, Avail 784M. After eject card and insert it to laptop with LiveCD and check partitions table with gparted I see 15.7GB size and 14.8GB used at this partition (/dev/mmcblk0p2). Under

Code: Select all

fdisk /dev/mmcblk0
I see only two partition without SWAP one.
Is there any way to resize that partition?

Code: Select all

uname -a
shows me debian 3.10.70 armv71

Many thanks for help! :)

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: SD Card resize problem.

#2 Post by Head_on_a_Stick »

Please post the output of:

Code: Select all

# parted -l /dev/mmcblk0
deadbang

heliar
Posts: 10
Joined: 2015-04-23 06:47

Re: SD Card resize problem.

#3 Post by heliar »

Ouh! Something different at this moment:

Code: Select all

└─#! parted -l /dev/mmcblk0
Error: /dev/zram0: unrecognised disk label
Error: /dev/zram1: unrecognised disk label
Error: /dev/zram2: unrecognised disk label
Error: /dev/zram3: unrecognised disk label

Model: SD SA16G (sd/mmc)
Disk /dev/mmcblk0: 15.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      1573kB  136MB   135MB   primary  fat16        lba
 2      136MB   15.7GB  15.6GB  primary  ext4

Code: Select all

└─#! df -Th
Filesystem     Type      Size  Used Avail Use% Mounted on
rootfs         rootfs    2.8G  1.9G  784M  71% /
/dev/root      ext4      2.8G  1.9G  784M  71% /
devtmpfs       devtmpfs  419M     0  419M   0% /dev
tmpfs          tmpfs      85M  2.5M   83M   3% /run
tmpfs          tmpfs     5.0M     0  5.0M   0% /run/lock
tmpfs          tmpfs     170M     0  170M   0% /run/shm
/dev/mmcblk0p1 vfat      129M  5.8M  123M   5% /boot/firmware
tmpfs          tmpfs      85M     0   85M   0% /tmp
tmpfs          tmpfs      30M     0   30M   0% /var/tmp
tmpfs          tmpfs     100M  268K  100M   1% /var/log

Code: Select all

└─#! fdisk /dev/mmcblk0

Command (m for help): p

Disk /dev/mmcblk0: 15.7 GB, 15720251392 bytes
4 heads, 32 sectors/track, 239872 cylinders, total 30703616 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
Disk identifier: 0x0009de21

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            3072      266239      131584    c  W95 FAT32 (LBA)
/dev/mmcblk0p2          266240    30703615    15218688   83  Linux
Thanks for reply!

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: SD Card resize problem.

#4 Post by Head_on_a_Stick »

It looks like the filesystem doesn't occupy the whole partition -- you can resize it using `resize2fs`; see the man page for details.
deadbang

heliar
Posts: 10
Joined: 2015-04-23 06:47

Re: SD Card resize problem.

#5 Post by heliar »

Yeah, I try to do it on running environment becouse resize2fs has the ability to resize mounted partitions but unfortunelly:

Code: Select all

└─#! umount /dev/mmcblk0p2

└─#! resize2fs /dev/mmcblk0p2
resize2fs 1.42.5 (29-Jul-2012)
Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
resize2fs: Read-only file system While checking for on-line resizing support
Trying it on laptop with SD Card mounted have chance to success without losing my data?

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: SD Card resize problem.

#6 Post by Head_on_a_Stick »

heliar wrote:Trying it on laptop with SD Card mounted have chance to success without losing my data?
Backup first.
deadbang

Post Reply