Hardware: VM running inside Proxmox YunoHost version: 4.2.8.3 I have access to my server : Through SSH | through the webadmin | Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
Description of my issue
I would to like to resize the root partition after a disk upgrade (increased size from 30 to 40 GiB). I have ran out of space and cannot install new apps, do backups or even do updates.
You should get something like /dev/sda1 or /dev/vda2. If you receive /dev/mapper/something, you probably use lvm, and this tutorial wonât be enough.
Display the partition table with some information
root@vps:~# parted /dev/vda
GNU Parted 3.2
Using /dev/vda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: Virtio Block Device (virtblk)
Disk /dev/vda: 6442MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 5369MB 5368MB primary ext4 boot
Resize the partition
(parted) resizepart
Partition number? 1 << the number of the partition you want resize
Warning: Partition /dev/vda1 is being used. Are you sure you want to continue?
Yes/No? Yes
End? [5369MB]? 100% << 100% means we want use all the space available
Check the change has been done correctly
(parted) print
Model: Virtio Block Device (virtblk)
Disk /dev/vda: 6442MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 6442MB 6441MB primary ext4 boot
(parted) q
Information: You may need to update /etc/fstab.
Resize the file system
root@vps:~# resize2fs /dev/vda1
resize2fs 1.43.4 (31-Jan-2017)
Filesystem at /dev/vda1 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
The filesystem on /dev/vda1 is now 1572608 (4k) blocks long.
Thank you for the quick reply and this very detailed solution. I got stuck at the âresizeâ part of the instructions, see below the details, I do not know how to proceed⌠it seems there is an overlap⌠parted is not seeing the extra disk space over which extend the root partition or the extended partition/swap is getting on the way?
root@yuno:/home/admin# findmnt / -o source -n
/dev/sda1
root@yuno:/home/admin# parted /dev/sda
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type âhelpâ to view a list of commands.
(parted) print
Model: QEMU QEMU HARDDISK (scsi)
Disk /dev/sda: 64.4GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 32.2GB 32.2GB primary ext4 boot
2 32.2GB 34.4GB 2144MB extended
5 32.2GB 34.4GB 2144MB logical linux-swap(v1)
(parted) resizepart
Partition number? 1
Warning: Partition /dev/sda1 is being used. Are you sure you want to continue?
Yes/No? yes
End? [32.2GB]? 100%
Error: Canât have overlapping partitions.
(parted)
I see, that is what I thought⌠is it not a bad idea to delete the swap partition? do I need it? can it be re-built later on? and how do I delete it anyway? with parted?