2nd Usb Drive

Hi

Using my dietpi as a media center with plex. I have a 3TB usb disk for my media and have just purchased a new 4tb usb disk. I wish to use them both.

Is there a simple way of me combining both drives so they can be seen as one? Don’t want to have to have to handle two separate libraries with different paths in sonarr and radaar and plex etc.

On windows there are quite a few programs that can do this but I’m new to linux. I read about LVM but my setup doesn’t use that, not sure if it even can combine like I’m looking for.

thanks

Hi,

many thanks for your request. By default, DietPi did not offer such a function. But using LVM is quite a good option to perform what you are looking for. I found a nice guide on the web

https://askubuntu.com/questions/7002/how-to-set-up-multiple-hard-drives-as-one-volume

It just require little adjustments to fit to you environment. On a short test on my VM it was working quit well

root@DietPiVM1:~# lsblk -o name,fstype,label,size,ro,type,mountpoint
NAME             FSTYPE      LABEL  SIZE RO TYPE MOUNTPOINT
sda                                  10G  0 disk
└─sda1           ext4                10G  0 part /
sdb                                  10G  0 disk
└─sdb1           LVM2_member         10G  0 part
  └─media-volume ext4                19G  0 lvm  /mnt/media
sdc                                  10G  0 disk
└─sdc1           LVM2_member         10G  0 part
  └─media-volume ext4                19G  0 lvm  /mnt/media
sr0                                1024M  0 rom
sr1                                1024M  0 rom
root@DietPiVM1:~#

As you can see, I have 2 disks (sdb + sdc) each 10G. I created a LVM media volume of 19GB

root@DietPiVM1:~# df -h
Filesystem                Size  Used Avail Use% Mounted on
udev                      489M     0  489M   0% /dev
tmpfs                      99M  3.0M   96M   3% /run
/dev/sda1                 9.8G  3.2G  6.2G  35% /
tmpfs                     494M     0  494M   0% /dev/shm
tmpfs                     5.0M     0  5.0M   0% /run/lock
tmpfs                     494M     0  494M   0% /sys/fs/cgroup
tmpfs                     1.0G  4.0K  1.0G   1% /tmp
tmpfs                      50M   12K   50M   1% /var/log
tmpfs                      99M     0   99M   0% /run/user/0
/dev/mapper/media-volume   19G   44M   18G   1% /mnt/media

in theory you could create a LVM volume on your new disk, copy all your data from old hdd to the new LVM volume. Once completed, add the old hdd to the LVM volume.

Btrfs and XFS file systems have native support for multiple drives per volume, but I never tried it myself. Would be awesome to add such functionality to dietpi-drive_manager but as always, more ideas/tasks than time :roll_eyes:.