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
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.
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.
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.
/dev/sdb is already setup as btrfs with sdb1 as ext4.
I don't see how that would work. You can create a filesystem on an entire block device (sdb) but it is not a common or suggested way to do things. If you have a filesystem on the entire device, there will be no partition table or a need for a partition table so need for partitions (sdb1). This is discussed at the link below.