Mounting Drives

The last time I touched Unix of any flavor it was Solaris, so please forgive me. I’m am so very rusty.

I decided to build a home lab and get back into things. I’ve built, destroyed, and rebuilt my Ubuntu server more times in the last week than I can count. But I have a new issue. It will seem simple to you, but it’s scary to me.

I intend to add a log aggregator to this box, and it’s an HP min. So, I got a 1TB external drive and plugged into it. I also made the mistake of rebuilding a time or two with that drive plugged in so I think it may have hosted the OS once, and that’s where the partitions come from.

So, here is the problem. When I look at lsblk, it looks like this:

lsblk

While my fstab looks like this:

fstab

Now, from what my old mind can figure out, root "/" is mounted to a virtual drive of some sort, which is part of the 500GB drive inside the machine. I am reading up on how that works, but after all this time, it’s new to me. It was setup that way by the install, I do not know why.

The /boot, /boot.efi, and swap I don’t have problems with. But I want to mount the new drive and it looks like it already has some partitions.

The old drive looks like:
internal drive

And the new drive looks like this:
external drive

On the internal/old drive the first 2 partitions are mounted, but the third is not.

On the external/new drive none of them are mounted.

So, hoping I gave you enough information, is it safe to mount partition 3 on the old/internal drive, I ask because that’s where the "lvm" for the root "/" mount is and I don’t wanna mess it up somehow.

Second, is it safe to remove all 3 partitions from the new/external drive and create a new one, then mount it?

And lastly, I assume the best way to do this is still fdisk?

I’ve spent a lot of time relearning all of this. I’ve rebuilt the box so many times the idea of doing it again scares the hell out of me. So, I’m being cautious and asking the experts before I do anything that could kill the machine. I have DNS, mail, pihole, and a few other things on it right now, and they are all working. I would not like to have to reinstall them, again.

Thanks so much for any help, and advice. I feel very much the noob again.

Dennis

Asked By: dsb9938

||

Okay, here’s what I did. Removed the 3 partitions on the external drive, created one new one, mounted it in fstab, rebooted, set permissions.

The ‘lvm’ partition looks like something that grows as needed into the available space. I will leave it alone for now and read up on how lvm works. Then I can decide to leave it, or not.

I would like to thank everybody who who helped me in the comments. You guys made me think about things by asking questions, rather than telling me things. That made me go look things up, and hopefully learn something.

-Kudos

As a followup: lvm is forever. You cannot convert it to a regular partition. This being the case, I am just going to leave it and expand it to fill the drive. Thanks oh so much Ubuntu!

The end of the story:

I just resized the existing logical volume to fill the drive it was on. This is how I expected the install to go anyway. So now, I have my one normally partitioned drive, and the one logical. All is good in the world. As a side note, unless you need to span a bunch of drives to make a large partition (which I would rather do with RAID) I do not recommend LVM

Answered By: dsb9938