Disk partition adding storage to /

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Disk partition adding storage to /

跳至解决方案
423 次查看
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 项奖励
回复
1 解答
418 次查看
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.

在原帖中查看解决方案

1 回复
419 次查看
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%3E%E7%A3%81%E7%9B%98%E5%88%86%E5%8C%BA%E5%B0%86%E5%AD%98%E5%82%A8%E6%B7%BB%E5%8A%A0%E5%88%B0%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%20%7C-mcblk2p1%3CSTRONG%3E%20179%3A1%200%2083.2M%200%20part%3C%2FSTRONG%3E%3CBR%20%2F%3E%20%60-mcblk2p2%3CSTRONG%3E%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%20%20%20%3C%2FP%3E%3CP%3E%E6%88%91%E9%9C%80%E8%A6%81%E5%B0%86%2029G%20%E6%B7%BB%E5%8A%A0%E5%88%B0%20%2F%20%E6%8C%82%E8%BD%BD%E7%82%B9%EF%BC%8C%E6%88%91%E5%B7%B2%E7%BB%8F%E4%BD%BF%E7%94%A8%20fdisk%20%E5%91%BD%E4%BB%A4%E6%B7%BB%E5%8A%A0%E4%BA%86%E5%AE%83%EF%BC%8C%E7%8E%B0%E5%9C%A8%E6%88%91%E7%9A%84%20lsblk%20%E6%98%BE%E7%A4%BA%E4%BA%86%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%20%7C-mcblk2p1%3CSTRONG%3E%20179%3A1%200%2083.2M%200%20part%3C%2FSTRONG%3E%3CBR%20%2F%3E%20%60-mcblk2p2%3CSTRONG%3E%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%20%20%20%3C%2FP%3E%3CP%3E29G%20%E5%B7%B2%E7%94%A8%20root%20%E8%BD%BD%E5%85%A5%EF%BC%8C%E4%BD%86%E5%BD%93%E6%88%91%E7%BB%99%20df%20-h%3C%2FP%3E%3CP%3Edf%20-h%3CBR%20%2F%3E%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F%E5%A4%A7%E5%B0%8F%20%E5%B7%B2%E7%94%A8%E5%8F%AF%E7%94%A8%25%20%E5%B7%B2%E6%8C%82%E8%BD%BD%3CBR%20%2F%3E%20%2Fdev%2Froot%3CSTRONG%3E%201.4G%20877M%20440M%2067%25%20%3C%2FSTRONG%3E%2F%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%20%20%3C%2FP%3E%3CP%3E%E6%88%91%E5%9C%A8%E4%B8%BA%E8%AE%BE%E5%A4%87%E6%B7%BB%E5%8A%A0%E5%AD%98%E5%82%A8%E7%A9%BA%E9%97%B4%E6%97%B6%E7%BC%BA%E5%B0%91%E7%9A%84%E6%98%AF%E8%BF%99%E6%98%AF%E4%B8%BA%E7%B3%BB%E7%BB%9F%E5%88%86%E9%85%8D%E5%86%85%E5%AD%98%E7%9A%84%E6%AD%A3%E7%A1%AE%E6%96%B9%E6%B3%95%3C%2FP%3E%3C%2FLINGO-BODY%3E