Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to expand disk capacity in Linux system

Shulou Source: shulou.com Published: 2022-06-03 05:16:55 09月21日 Update

Step 1: check the disk size

Fdisk-l

Step 2: uninstall the partition

Umount / www

Step 3: delete the partition and re-establish it

Fdisk / etc/sdb

D

N

P

W

Step 4: uninstall the partition and check the file system

Umount / dev/sdb1

Umount / www

E2fsck-f / dev/sdb1 (ext4 file system)

Xfs_repair / dev/sdb1 (xfs file system)

Step 5: Mount the directory

Mount / dev/sdb1 / www

Step 6: rebuild the file system

Resize2fs / dev/sdb1 (ext4 file system)

Xfs_growfs / dev/sdb1 (xfs file system)

Step 7: confirm

Df-h

Tags: Step system file disk size directory check Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Shulou Tech Info NVidia macOS Xiaomi