本文共 1054 字,大约阅读时间需要 3 分钟。
Ext4 filesystem supports online (that is, without unmounting) resizing with resize2fs command.
First, you have to resize the partition itself with partition editor (parted):GNU Parted 2.3
Using /dev/sdbWelcome to GNU Parted! Type 'help' to view a list of commands.(parted) pModel: VMware Virtual disk (scsi)Disk /dev/sdb: 5498GBSector size (logical/physical): 512B/512BPartition Table: gptNumber Start End Size File system Name Flags
1 1049kB 3298GB 3298GB ext4Now, use resizepart command and give partition number as its parameter (in our case, 1). When asked for new size, enter -1 (means use all space up to the last available sector on disk):
(parted) resizepart 1
Partition /dev/sdb1 is being used. Are you sure you want to continue?Yes/No? yEnd? [3298GB]? -1(parted) qInformation: You may need to update /etc/fstab.Now you can call the resize2fs command. No need to input anything, it will automatically grow the filesystem to the new partition size:
转载于:https://blog.51cto.com/brave8898/2094749