Score:1

How to merge two partitions over SSH

xk flag

I'm currently renting a 2x1TB NVMe Server. What I want to do is having one 2TB partition instead of 2x1TB...The first partition is full and the customer service told me to follow these steps: https://linuxhint.com/how-to-mount-drive-in-ubuntu/?PARENT_IFRAME_NAME=area-ifr-ubersmith

But since I did that, I have the following disk partitions:

enter image description here

"/dev/mapper/vgroot-lvroot" --> is the partition on which the old data lays and "/dev/nvme1n1" --> is the new partition after I followed the steps above

I'm very frustrated, I'm new to that topic and would appreciate some help how to merge the two partitions. Data can be deleted, no problem...

May someone help?

Edit:

Click here for more partition overview

David avatar
cn flag
I would say time to go back to the people that gave you the steps to merge it. What version of Ubuntu are you using this does not look familiar.
Christian Nolden avatar
xk flag
Hello,thanks for your answer! The customer service is super bad and tells me its my issue basically. Im using: Ubuntu Bionic. I edited the above, so maybe you can see the logic of the partitions now.
Organic Marble avatar
us flag
Please cut and paste text into your question, do not use screenshots.
ar flag
It looks like you have two separate physical SSDs, The first one is `nvme0n1` and the second one is `nvme1n1`. Note, `nvme1n1` is not a partition, it is a whole SSD. The first SSD has two partitions, `nvme0n1p1`, the EFI System Partition (aka ESP) and `nvme0n1p2`. Inside `nvme0n1p2` is a logical volume `/dev/mapper/vgroot-lvroot` which is the Ubuntu system partition `/`.
Christian Nolden avatar
xk flag
And how can I merge the two physical SSDs? Can I create one partition with two physical SSDs? Also, not sure if I can delete everything cause even if I manage to do what I want, I dont know how to reinstall ubuntu over SSH
ru flag
You don't. They're not two partitions, they're completely separate NVMe disks/drives. The only way that you could 'merge' was to use LVM, but you won't be able to retain data if you make the second disk part of the LVM stack
Christian Nolden avatar
xk flag
I can delete everything, thats not a problem. Can I afterwards store the data then?
de flag
ob2
Your question doesn't make sense, `/dev/mapper/vgroot-lvroot` is a LVM partition on `/dev/nvme1n1p1`. Assuming your data is on `/dev/nvme1n1p2`, it will very hard to extend this volume as this is not LVM. Consider editing your message as a bad understanding of what you are doing will result data lost.
Christian Nolden avatar
xk flag
Thanks for your answers guys! Tbh I wasnt really sure what I want :-D But it seems like you are right @ob2. Data is on nvme1n1p2. But thats fine, as I said, I can delete everything and set everything up new. Is there a way to format everything in a way that I have one 2TB partition instead of that mess?
Score:0
de flag
ob2

Here a small process to install Ubuntu with two disks (raid0) and lvm.

  • Start the installation and answer to various questions until you reach Guided storage configuration step.
  • Ensure you have Set up this disk as an LVM group.

Seems Ubuntu installer has no option to add second disk to LVM pool during the installation, we will add later. Finish the installation and reboot the server.

  • Once logged as user, type sudo -s to have permanent root access.
  • Format the entire second disk as LVM with pvcreate /dev/sdb (adjust sdb if to your second disk drive).
  • Extend your volume group (ubuntu named it as ubuntu-vg) with the command vgextend ubuntu-vg /dev/vdb. If you suspect your volume group has different name, inspect your volume group with vgdisplay.
  • Extend your root partition (ubuntu named it as ubuntu-lv) with the command lvresize -r -L 1T /dev/ubuntu-vg/ubuntu-lv. You might adjust the value 1T with your free space returned by vgdisplay. You can also keep a bit free space so you have room to extend a bit more in case of you are close to have partition full, so you know you have to add one more disk soon.
Christian Nolden avatar
xk flag
By "start installation" you mean the whole ubuntu installation in general? Not sure if I can do that as I rent it from phoenixmap.
Christian Nolden avatar
xk flag
Do you think I could skip the first part and still do it after ubuntu being installed?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.