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
418 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
413 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
414 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.
%3CLINGO-SUB%20id%3D%22lingo-sub-2186517%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EDisk%20partition%20adding%20storage%20to%20%2F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2186517%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Elsblk%3CBR%20%2F%3ENAME%20MAJ%3AMIN%20RM%20SIZE%20RO%20TYPE%20MOUNTPOINTS%3CBR%20%2F%3Emtdblock0%2031%3A0%200%2032M%200%20disk%3CBR%20%2F%3Emmcblk2%20179%3A0%200%2029.1G%200%20disk%3CBR%20%2F%3E%3CSTRONG%3E%7C-mmcblk2p1%20179%3A1%200%2083.2M%200%20part%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3E%60-mmcblk2p2%20179%3A2%200%201.5G%200%20part%20%2F%3C%2FSTRONG%3E%3CBR%20%2F%3Emmcblk2boot0%20179%3A32%200%204M%201%20disk%3CBR%20%2F%3Emmcblk2boot1%20179%3A64%200%204M%201%20disk%26nbsp%3B%20%26nbsp%3B%3C%2FP%3E%3CP%3Ei%20need%20to%20add%2029G%20to%20%2F%20mount%20point%20i%20have%20added%20it%20using%20fdisk%20command%20and%20my%20lsblk%20is%20now%20showing%3C%2FP%3E%3CP%3Elsblk%3CBR%20%2F%3ENAME%20MAJ%3AMIN%20RM%20SIZE%20RO%20TYPE%20MOUNTPOINTS%3CBR%20%2F%3Emtdblock0%2031%3A0%200%2032M%200%20disk%3CBR%20%2F%3Emmcblk2%20179%3A0%200%2029.1G%200%20disk%3CBR%20%2F%3E%3CSTRONG%3E%7C-mmcblk2p1%20179%3A1%200%2083.2M%200%20part%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3E%60-mmcblk2p2%20179%3A2%200%2029G%200%20part%20%2F%3C%2FSTRONG%3E%3CBR%20%2F%3Emmcblk2boot0%20179%3A32%200%204M%201%20disk%3CBR%20%2F%3Emmcblk2boot1%20179%3A64%200%204M%201%20disk%26nbsp%3B%20%26nbsp%3B%3C%2FP%3E%3CP%3E29G%20is%20mounted%20with%20root%20but%20when%20i%20give%20df%20-h%3C%2FP%3E%3CP%3Edf%20-h%3CBR%20%2F%3EFilesystem%20Size%20Used%20Avail%20Use%25%20Mounted%20on%3CBR%20%2F%3E%3CSTRONG%3E%2Fdev%2Froot%201.4G%20877M%20440M%2067%25%20%2F%3C%2FSTRONG%3E%3CBR%20%2F%3Edevtmpfs%202.3G%200%202.3G%200%25%20%2Fdev%3CBR%20%2F%3Etmpfs%202.8G%200%202.8G%200%25%20%2Fdev%2Fshm%3CBR%20%2F%3Etmpfs%201.1G%209.1M%201.1G%201%25%20%2Frun%3CBR%20%2F%3Etmpfs%204.0M%200%204.0M%200%25%20%2Fsys%2Ffs%2Fcgroup%3CBR%20%2F%3Etmpfs%202.8G%2060K%202.8G%201%25%20%2Ftmp%3CBR%20%2F%3Etmpfs%202.8G%2016K%202.8G%201%25%20%2Fvar%2Fvolatile%3CBR%20%2F%3Etmpfs%20562M%204.0K%20562M%201%25%20%2Frun%2Fuser%2F0%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3Ewhat%20i%20am%20missing%20to%20add%20the%20storage%20for%20the%20device%26nbsp%3B%20is%20this%20the%20right%20approach%20to%20allocate%20memory%20for%20the%20system%3C%2FP%3E%3C%2FLINGO-BODY%3E