Ubuntu Support Template
Ubuntu Version:
24.04.3 LTS
Desktop Environment (if applicable):
N/A using Server edition
Problem Description:
I have an 8TB drive mounted as /mnt/storage but I am starting to run out of space. I have installed a 12TB drive and would like to combine them as a single drive at /mnt/storage
I am already backing up the important files from the 8TB drive onto a TrueNAS machine so I’m not concerned with either the 8 or 12TB drive failing.
Here is the output of sudo lsblk -e7 -o NAME,FSTYPE,LABEL,UUID,MOUNTPOINT
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 vfat F55D-A1A6 /boot/efi
├─sda2 ext4 5b373642-2d6c-439a-b197-ad46981efe17 /boot
└─sda3 LVM2_member 1IzlXO-biH4-eFEY-jPTf-z1up-CF0k-YuaiT0
└─ubuntu--vg-ubuntu--lv ext4 f871252e-884f-4440-a8a5-930ae66e2c3b /
sdb btrfs storage 1ef04a5a-2bef-4881-960d-f744f5c52912
└─sdb1 ext4 storage 97e6ff47-ac30-4f85-a1d8-203dc9e7fbc1 /mnt/storage
sdc
sdd
sr0
also the details for /dev/sdb and /dev/sdc from fdisk -l
Disk /dev/sdb: 7.28 TiB, 8001563222016 bytes, 15628053168 sectors
Disk model: HGST HUH721008AL
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 957B4776-F774-4456-B9AD-5B7095EAF701
Device Start End Sectors Size Type
/dev/sdb1 2048 15628052479 15628050432 7.3T Linux filesystem
Disk /dev/sdc: 10.91 TiB, 12000138625024 bytes, 23437770752 sectors
Disk model: HUH721212ALE601
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
I have space on TrueNAS to back up the entire 8TB and start from scratch if needed, but would rather not go that route if there’s another option.
From what I know, you can’t directly “extend” an existing ext4 filesystem to span another physical disk. Filesystems like ext4 are designed to live on a single block device.
- LVM: Back up the data, create a Volume Group using both disks (8TB + 12TB), then create a single Logical Volume and restore the data. This gives you one large logical filesystem.
Since you already have a full backup on TrueNAS, the cleanest and simplest approach is to rebuild using LVM or btrfs from scratch.
2 Likes
I do not use LVM, but have seen posts where they do not recommend running across two drives. IF either drive fails, you lose all data on both drives.
1 Like
You generally cannot safely extend an existing system partition onto a second physical drive in the usual sense: on Windows, the OS partition can only be extended into unallocated space on the same disk, and spanning it across another disk (dynamic/spanned volumes) is not recommended for system drives due to boot and recovery risks; on Linux/Ubuntu, this is possible only if the system uses LVM, where the second drive can be added to the volume group and the logical volume extended, but it requires careful planning and backups, so for most setups the best practice is to keep the OS on the original drive and use the second drive as a separate data partition.
I use LVM but not for striping data across multiple discs. More-so, for installing the root OS on, I like to use LVM snapshots on root to create backups of /etc /usr /root /home and parts of /var.
LVM can do what you want, but not after the fact. You have to plan it out from the beginning and set up partition tables (i.e. gpt), and then define your physical volumes, volume group(s), and logical volumes. The volume group would have to be extended across both discs but as already mentioned, if either disk fails, everything goes down. I wouldn’t go that route. As @fahad-tech recommended, would it not work for you to just mount the new device and extend your storage that way.
2 Likes
Thanks, this sounds like what I was expecting to have to do. I was just hoping there was an alternative to full backup, wipe drives, and rebuild as LVM.
Thanks, I’m accepting the risk of losing all the data if either drive fails as a tradeoff for being able to add a 12TB to my existing 8TB instead of having to not use the 8TB and buy a 20+TB drive.
As I noted in my original post. all the important data off the drives will be backed up onto the TrueNAS box. So if either drive fails and I have to rebuild, I will have the critical files already backed up and able to access/restore.
After this I’ll be working on cloud backup to ensure recovery if something happens to both boxes in my home.
Thanks, I wasn’t super clear in my original post. The OS is on dev/sda and that drive is left alone. dev/sdb is the current 8TB drive and I wanted to extend onto dev/sdc, the new 12TB drive.
So I already have the 2nd drive mounted for data and was looking to add a 3rd drive but keep them both combined as a single mount location.
I’m backing up dev/sda already so that will be untouched. From what @MesterPerfect posted I need to start over and build the LVM for sdb and sdc to both be members of.
Thanks, it sounds like I should have thought ahead and started with an LVM so I would have room to grow. Lesson learned.
I am using this machine as a media server and locally hosted immich photo storage instance to move off google photos and iCloud photos. If I just add the 12TB drive I would have to bifurcate the storage locations for all the media and that doesn’t seem manageable.
Instead I just want the OS to treat both drives as a single pool and handle data loss separately with my TrueNAS backups, and eventually cold storage cloud backups. I actually already screwed up a configuration once and lost a bunch of photos and was glad I had already started backing up to the other server and was able to restore them.
I understand, or at least came across, using LVM to extend storage between two or more drives, but how would I do that with btrfs?
I though LVM (logical volume manager) was what I would use to link sdb and sdc as one drive mounted to /mnt/data
/dev/sdb is already setup as btrfs with sdb1 as ext4.