Trying to expand / add storage to our Ubuntu 18.04 server
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Trying to expand / add storage to our Ubuntu 18.04 server
Good Day,
I'm trying to expand the server storage on our Linux server. So a little back story. I'm a software engineer and develop mostly on Linux and mac. So I know linux (Ubuntu) but from a more software engineer point of view. I don't pretend to know many of the things when it comes to administering these servers. But I was tasked with adding 10tb of storage to our server that had currently 1. So this is what we did.
1.) For some reason they started by giving me 500gb to add. I was able to look up a tutorial and was able to add the 500gb without much problem using fdisk. Then I needed more. So they went ahead and gave me 10tb of storage.
2.) I went to tried to use fdisk to add the 10tb and saw that I couldn't do anything other than 2tb and I had to use something like gdisk. This is where the issues began.
The current system is currently all mbr. (/dev/sda) is the only volume / disk I have in the VM and it has some partition in the /dev/sda. This is where I'm confused... I tried converting the /dev/sda over to gpt but the system wouldn't boot. I revert back using a snap shot, and then tried to allow the VM to boot from EFI but that didn't work either. So I'm stuck with a disk with 11.3tb on it, but I don't know how to access the free space and create a partition(s) so that I could expand the storage.
FYI: I do have 2 (/dev/sda4 and 5) that are typed as Linux LVM. What are my options and please forgive my newish type questions. I feel that I'm overlooking something simple to handle this.
*** Here is what my fdisk -l prints out ***
Disk /dev/sda: 11.3 TiB, 12373800779776 bytes, 24167579648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x747b6714
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 999423 997376 487M 83 Linux
/dev/sda2 1001470 2147481599 2146480130 1023.5G 5 Extended
/dev/sda3 3196059648 4294967294 1098907647 524G 83 Linux
/dev/sda4 2147481600 3196059647 1048578048 500G 8e Linux LVM
/dev/sda5 1001472 2147481599 2146480128 1023.5G 8e Linux LVM
C'mon folks, read the initial post - the space has been provided as a single enlarged "disk". S?he even tried to convert it to gpt to get at the space.
The concise answer is there is no simple answer - if it were me I'd see if I could get the storage admins to revert the situation to as it was before, and provide the extra space as a separate disk. That can be added to the LVM environment much more simply. Whilst we're waiting, let's see this output.
/dev/sda
---/dev/sda1 - boot (i believe)
---/dev/sda2 = 2TB
/dev/sdb - 3TB Unallocated Space
Both are using LVM2 Physical Volumes
So, If I need to extend /dev/sda2 to now include all 3TB in /dev/sdb Is this where I can use LVM commands to extend /dev/sda2? if so, what steps or tutorials could I follow to do this.
/dev/sda
---/dev/sda1 - boot (i believe)
---/dev/sda2 = 2TB
/dev/sdb - 3TB Unallocated Space
Both are using LVM2 Physical Volumes
So, If I need to extend /dev/sda2 to now include all 3TB in /dev/sdb Is this where I can use LVM commands to extend /dev/sda2? if so, what steps or tutorials could I follow to do this.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.