LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-15-2019, 01:53 PM   #1
cis4life
LQ Newbie
 
Registered: May 2019
Posts: 14

Rep: Reputation: Disabled
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

Partition table entries are not in disk order.


Disk /dev/mapper/vhbdfcdocker1--vg-root: 1.5 TiB, 1634843230208 bytes, 3193053184 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


Disk /dev/mapper/vhbdfcdocker1--vg-swap_1: 976 MiB, 1023410176 bytes, 1998848 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
 
Old 05-15-2019, 02:30 PM   #2
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,137
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
If you are partitioning a disk of 2 TiB or larger, you need to use GPT.

This is for arch, but has information
https://wiki.archlinux.org/index.php/Partitioning
https://wiki.archlinux.org/index.php/Parted
https://wiki.archlinux.org/index.php/File_systems
 
Old 05-16-2019, 01:28 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Depends a bit on which VM system you are using eg kvm with libvirt:

1 this increases size of current disk https://www.maxoberberger.net/blog/2...-kvm-disk.html
2 This adds an extra disk https://www.cyberciti.biz/faq/how-to...virsh-command/ (for more examples, google "virsh attach-disk" )

Several different examples in Redhat docs as well
 
Old 05-16-2019, 02:21 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
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.
Code:
sudo lsblk -f
 
1 members found this post helpful.
Old 05-16-2019, 09:19 AM   #5
cis4life
LQ Newbie
 
Registered: May 2019
Posts: 14

Original Poster
Rep: Reputation: Disabled
Exactly.

The disk is currently just 1 disk.

Here is the output you were looking for.

NAME FSTYPE LABEL UUID MOUNTPOINT
fd0
sda
├─sda1 ext2 1f052f23-e122-4271-9840-8a6fcf5a3c87 /boot
├─sda2
├─sda3
├─sda4 LVM2_member f2dA3R-gs3d-kzWV-mISs-z5tu-q5FJ-MypTkA
│ └─vhbdfcdocker1--vg-root ext4 b59b3302-f8a2-468b-ab83-9b7d7acb8512 /
└─sda5 LVM2_member LeDStt-BvbA-aZBN-4WWs-KXTW-lvY1-H4SHxF
├─vhbdfcdocker1--vg-root ext4 b59b3302-f8a2-468b-ab83-9b7d7acb8512 /
└─vhbdfcdocker1--vg-swap_1 swap 0c071441-ca2a-463c-a8bc-e0417b917245 [SWAP]
sr0
 
Old 05-20-2019, 02:11 PM   #6
cis4life
LQ Newbie
 
Registered: May 2019
Posts: 14

Original Poster
Rep: Reputation: Disabled
Ok,

I now have a fresh server with the following...

/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.

Thanks for all the help thus far.
 
Old 05-20-2019, 03:51 PM   #7
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by cis4life View Post
Ok,

I now have a fresh server with the following...

/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.

Thanks for all the help thus far.
Yep: https://www.tecmint.com/extend-and-r...lvms-in-linux/
 
Old 05-21-2019, 02:13 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
If it's already a pv, you simply need to add it to the vg and expand the lv.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to use external storage to expand unexpandable Android phones LXer Syndicated Linux News 0 10-11-2013 10:20 AM
expand SATA storage with SAS ? how? nicolasdiogo Linux - Hardware 4 07-13-2011 04:33 AM
LXer: Linux-based NAS storage devices expand capacity LXer Syndicated Linux News 0 12-22-2007 01:20 PM
How can I expand the coverage of our Wireless connections? depam Linux - Hardware 8 08-19-2006 05:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration