Originally posted on 2020-10-23
I added a big EBS volume to my EC2 instance to deal with Dropbox telling me it couldn't sync because my disk was too small. So I created a massive EBS volume, let it do the initial sync, and then moved the synced volume back to my original disk.
Run parted (NOTE: your disk name may be different):
sudo parted /dev/nvme1n1Figure out how much space is free:
(parted) unit MB print free
Model: Amazon Elastic Block Store (nvme)
Disk /dev/nvme1n1: 1717987MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
0.02MB 1717987MB 1717987MB Free SpaceCreate a new primary, ext4 partition with that info and ignore the performance warning:
(parted) mkpart primary ext4 0 1717987
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? iQuit with the quit command and run lsblk:
Format the partition:
sudo mkfs.ext4 /dev/nvme1n1p1Mount it:
sudo mkdir -p /mnt/bigdisk
sudo mount /dev/nvme1n1p1 /mnt/bigdisk