Bare metal - how can i resize a partition ?
... / Bare metal - how can i re...
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Question

Bare metal - how can i resize a partition ?

by
LukasH
Created on 2022-04-02 16:33:37 (edited on 2024-09-04 14:23:34) in Dedicated Servers

Hi,

i have a "bare metal" server "Advance-1 Gen 2" with a 2×1.92 TB SSD NVMe Soft RAID disks.

When i installed the server, i created 2 partitions, but i did not use all the available disk space (only about 1.5 TB of the 1.9 TB available)

Now, i will like to assign that unassigned disk space to one of the existing partitions, in order to make it bigger.

The partition to resize is the one mounted on "/database" :

$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259:0 0 1.7T 0 disk
├─nvme0n1p1 259:1 0 511M 0 part /boot/efi
├─nvme0n1p2 259:2 0 976.6G 0 part
│ └─md2 9:2 0 976.4G 0 raid1 /
├─nvme0n1p3 259:3 0 15.6G 0 part [SWAP]
├─nvme0n1p4 259:4 0 488.3G 0 part
│ └─md4 9:4 0 488.2G 0 raid1 /database
└─nvme0n1p5 259:5 0 2M 0 part
nvme1n1 259:6 0 1.7T 0 disk
├─nvme1n1p1 259:7 0 511M 0 part
├─nvme1n1p2 259:8 0 976.6G 0 part
│ └─md2 9:2 0 976.4G 0 raid1 /
├─nvme1n1p3 259:9 0 15.6G 0 part [SWAP]
└─nvme1n1p4 259:10 0 488.3G 0 part
└─md4 9:4 0 488.2G 0 raid1 /database

Do you know if i can do the following to resize the "/database" partition:
1- remove the partition "md4" from the raid
2- increase the partition size of "md4"
3- put back the partition "md4" into the raid
4- increase the raid size
5- increase the file system size

Also, do you know it the procedure needs to be done for each of the disks, or if changing the raid size in one of the disks will also change the size in the other disk ?

Thanks for your help