Avatar of Chad Killion
Chad Killion
 asked on

How do I extend an xfs partition across multiple disks in Redhat 8 / RockyLinux 8?

I need help extending a partition across 2 physical disks in a RockyLinux / Redhat 8 VM.  I have a new installation which has a 50TB disk on /dev/sdb, this disk has a partition on it and is mounted to /data on the server.  I would like to extend this partition to 100TB by adding an additional 50TB disk.  I know there is a way to do this, but I always have trouble coming up with it.  The necessary data I *think* is as follows:

[root@v-os-temp-repo ~]# df -h
Filesystem           Size  Used Avail Use% Mounted on
devtmpfs             189G     0  189G   0% /dev tmpfs                189G     0  189G   0% /dev/shm tmpfs                189G  8.7M  189G   1% /run tmpfs                189G     0  189G   0% /sys/fs/cgroup /dev/mapper/rl-root   35G  2.6G   33G   8% / /dev/sdb1             46T  325G   46T   1% /data /dev/sda1           1014M  279M  736M  28% /boot tmpfs                 38G     0   38G   0% /run/user/0

Open in new window


[root@v-os-temp-repo ~]# fdisk -l
Disk /dev/sda: 40 GiB, 42949672960 bytes, 83886080 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: 0x5f8bb7da Device     Boot   Start      End  Sectors Size Id Type /dev/sda1  *       2048  2099199  2097152   1G 83 Linux /dev/sda2       2099200 83886079 81786880  39G 8e Linux LVM Disk /dev/sdb: 50 TiB, 54975581388800 bytes, 107374182400 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: gpt Disk identifier: 28D2A095-4102-43FD-BA54-7BAC1A3130B9 Device     Start         End     Sectors  Size Type /dev/sdb1   2048 97656250367 97656248320 45.5T Linux filesystem Disk /dev/sdc: 50 TiB, 54975581388800 bytes, 107374182400 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/rl-root: 35 GiB, 37576769536 bytes, 73392128 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/rl-swap: 4 GiB, 4294967296 bytes, 8388608 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

Open in new window

So as you can see, I have a second 50TB disk on /dev/sdc and I would like to present the path /data with a single 100TB partition that spans /dev/sdb and /dev/sdc.  The partition on /dev/sdb1 is formatted with xfs currently. How do I accomplish this?

RedhatVirtualization

Avatar of undefined
Last Comment
Chad Killion

8/22/2022 - Mon
Seth Simmons

I have a new installation which has a 50TB disk on /dev/sdb...

what is this disk?  a hardware raid of some sort?

I would like to extend this partition to 100TB by adding an additional 50TB disk.

how to answer that would be based on the answer to the first question
if it is a hardware raid, can you not extend the array with the extra storage?
Chad Killion

ASKER
This is a virtual machine and both 50tb disks are just vmdks and look like a single physical disk to the OS. My underlying datastores in VMware are limited to 55tb each so I can’t extend the disk to the OS any larger than it is, so a second disk is my only option. 
Seth Simmons

thought it was bare metal since you said you have 2 physical disks
even if you had more space in your data store, vmdk size limit is 62tb
the only way i can see stitching them together is to create a new volume group using sdc, move the 325gb to there, then delete sdb1 and expand the volume group to sdb 

Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Chad Killion

ASKER
Sorry, I should have termed better. There is nothing I care about on sdb1. I can blow the whole thing away. How would I go about doing this with volume groups/lvm ?  Just not a Linux guy so I don’t know the process. 
ASKER CERTIFIED SOLUTION
Seth Simmons

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Chad Killion

ASKER
OK so I used the guide to create a logical volume of 99T called "lv_data" in a volume group called "LVMvgData".  Now how would I create a "partition" that would reside in the lv and use that space?  I didnt create any partitions on the disks before using pvcreate, vgcreate, and lvcreate.  Just raw new VMDK disks.  Now Iogical volume, but I need to create a filesystem on it to use that 99T.  I am not familiar with what is next? output of lvs looks like the following:

[root@v-os-temp-repo ~]# lvs

  LV      VG        Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lv_data LVMvgData -wi-a-----  99.00t                                                    
  root    rl        -wi-ao---- <35.00g                                                    
  swap    rl        -wi-ao----   4.00g  

Open in new window



Chad Killion

ASKER
NVM, I think i got it.  I missed the step where i needed to create a partition on the disks prior to pvcreate steps.  I was able to create and format a logical volume the way I needed.  Thanks for the link to get me going.  
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.