Disk partition adding storage to /

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Disk partition adding storage to /

Jump to solution
148 Views
Cyriactoms
Contributor III

lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
mtdblock0 31:0 0 32M 0 disk
mmcblk2 179:0 0 29.1G 0 disk
|-mmcblk2p1 179:1 0 83.2M 0 part
`-mmcblk2p2 179:2 0 1.5G 0 part /
mmcblk2boot0 179:32 0 4M 1 disk
mmcblk2boot1 179:64 0 4M 1 disk   

i need to add 29G to / mount point i have added it using fdisk command and my lsblk is now showing

lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
mtdblock0 31:0 0 32M 0 disk
mmcblk2 179:0 0 29.1G 0 disk
|-mmcblk2p1 179:1 0 83.2M 0 part
`-mmcblk2p2 179:2 0 29G 0 part /
mmcblk2boot0 179:32 0 4M 1 disk
mmcblk2boot1 179:64 0 4M 1 disk   

29G is mounted with root but when i give df -h

df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 1.4G 877M 440M 67% /
devtmpfs 2.3G 0 2.3G 0% /dev
tmpfs 2.8G 0 2.8G 0% /dev/shm
tmpfs 1.1G 9.1M 1.1G 1% /run
tmpfs 4.0M 0 4.0M 0% /sys/fs/cgroup
tmpfs 2.8G 60K 2.8G 1% /tmp
tmpfs 2.8G 16K 2.8G 1% /var/volatile
tmpfs 562M 4.0K 562M 1% /run/user/0  

what i am missing to add the storage for the device  is this the right approach to allocate memory for the system

0 Kudos
Reply
1 Solution
143 Views
Cyriactoms
Contributor III
fdisk /dev/mmcblk2



Welcome to fdisk (util-linux 2.37.4).

Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.



This disk is currently in use - repartitioning is probably a bad idea.

It's recommended to umount all file systems, and swapoff all swap

partitions on this disk.





Command (m for help): p



Disk /dev/mmcblk2: 29.12 GiB, 31268536320 bytes, 61071360 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: 0x88bc4c84



Device Boot Start End Sectors Size Id Type

/dev/mmcblk2p1 * 16384 186775 170392 83.2M c W95 FAT32 (LBA)

/dev/mmcblk2p2 196608 3246773 3050166 1.5G 83 Linux



Command (m for help): d

Partition number (1,2, default 2): 2



Partition 2 has been deleted.



Command (m for help): n

Partition type

p primary (1 primary, 0 extended, 3 free)

e extended (container for logical partitions)

Select (default p): p

Partition number (2-4, default 2): 2

First sector (2048-61071359, default 2048): 196608

Last sector, +/-sectors or +/-size{K,M,G,T,P} (196608-61071359, default 61071359):



Created a new partition 2 of type 'Linux' and of size 29 GiB.

Partition #2 contains a ext4 signature.



Do you want to remove the signature? [Y]es/[N]o: n



Command (m for help): w



The partition table has been altered.

Syncing disks.

View solution in original post

1 Reply
144 Views
Cyriactoms
Contributor III
fdisk /dev/mmcblk2



Welcome to fdisk (util-linux 2.37.4).

Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.



This disk is currently in use - repartitioning is probably a bad idea.

It's recommended to umount all file systems, and swapoff all swap

partitions on this disk.





Command (m for help): p



Disk /dev/mmcblk2: 29.12 GiB, 31268536320 bytes, 61071360 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: 0x88bc4c84



Device Boot Start End Sectors Size Id Type

/dev/mmcblk2p1 * 16384 186775 170392 83.2M c W95 FAT32 (LBA)

/dev/mmcblk2p2 196608 3246773 3050166 1.5G 83 Linux



Command (m for help): d

Partition number (1,2, default 2): 2



Partition 2 has been deleted.



Command (m for help): n

Partition type

p primary (1 primary, 0 extended, 3 free)

e extended (container for logical partitions)

Select (default p): p

Partition number (2-4, default 2): 2

First sector (2048-61071359, default 2048): 196608

Last sector, +/-sectors or +/-size{K,M,G,T,P} (196608-61071359, default 61071359):



Created a new partition 2 of type 'Linux' and of size 29 GiB.

Partition #2 contains a ext4 signature.



Do you want to remove the signature? [Y]es/[N]o: n



Command (m for help): w



The partition table has been altered.

Syncing disks.