Reputation: 561
I am trying to increase the volume of the root folder after running this command growpart /dev/nvme0n1p1
83
This is the error I receive
WARN: unknown label
failed [sfd_dump:1] sfdisk --unit=S --dump /dev/nvme0n1p1
sfdisk: /dev/nvme0n1p1: does not contain a recognized partition table
FAILED: failed to dump sfdisk info for /dev/nvme0n1p1
How can I get past this error?
Upvotes: 3
Views: 5440
Reputation: 561
Verify the Device: Double-check that /dev/nvme0n1p1
is indeed the correct device and partition that you want to resize. You can use the lsblk or fdisk -l command to list the available devices and their partitions. Make sure you're targeting the right one.
Check Partition Table: If the device is supposed to have a partition table, ensure that it's not corrupted. You can use the gdisk or fdisk command to examine the partition table. For example:
sudo gdisk /dev/nvme0n1
If there's no partition table or it appears to be corrupted, you might need to recreate the partition table. However, be cautious as this can result in data loss if not done correctly.
Create a Partition: If the device doesn't have a partition or if you need to create a new one, you can use the fdisk or parted command to create a new partition. For example:
sudo fdisk /dev/nvme0n1
Follow the prompts to create a new partition and then try running the growpart command again.
Check Filesystem: If there's a valid partition table but you're still encountering issues, it's possible that the filesystem within the partition needs to be resized. After successfully resizing the partition using growpart, you might need to resize the filesystem to use the newly allocated space. The specific command depends on the filesystem type (e.g., ext4, xfs). For example:
For ext4:
sudo resize2fs /dev/nvme0n1p1
For xfs:
sudo xfs_growfs /mountpoint
Remember to replace /mountpoint with the actual mount point of the filesystem.
Upvotes: 1
Reputation: 840
For Nitro volumes, use:
$ sudo xfs_growfs -d /YOUR_EBS_MOUNT_POINT
Upvotes: 0
Reputation: 305
use the resize2fs command instead eg:
$ sudo resize2fs /dev/nvme0n1p1
Upvotes: 5