Seedhost Dedicated Server Setup
Stuffs I installed on 2020-July-26 after purchasing a dedicated server from Seedhost. The ultimate purpose is to setup my personal home Plex Media Server that I could access from Cloud.
Order Info Ubuntu, 4x4TB HDD. I ordered 8G RAM but they installed a 16G ones, no RAID.
Server Info
root@server663:/etc# uname -a
Linux server663 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
root@server663:/etc# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
Installed:
FTP Server: vsftp
Sonarr
Radarr
Server 2 Info 32T
root@server1525:~# uname -a
Linux server1525 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Filesystem Size Used Avail Use% Mounted on
udev 16G 0 16G 0% /dev
tmpfs 3.2G 760K 3.2G 1% /run
/dev/sda4 3.9G 2.5G 1.2G 68% /
tmpfs 16G 0 16G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/sda2 1008M 112M 846M 12% /boot
/dev/sda1 300M 276K 300M 1% /boot/efi
/dev/sda5 7.3T 93M 6.9T 1% /home
tmpfs 3.2G 0 3.2G 0% /run/user/0
root@server1525:~# fdisk -l
Disk /dev/sda: 7.3 TiB, 8001563222016 bytes, 15628053168 sectors
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: 9A0C0E2C-2CA0-C24B-B344-7E9442C7B494
Device Start End Sectors Size Type
/dev/sda1 2048 616447 614400 300M EFI System
/dev/sda2 616448 2713599 2097152 1G Linux extended boot
/dev/sda3 2713600 11102207 8388608 4G Linux swap
/dev/sda4 11102208 19490815 8388608 4G Linux root (x86-64)
/dev/sda5 19490816 15628053134 15608562319 7.3T Linux home
Disk /dev/sdb: 7.3 TiB, 8001563222016 bytes, 15628053168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/sdc: 7.3 TiB, 8001563222016 bytes, 15628053168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/sdd: 7.3 TiB, 8001563222016 bytes, 15628053168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
dedi44370
First subscribe on May 19, 2022. This seedbox will be used to download tv series.
root@ds44370:~# uname -a
Linux ds44370 4.15.0-177-generic #186-Ubuntu SMP Thu Apr 14 20:23:07 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
root@ds44370:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
Codename: bionic
root@ds44370:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 14.6T 0 disk
├─sda1 8:1 0 300M 0 part /boot/efi
├─sda2 8:2 0 1G 0 part /boot
├─sda3 8:3 0 4G 0 part [SWAP]
└─sda4 8:4 0 512G 0 part /
sdb 8:16 0 14.6T 0 disk
sdc 8:32 0 14.6T 0 disk
sdd 8:48 0 14.6T 0 disk
root@ds44370:~# fdisk -l
Disk /dev/sda: 14.6 TiB, 16000900661248 bytes, 31251759104 sectors
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: 0FF23991-071C-2D48-BDD4-B86275A213A1
Device Start End Sectors Size Type
/dev/sda1 2048 616447 614400 300M EFI System
/dev/sda2 616448 2713599 2097152 1G Linux extended boot
/dev/sda3 2713600 11102207 8388608 4G Linux swap
/dev/sda4 11102208 1084844031 1073741824 512G Linux root (x86-64)
Disk /dev/sdb: 14.6 TiB, 16000900661248 bytes, 31251759104 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/sdc: 14.6 TiB, 16000900661248 bytes, 31251759104 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/sdd: 14.6 TiB, 16000900661248 bytes, 31251759104 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
root@ds44370:~# inxi -F
System: Host: ds44370 Kernel: 4.15.0-177-generic x86_64 bits: 64 Console: tty 1 Distro: Ubuntu 18.04.6 LTS
Machine: Device: server System: Dell product: PowerEdge R240 serial: B9K67F3
Mobo: Dell model: 0DRR0P v: A04 serial: .B9K67F3.CNWS30011S0123. UEFI: Dell v: 2.7.1 date: 10/12/2021
CPU: 6 core Intel Xeon E-2286G (-MT-MCP-) cache: 12288 KB
clock speeds: max: 4900 MHz 1: 1289 MHz 2: 4236 MHz 3: 4237 MHz 4: 4197 MHz 5: 4726 MHz 6: 4254 MHz
7: 4222 MHz 8: 4552 MHz 9: 3977 MHz 10: 3734 MHz 11: 4248 MHz 12: 4326 MHz
Graphics: Card: Matrox Systems Integrated Matrox G200eW3 Graphics Controller
Display Server: Moba/X 12.4 driver: mgag200 Resolution: [email protected]
OpenGL: renderer: llvmpipe (LLVM 10.0.0, 256 bits) version: 3.3 Mesa 20.0.8
Network: Card-1: Broadcom and subsidiaries NetXtreme BCM5720 Gigabit Ethernet PCIe driver: tg3
IF: eno1 state: up speed: 1000 Mbps duplex: full mac: b8:cb:29:b2:f5:51
Card-2: Broadcom and subsidiaries NetXtreme BCM5720 Gigabit Ethernet PCIe driver: tg3
IF: eno2 state: up speed: 1000 Mbps duplex: full mac: b8:cb:29:b2:f5:52
Drives: HDD Total Size: 64003.6GB (0.0% used)
ID-1: /dev/sda model: TOSHIBA_MG08ACA1 size: 16000.9GB
ID-2: /dev/sdb model: TOSHIBA_MG08ACA1 size: 16000.9GB
ID-3: /dev/sdc model: TOSHIBA_MG08ACA1 size: 16000.9GB
ID-4: /dev/sdd model: TOSHIBA_MG08ACA1 size: 16000.9GB
Partition: ID-1: / size: 504G used: 2.8G (1%) fs: ext4 dev: /dev/sda4
ID-2: /boot size: 1008M used: 117M (13%) fs: ext2 dev: /dev/sda2
ID-3: swap-1 size: 4.29GB used: 0.00GB (0%) fs: swap dev: /dev/sda3
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 37.0C mobo: N/A
Fan Speeds (in rpm): cpu: N/A
Info: Processes: 220 Uptime: 2:52 Memory: 247.5/31883.7MB Client: Shell (bash) inxi: 2.3.56
Seems like by default the FREE is not shown in sda5
(parted) print free
Model: ATA TOSHIBA MG08ACA1 (scsi)
Disk /dev/sda: 16000900661248B
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
17408B 1048575B 1031168B Free Space
1 1048576B 315621375B 314572800B fat32 efi boot, esp
2 315621376B 1389363199B 1073741824B ext2 11591081-/boot
3 1389363200B 5684330495B 4294967296B linux-swap(v1) 11591081-swap
4 5684330496B 555440144383B 549755813888B ext4 11591081-/
555440144384B 16000900644351B 15445460499968B Free Space
hetzner
uname -a
Linux Ubuntu-1804-bionic-64-minimal 4.15.0-163-generic #171-Ubuntu SMP Fri Nov 5 11:55:11 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
root@Ubuntu-1804-bionic-64-minimal ~ # lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
Codename: bionic
root@Ubuntu-1804-bionic-64-minimal ~ # lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 1 14.6T 0 disk
├─sda1 8:1 1 32G 0 part [SWAP]
├─sda2 8:2 1 1G 0 part /boot
├─sda3 8:3 1 512G 0 part /
└─sda4 8:4 1 1M 0 part
sdb 8:16 1 14.6T 0 disk
├─sdb1 8:17 1 32G 0 part
├─sdb2 8:18 1 512M 0 part
├─sdb3 8:19 1 14.5T 0 part
└─sdb4 8:20 1 1M 0 part
sdc 8:32 1 14.6T 0 disk
├─sdc1 8:33 1 32G 0 part
├─sdc2 8:34 1 512M 0 part
├─sdc3 8:35 1 14.5T 0 part
└─sdc4 8:36 1 1M 0 part
sdd 8:48 1 14.6T 0 disk
├─sdd1 8:49 1 32G 0 part
├─sdd2 8:50 1 512M 0 part
├─sdd3 8:51 1 14.5T 0 part
└─sdd4 8:52 1 1M 0 part
root@Ubuntu-1804-bionic-64-minimal ~ # df -h
Filesystem Size Used Avail Use% Mounted on
udev 32G 0 32G 0% /dev
tmpfs 6.3G 824K 6.3G 1% /run
/dev/sda3 503G 1.9G 476G 1% /
tmpfs 32G 0 32G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 32G 0 32G 0% /sys/fs/cgroup
/dev/sda2 975M 76M 848M 9% /boot
tmpfs 6.3G 0 6.3G 0% /run/user/0
root@Ubuntu-1804-bionic-64-minimal ~ # fdisk -l
Disk /dev/sda: 14.6 TiB, 16000900661248 bytes, 31251759104 sectors
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: 2D613A9E-510A-49F1-8CAF-5E48DC882332
Device Start End Sectors Size Type
/dev/sda1 4096 67112959 67108864 32G Linux swap
/dev/sda2 67112960 69210111 2097152 1G Linux filesystem
/dev/sda3 69210112 1142951935 1073741824 512G Linux filesystem
/dev/sda4 2048 4095 2048 1M BIOS boot
Partition table entries are not in disk order.
Disk /dev/sdb: 14.6 TiB, 16000900661248 bytes, 31251759104 sectors
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: 3A83E4AF-1627-40AE-A70F-F8FF189402BE
Device Start End Sectors Size Type
/dev/sdb1 4096 67112959 67108864 32G Linux RAID
/dev/sdb2 67112960 68161535 1048576 512M Linux RAID
/dev/sdb3 68161536 31251759070 31183597535 14.5T Linux RAID
/dev/sdb4 2048 4095 2048 1M BIOS boot
Partition table entries are not in disk order.
Disk /dev/sdc: 14.6 TiB, 16000900661248 bytes, 31251759104 sectors
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: 11C66F48-8819-4CC3-BC5C-25B45975280B
Device Start End Sectors Size Type
/dev/sdc1 4096 67112959 67108864 32G Linux RAID
/dev/sdc2 67112960 68161535 1048576 512M Linux RAID
/dev/sdc3 68161536 31251759070 31183597535 14.5T Linux RAID
/dev/sdc4 2048 4095 2048 1M BIOS boot
Partition table entries are not in disk order.
Disk /dev/sdd: 14.6 TiB, 16000900661248 bytes, 31251759104 sectors
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: ED357206-D629-4F75-89C0-961EA67A8B5C
Device Start End Sectors Size Type
/dev/sdd1 4096 67112959 67108864 32G Linux RAID
/dev/sdd2 67112960 68161535 1048576 512M Linux RAID
/dev/sdd3 68161536 31251759070 31183597535 14.5T Linux RAID
/dev/sdd4 2048 4095 2048 1M BIOS boot
Partition table entries are not in disk order.
root@Ubuntu-1804-bionic-64-minimal ~ # inxi -F
System: Host: Ubuntu-1804-bionic-64-minimal Kernel: 4.15.0-163-generic x86_64 bits: 64 Console: tty 1
Distro: Ubuntu 18.04.6 LTS
Machine: Device: desktop Mobo: FUJITSU model: D3417-B1 v: S26361-D3417-B1 serial: 50261622
UEFI [Legacy]: FUJITSU // American Megatrends v: V5.0.0.11 R1.29.0.SR.1 for D3417-B1x date: 05/13/2020
CPU: Quad core Intel Xeon E3-1275 v5 (-MT-MCP-) cache: 8192 KB
clock speeds: max: 4000 MHz 1: 1147 MHz 2: 2229 MHz 3: 2263 MHz 4: 1830 MHz 5: 2229 MHz 6: 2206 MHz
7: 2268 MHz 8: 1851 MHz
Graphics: Card: Intel HD Graphics P530
Display Server: N/A driver: N/A tty size: 237x43 Advanced Data: N/A for root out of X
Network: Card: Intel Ethernet Connection (2) I219-LM driver: e1000e
IF: enp0s31f6 state: up speed: 1000 Mbps duplex: full mac: 90:1b:0e:a1:97:b1
Drives: HDD Total Size: 64003.6GB (0.1% used)
ID-1: /dev/sda model: ST16000NM003G size: 16000.9GB
ID-2: /dev/sdb model: ST16000NM003G size: 16000.9GB
ID-3: /dev/sdc model: ST16000NM003G size: 16000.9GB
ID-4: /dev/sdd model: ST16000NM003G size: 16000.9GB
Partition: ID-1: / size: 503G used: 2.1G (1%) fs: ext4 dev: /dev/sda3
ID-2: /boot size: 975M used: 76M (9%) fs: ext3 dev: /dev/sda2
ID-3: swap-1 size: 34.36GB used: 0.00GB (0%) fs: swap dev: /dev/sda1
RAID: Device-1: /dev/md2 - inactive components: online: none spare: sdc3 sdd3 sdb3
Device-2: /dev/md1 - inactive components: online: none spare: sdc2 sdd2 sdb2
Device-3: /dev/md0 - inactive components: online: none spare: sdc1 sdd1 sdb1
Sensors: System Temperatures: cpu: 38.0C mobo: N/A
Fan Speeds (in rpm): cpu: N/A
Info: Processes: 174 Uptime: 3:06 Memory: 261.2/64198.9MB Init: systemd runlevel: 5
Client: Shell (bash) inxi: 2.3.56
root@Ubuntu-1804-bionic-64-minimal ~ # lvmdiskscan
/dev/sda1 [ 32.00 GiB]
/dev/sda2 [ 1.00 GiB]
/dev/sda3 [ 512.00 GiB]
0 disks
3 partitions
0 LVM physical volume whole disks
0 LVM physical volumes
Configure Storage
By default the server came with 4 HDD, with one one the partition sda5
from sda
used for /home
. The rest are all unpartitioned. We will use lvm
to create a single logical drive for our rTorrent downloads.
sudo apt install lvm2 -y
Check existing disks
deluge23@server663:~$ sudo lvmdiskscan
/dev/sda2 [ 1.00 GiB]
/dev/sda3 [ 4.00 GiB]
/dev/sda4 [ 30.00 GiB]
/dev/sda5 [ 3.60 TiB]
/dev/sdb [ <3.64 TiB]
/dev/sdc [ <3.64 TiB]
/dev/sdd [ <3.64 TiB]
3 disks
4 partitions
0 LVM physical volume whole disks
0 LVM physical volumes
Create physical volume
sudo pvcreate /dev/sdb /dev/sdc /dev/sdd
output
deluge23@server663:~$ sudo pvcreate /dev/sdb /dev/sdc /dev/sdd
Physical volume "/dev/sdb" successfully created.
Physical volume "/dev/sdc" successfully created.
Physical volume "/dev/sdd" successfully created.
Note @2022/05/20: Exccute the following if show
Device /dev/sdb excluded by filter
. This is probably because those drives were part of mdstat RAID before. Which is the case in Hetzner server.
root@Ubuntu-1804-bionic-64-minimal ~ # pvcreate /dev/sdb /dev/sdc /dev/sdd
Device /dev/sdb excluded by a filter.
Device /dev/sdc excluded by a filter.
Device /dev/sdd excluded by a filter.
root@Ubuntu-1804-bionic-64-minimal ~ # wipefs -a /dev/sdb
/dev/sdb: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
/dev/sdb: 8 bytes were erased at offset 0xe8d7ffffe00 (gpt): 45 46 49 20 50 41 52 54
/dev/sdb: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
/dev/sdb: calling ioctl to re-read partition table: Success
root@Ubuntu-1804-bionic-64-minimal ~ # wipefs -a /dev/sdc
/dev/sdc: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
/dev/sdc: 8 bytes were erased at offset 0xe8d7ffffe00 (gpt): 45 46 49 20 50 41 52 54
/dev/sdc: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
/dev/sdc: calling ioctl to re-read partition table: Success
root@Ubuntu-1804-bionic-64-minimal ~ # wipefs -a /dev/sdd
/dev/sdd: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
/dev/sdd: 8 bytes were erased at offset 0xe8d7ffffe00 (gpt): 45 46 49 20 50 41 52 54
/dev/sdd: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
/dev/sdd: calling ioctl to re-read partition table: Success
root@Ubuntu-1804-bionic-64-minimal ~ # pvcreate /dev/sdb /dev/sdc /dev/sdd
Physical volume "/dev/sdb" successfully created.
Physical volume "/dev/sdc" successfully created.
Physical volume "/dev/sdd" successfully created.
Create volume group named media
sudo vgcreate media /dev/sdb /dev/sdc /dev/sdd
Create logical group named downloads
from media
physical volume
sudo lvcreate -L 5T -n downloads media
To grow using ALL available space
sudo lvresize -l +100%FREE media/downloads
If it has file system, can auto resize it by using --resizefs
flag. We don't use it now because it is still raw.
sudo lvresize -l +100%FREE --resizefs media/downloads
Finally, create ext4 file system and mount it.
sudo mkfs -t ext4 /dev/media/downloads
mkdir /mnt/downloads
mount /dev/media/downloads /mnt/downloads
Set permission so all user can write to it.
chmod -R 777 /mnt/downloads/
Configure /home
as lvm
Since the sda5
is used to mount /home
, and we want to create lvm
for it, we have to unmount it first.
Use lsof /home
and kill all pid. Then unmount it.
umount -l /home
Backup all the contents from /home
into /root
. Extending the vg
will wipe all the existing files! But since we do this first, we don't have to backup. I only create lvm
after I installed radarr and ruTorrent, so I have to manually backup first.
Add only the sda5
partition into our existing vg
called media
.
vgextend media /dev/sda5
Create lv
called home
.
lvcreate -l +100%FREE -n home media
Create file system for the new /home
partition
sudo mkfs -t ext4 /dev/media/home
To verify the vg
is created successfully, check the path using vgdisplay -v
Mount the /home
partition.
# mount home
sudo mount /dev/media/home /home
Copy back the previously backed up /home
dir
cp -rT /root/deluge23/deluge23 /home/deluge23
Note: Use -T
option prevents the contents of /etc/skel from being copied to a new folder /home/user/skel should the folder /home/user exist. @ref: https://superuser.com/questions/61611/how-to-copy-with-cp-to-include-hidden-files-and-hidden-directories-and-their-con
Final result
So we created 2 Logical Volumes, home
and downloads
from media
volume group.
root@server663:~# lvdisplay
--- Logical volume ---
LV Path /dev/media/downloads
LV Name downloads
VG Name media
LV UUID 4o3bfE-eUVC-dAom-nzvD-XqXz-y05h-orej9c
LV Write Access read/write
LV Creation host, time server663, 2020-07-26 23:56:04 +0200
LV Status available
# open 0
LV Size <14.40 TiB
Current LE 3773716
Segments 4
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
--- Logical volume ---
LV Path /dev/media/home
LV Name home
VG Name media
LV UUID cCs5Ln-x8f1-6Op8-wXvu-wR7W-jVzk-9KgIT0
LV Write Access read/write
LV Creation host, time server663, 2020-07-27 00:32:15 +0200
LV Status available
# open 0
LV Size 128.00 GiB
Current LE 32768
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1
Finally, add the following to /etc/fstab
so that it is mounted. Use blkid
to find out the UUID.
...
# /dev/mapper/media-home
UUID=0f17c828-9905-4680-a09e-59e8da34a6a5 /home ext4 defaults 0 0
# /dev/mapper/media-downloads
UUID=71573d1b-cccb-47a2-bfd3-fedf01c6ce82 /mnt/downloads ext4 defaults 0 0
BitTorrent Client
rTorrent
rTorrent is the daemon (backend) of ruTorrent.
sudo apt-get install rtorrent -y
Install screen
used by service file.
sudo apt install screen
Start rTorrent as service
sudo nano /etc/systemd/system/rtorrent.service
[Unit]
Description=rTorrent
After=network.target
[Service]
User=deluge23
Group=deluge23
Type=forking
KillMode=none
ExecStart=/usr/bin/screen -d -m -fa -S rtorrent /usr/bin/rtorrent
ExecStop=/usr/bin/killall -w -s 2 /usr/bin/rtorrent
WorkingDirectory=%h
[Install]
WantedBy=default.target
Auto start and start the service.
sudo systemctl enable rtorrent
sudo systemctl start rtorrent
sudo systemctl status rtorrent
To see the log:
sudo journalctl -f -u rtorrent
ruTorrent
Frontend to rTorrent.
# Install apache webserver to serve ruTorrent webpage
sudo apt-get install -y apache2 apache2-utils libapache2-mod-php
# ruTorrent is powered by PHP
# ori
# sudo apt-get install -y php php-pear php-dev php7.2-dev php7.2-zip php7.2-curl php7.2-gd php7.2-mysql php7.2-mcrypt php7.2-xml libapache2-mod-php7.2 libmcrypt-dev php7.2-fpm
# modified on 5/18/2022 due to missing php7.2-mcrypt. That missing mcrypt should be instgalled using pecl in next command
sudo apt-get install -y php php-pear php-dev php7.2-dev php7.2-zip php7.2-curl php7.2-gd php7.2-mysql php7.2-xml libapache2-mod-php7.2 libmcrypt-dev php7.2-fpm
# mcrypt
sudo pecl channel-update pecl.php.net
sudo pecl install mcrypt-1.0.1
# Apache SCGI
sudo apt-get install libapache2-mod-scgi
# Packages for plugins used by ruTorrent
sudo apt-get install unrar unzip ffmpeg mediainfo curl sqlite3 sox python -y
# seems like rtorrent is using python2, but we install both why not?
sudo apt-get install python-pip python3-pip -y
pip install cloudscraper
pip3 install cloudscraper
# Okay, we have all the requirements to run ruTorrent, now install ruTorrent
cd /var/www/html
sudo apt install git
sudo git clone https://github.com/Novik/ruTorrent.git
# Permissions. Make sure only our user have access to it
sudo chown -R deluge23:www-data ruTorrent/ && sudo chmod -R 770 ruTorrent/
# config file. initally downloaded from pastebin but have format error DOS32 line end error! So cat EOF instead!
cat <<EOF > ~/.rtorrent.rc
#min_peers = 50
#max_peers = 150
#min_peers_seed = 50
#max_peers_seed = 150
#max_uploads = 80
#tracker_numwant = -1
#throttle.global_down.max_rate.set_kb = 0
#throttle.global_up.max_rate.set_kb = 0
directory = /mnt/downloads/rtorrent-dl/deluge23
#schedule = watch_directory,5,5,load_start=~/downloads/watch/rtorrent/*.torrent
port_range = 45000-60000
port_random = yes
check_hash = no
pieces.hash.on_completion.set = no
use_udp_trackers = yes
encryption = allow_incoming,enable_retry,try_outgoing
dht = disable
peer_exchange = no
network.http.ssl_verify_peer.set = 0
encoding_list = UTF-8
set_xmlrpc_size_limit = 4097152
session = ~/.rtorrent.session
# bind = 5.79.68.67
scgi_port = 127.0.0.1:5000
# execute = {sh,-c,/usr/bin/php /home42/deluge23/www/deluge23.shell.seedhost.eu/deluge23/rutorrent/php/initplugins.php deluge23 &}
#log.open_file = rtorrent.log, (cat,/home42/deluge23/rtorrent.log)
#log.add_output = debug, rtorrent.log
#log.add_output = torrent_debug, rtorrent.log
#log.add_output = critical, rtorrent.log
#log.add_output = storage_debug, rtorrent.log
# Preallocate files; reduces defragmentation on filesystems.
system.file.allocate = 1
EOF
# set default download dir for ruTorrent
mkdir downloads
sed -i 's/#directory = .\//directory = ~\/downloads/' .rtorrent.rc
# create rutorrent session dir
mkdir ~/.rtorrent.session
sed -i 's/#session = .\/session/session = .\/rtorrent.session/' .rtorrent.rc
Enable HTTPRPC
in plugins.ini
so that Radarr and Sonarr can send API to rTorrent.
nano /var/www/html/ruTorrent/conf/plugins.ini
[httprpc]
enabled = yes
[rpc]
enabled = no
...
Disable _cloudflare
in plugins.ini
to avoid plugin error when loading ruTorrent. Seems like in recent install even pip install cloudscraper
in ruTorrent 4.0 will still give error!
nano /var/www/html/ruTorrent/conf/plugins.ini
...
[_cloudflare]
enabled = no
Note: You can find list of plugins in
/var/www/html/ruTorrent/plugins
and define a block to set its properties.
Securing ruTorrent
Require user to login. Useful if the rutorrent is not the same host as Radarr or Sonarr.
@ref: https://htpc.xyz/en/2021/03/19/install-rtorrent-rutorrent-on-ubuntu-20-04/
- Create the following sites
nano /etc/apache2/sites-available/001-rutorrent.conf
<VirtualHost *:80>
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
CustomLog /var/log/apache2/rutorrent.log vhost_combined
ErrorLog /var/log/apache2/rutorrent_error.log
SCGIMount /RPC2 127.0.0.1:5000
<Directory "/var/www/html/ruTorrent">
AuthName "Tits or GTFO"
AuthType Basic
Require valid-user
AuthUserFile /var/www/html/ruTorrent/.htpasswd
</Directory>
<location /RPC2>
AuthName "rTorrent secure access"
AuthType Basic
AuthBasicProvider file
AuthUserFile /home/deluge23/rtorrent-htpasswd
Require user deluge23
</location>
#XMLRPC
#ProxyPass /RPC2 scgi://127.0.0.1:5000
</VirtualHost>
- Generate password for the web UI. I use the same username and password as my username.
sudo htpasswd -c /var/www/html/ruTorrent/.htpasswd deluge23
- Generate password for the SCGI, used when Radarr/Sonarr is communicating with rTorrent. I use the same username and password as my username.
sudo htpasswd -c /home/deluge23/rtorrent-htpasswd deluge23
- Disable default site and enable ruTorrent site.
sudo a2dissite 000-default.conf
sudo a2ensite 001-rutorrent.conf
- Restart apache2
sudo systemctl restart apache2
All done! You should see a prompt when login.
Make sure to also configure username and password in Radarr and Sonarr download client. Use the credentials created in step 3.
Media Manager Bot
Radarr
For movies. Mono is used for both Radarr and Sonarr.
# Update Mono repo
sudo apt install gnupg ca-certificates
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
# Install mono
sudo apt install mono-devel
# Other dependencies
sudo apt install curl mediainfo
# Install Radarr
cd ~
curl -L -O $( curl -s https://api.github.com/repos/Radarr/Radarr/releases | grep linux.tar.gz | grep browser_download_url | head -1 | cut -d \" -f 4 )
tar -xvzf Radarr.develop.*.linux.tar.gz
mv Radarr /opt
Service file sudo nano /etc/systemd/system/radarr.service
[Unit]
Description=Radarr Daemon
After=syslog.target network.target
[Service]
# Change the user and group variables here.
User=deluge23
Group=deluge23
Type=simple
# Change the path to Radarr or mono here if it is in a different location for you.
ExecStart=/usr/bin/mono --debug /opt/Radarr/Radarr.exe -nobrowser
TimeoutStopSec=20
KillMode=process
Restart=on-failure
# These lines optionally isolate (sandbox) Radarr from the rest of the system.
# Make sure to add any paths it might use to the list below (space-separated).
#ReadWritePaths=/opt/Radarr /path/to/movies/folder
#ProtectSystem=strict
#PrivateDevices=true
#ProtectHome=true
[Install]
WantedBy=multi-user.target
Settings for Indexer
Settings for Download Client
Sonarr
For TV series. @ref: https://github.com/Sonarr/Sonarr/wiki/Installation#linux
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0xA236C58F409091A18ACA53CBEBFF6B99D9B78493
echo "deb http://apt.sonarr.tv/ master main" | sudo tee /etc/apt/sources.list.d/sonarr.list
Service file sudo nano /etc/systemd/system/sonarr.service
[Unit]
Description=Sonarr Daemon
After=syslog.target network.target
# BindsTo=nzbgetd.service
[Service]
User=deluge23
Group=deluge23
Type=simple
ExecStart=/usr/bin/mono --debug /opt/NzbDrone/NzbDrone.exe -nobrowser
TimeoutStopSec=20
KillMode=process
Restart=on-failure
[Install]
WantedBy=multi-user.target
Settings for Indexer
Settings for Download Client
Tracker Indexer
Prowlarr
Prowlarr will auto add indexer added and push it to Sonarr and Radarr. It replaces Jackett and you don't have to add indexer one by one in each Radarr and Sonarr instance.
Prerequisite
cd ~
mkdir build-prowlarr && cd build-prowlarr
sudo apt install curl sqlite3
wget --content-disposition 'http://prowlarr.servarr.com/v1/update/develop/updatefile?os=linux&runtime=netcore&arch=x64'
tar -xvzf Prowlarr*.linux*.tar.gz
Prepare folder and ownership
sudo mkdir /opt
sudo mv Prowlarr /opt/
sudo chown deluge23:deluge23 -R /opt/Prowlarr
sudo mkdir -p /var/lib/prowlarr
sudo chown deluge23:deluge23 -R /var/lib/prowlarr
cat << EOF | sudo tee /etc/systemd/system/prowlarr.service > /dev/null
[Unit]
Description=Prowlarr Daemon
After=syslog.target network.target
[Service]
User=deluge23
Group=deluge23
Type=simple
ExecStart=/opt/Prowlarr/Prowlarr -nobrowser -data=/var/lib/prowlarr/
TimeoutStopSec=20
KillMode=process
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
Enable Prowlarr
sudo systemctl -q daemon-reload
sudo systemctl enable --now -q prowlarr
Open browser at http://localhost:9696
Add App
via Prowlarr website. Prowlarr will auto add indexer to radarr and sonarr after you add them.
Example adding Application on Prowlarr
Note: Recap, default port for Radarr is 7878 and Sonarr is 8989
On Radarr. Notice the Indexer Name (Prowlarr)
naming format
And on Sonarr
Jackett
Note: Use Prowlarr instead! Jackett is the torrent indexer to that Radarr and Sonarr will query torrent.
cd ~
mkdir build-jackett && cd build-jackett
wget https://github.com/Jackett/Jackett/releases/download/v0.16.899/Jackett.Binaries.LinuxAMDx64.tar.gz
tar -zxvf Jackett.Binaries.LinuxAMDx64.tar.gz
cd Jackett
sudo ./install_service_systemd.sh
Then go to http://<SERVER>:9117
and add a new tracker. I'm using HD-Torrents
.
Add firewall rules
sudo ufw allow 9117
Plex Media Server
cd ~
mkdir build-plex && cd build-plex
wget https://downloads.plex.tv/plex-media-server-new/1.19.5.3112-b23ab3896/debian/plexmediaserver_1.19.5.3112-b23ab3896_amd64.deb
output
deluge23@server663:~/build-plex$ sudo dpkg -i plexmediaserver_1.19.5.3112-b23ab3896_amd64.deb
(Reading database ... 116527 files and directories currently installed.)
Preparing to unpack plexmediaserver_1.19.5.3112-b23ab3896_amd64.deb ...
PlexMediaServer install: Pre-installation Validation.
PlexMediaServer install: Pre-installation Validation complete.
Unpacking plexmediaserver (1.19.5.3112-b23ab3896) over (1.19.5.3112-b23ab3896) ...
Setting up plexmediaserver (1.19.5.3112-b23ab3896) ...
PlexMediaServer install: PlexMediaServer-1.19.5.3112-b23ab3896 - Installation starting.
PlexMediaServer install:
PlexMediaServer install: Now installing based on:
PlexMediaServer install: Installation Type: New
PlexMediaServer install: Process Control: systemd
PlexMediaServer install: Plex User: plex
PlexMediaServer install: Plex Group: plex
PlexMediaServer install: Video Group: video
PlexMediaServer install: Metadata Dir: /var/lib/plexmediaserver/Library/Application Support
PlexMediaServer install: Temp Directory: /tmp
PlexMediaServer install: Lang Encoding: en_US.UTF-8
PlexMediaServer install: Transcoding HW: Not found
PlexMediaServer install:
PlexMediaServer install: Completing final configuration.
Created symlink /etc/systemd/system/multi-user.target.wants/plexmediaserver.service → /lib/systemd/system/plexmediaserver.service.
PlexMediaServer install: PlexMediaServer-1.19.5.3112-b23ab3896 - Installation successful. Errors: 0, Warnings: 0
Processing triggers for libc-bin (2.27-3ubuntu1.2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Setup SSH tunnel, then configure server for the first time
On browser, goto http://localhost:5001
and configure your media library folder.
Add firewall rule for player.
sudo ufw allow 32400
FTP server
sudo su
apt install vsftpd
# backup config
cp /etc/vsftpd.conf /etc/vsftpd.conf.orig
# Restrict user to only their home directory.
sed -i 's/#chroot_local_user=YES/chroot_local_user=YES/' /etc/vsftpd.conf
echo 'pasv_min_port=40000' >> /etc/vsftpd.conf
echo 'pasv_max_port=50000' >> /etc/vsftpd.conf
# Prevent 500 OOPS: vsftpd: refusing to run with writable root inside chroot().
# see https://www.liquidweb.com/kb/error-500-oops-vsftpd-refusing-to-run-with-writable-root-inside-chroot-solved/
echo 'allow_writeable_chroot=YES' >> /etc/vsftpd.conf
Open firewall port
sudo ufw allow 20
sudo ufw allow 21
sudo ufw allow 40000:50000/tcp
sudo ufw status
h5ai Browser
Following will install h5ai to the root document so you can access by localhost/h5ai
cd /var/www/ && mkdir h5ai
cd h5ai
wget https://release.larsjung.de/h5ai/h5ai-0.29.2.zip
# make all folder that don't have index.html to served by h5ai index.html
echo "DirectoryIndex index.html index.php /h5ai/_h5ai/public/index.php"
# intall additional plugins for thumbnail generator
sudo apt install php-gd imagemagick
systemctl restart apache2
Check on localhost/h5ai/_h5ai/public
and make sure all is good.d
Final Firewall Rules
Make sure to open the following ports after configuring all the services
# SSH
sudo ufw allow 23
# ruTorrent
sudo ufw allow 80
# Radarr
sudo ufw allow 7878
# Sonarr
sudo ufw allow 8989
# Jackett
sudo ufw allow 9117
# Plex Web Player
sudo ufw allow 32400
# FTP
sudo ufw allow 20
sudo ufw allow 21
sudo ufw allow 40000:50000/tcp
Plex Related
Sync Trakt Playlist to Plex Library
Read https://github.com/adamgot/python-plexlibrary
git clone https://github.com/adamgot/python-plexlibrary
Recipe I used: I created a repo at https://github.com/garygan89/python-plexlibrary-list-generator to auto create list from Trakt.TV custom list.
Movie Conversion Related
mkvmerge
mkvmerge
Select audio track @ref: https://superuser.com/questions/77504/how-to-strip-audio-streams-from-an-mkv-file
# first, get audio track info so we know which one to keep
mkvmerge -i input.mkv
File 'input.mkv': container: Matroska
Track ID 1: video (V_MPEG4/ISO/AVC)
Track ID 2: audio (A_AAC)
Track ID 3: audio (A_AAC) <----------- for example, let's keep this one
Track ID 4: audio (A_AAC)
mkvmerge -o output.mkv --atracks 3 input.mkv
makemkv
wget https://www.makemkv.com/download/makemkv-bin-1.15.2.tar.gz
wget https://www.makemkv.com/download/makemkv-oss-1.15.2.tar.gz
tar -zxvf makemkv-bin-1.15.2.tar.gz
tar -zxvf makemkv-oss-1.15.2.tar.gz
# make oss
cd makemkv-oss-*/
./configure
make && make install
# bin
cd .. && cd makemkv-bin-*/
make && make install
Conversion Command
# Backup a folder to a destination, including all titles, and showing progress bar
makemkvcon backup --minlength=0 --progress=-same file:Fantasy.Island.2020.BluRay.1080p.AVC.DTS-HD.MA5.1-CHDBits/ /mnt/downloads/media-staging/
Install Jellyfin
Install latest ffmpeg on 18.04 (DO NOT USE, IT IS OBSOLETE!)
sudo apt install -y software-properties-common
sudo apt update
sudo add-apt-repository ppa:jonathonf/ffmpeg-4
sudo apt install -y ffmpeg
ffmpeg -version
Install latest ffmpeg 5 on 22.04 (needed by ersatztv) (ref: https://www.linuxcapable.com/how-to-install-ffmpeg-5-on-ubuntu-22-04-lts/)
sudo add-apt-repository ppa:savoury1/ffmpeg4 -y
sudo add-apt-repository ppa:savoury1/ffmpeg5 -y
sudo apt update && sudo apt upgrade
sudo apt install -y ffmpeg
ffmpeg -version
Install jellyfin from apt
sudo apt install curl gnupg
curl -fsSL https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/jellyfin.gpg
echo "deb [arch=$( dpkg --print-architecture )] https://repo.jellyfin.org/$( awk -F'=' '/^ID=/{ print $NF }' /etc/os-release ) $( awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release ) main" | sudo tee /etc/apt/sources.list.d/jellyfin.list
sudo apt update
sudo apt install -y jellyfin
Open browser to localhost:8096
Mounting
Mounting sshfs
sshfs -o allow_other [email protected]:/ /mnt/droplet
Example to connect to Dedicated Server 2, and mount the whole root file system.
sudo sshfs -o allow_other,IdentityFile=/home/deluge23/.ssh/id_ed25519 [email protected]:/ /mnt/sshfs-server1525.seedhost.eu/ -p 8823
Note: Need to uncomment user_allow_other
in /etc/fuse.conf
for the other machine before this is allowed. Useful if you want to mount the target in /mnt
but still want to allow non-root user to access it.
nano /etc/fuse.conf
...
# Allow non-root users to specify the allow_other or allow_root mount options.
user_allow_other
Example of sshfs mount command on main server663 to connect to other remote servers:
# hetzner-dedi64
sudo sshfs -o allow_other,IdentityFile=/home/deluge23/.ssh/hetzner-162.55.83.189/id_ed25519 [email protected]:/ /mnt/hetzner-dedi64/ -p 8823
Securing Server
Use Public Key
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "[email protected]"
# Copy public key to authorized keys
cat ~/.ssh/id_ed25519.pub >> ~/.ssh/authorized_keys
chmod 700 .ssh
chmod 600 .ssh/authorized_keys
rm .ssh/id_ed25519.pub
Secure SSH config file
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.orig
sudo nano /etc/ssh/sshd_config
# Modify the content with the following
...
Port 8823
PermitRootLogin no
PasswordAuthentication no
...
# Last line (only allow following user to SSH login)
AllowUsers deluge23
Restart daemon. All existing SSH connection will remain.
sudo systemctl restart ssh
Securing ruTorrent
NOTE: Obsolete! Refer to
Securing ruTorrent
above.
Method 1: Using Apache2 webhost
- Create user password
- Create site config
sudo nano /etc/apache2/sites-available/remote.conf
GNU nano 2.9.3 remote.conf Modified
<VirtualHost *:80>
ServerName server1525.seedhost.eu
ServerAdmin [email protected]
DocumentRoot /var/www/html/ruTorrent
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory "/var/www/html/rutorrent">
AuthName "Restricted Access"
AuthType Basic
Require valid-user
AuthUserFile /var/.htpasswd
</Directory>
CustomLog /var/log/apache2/rutorrent.log vhost_combined
ErrorLog /var/log/apache2/rutorrent_error.log
</VirtualHost>
Create log files
sudo touch /var/log/apache2/rutorrent_error.log && sudo touch /var/log/apache2/rutorrent.log && sudo chown -R root:adm /var/log/apache2/
Enable site
sudo a2ensite remote.conf
sudo a2dissite 000-default.conf
sudo systemctl reload apache2
Note: Change VirtualHOst port 80 to something else then back if ruTorrent cannot load.
Change default port 80 to 880
sudo nano /etc/apache2/ports.conf
Setup Reverse Proxy using nginx
sudo apt install nginx
Misc
Change system datetime so that log timestamp is correct.
# change to new york timezone
sudo timedatectl set-timezone America/New_York
# restart rsyslog so that all log timestamp is correct
sudo service rsyslog restart
Final Configuration Stats
ds44370.seedhost.eu
lsblk
root@ds44370:/etc/apache2/sites-available# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 14.6T 0 disk
├─sda1 8:1 0 300M 0 part /boot/efi
├─sda2 8:2 0 1G 0 part /boot
├─sda3 8:3 0 4G 0 part [SWAP]
├─sda4 8:4 0 512G 0 part /
└─sda5 8:5 0 14T 0 part
├─media-downloads 253:0 0 57.5T 0 lvm /mnt/downloads
└─media-home 253:1 0 256G 0 lvm /home
sdb 8:16 0 14.6T 0 disk
└─media-downloads 253:0 0 57.5T 0 lvm /mnt/downloads
sdc 8:32 0 14.6T 0 disk
└─media-downloads 253:0 0 57.5T 0 lvm /mnt/downloads
sdd 8:48 0 14.6T 0 disk
└─media-downloads 253:0 0 57.5T 0 lvm /mnt/downloads
df -h
root@ds44370:/etc/apache2/sites-available# df -h
Filesystem Size Used Avail Use% Mounted on
udev 16G 0 16G 0% /dev
tmpfs 3.2G 820K 3.2G 1% /run
/dev/sda4 504G 3.5G 475G 1% /
tmpfs 16G 0 16G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/mapper/media-home 251G 75M 239G 1% /home
/dev/sda2 1008M 119M 839M 13% /boot
/dev/sda1 300M 3.3M 297M 2% /boot/efi
tmpfs 3.2G 0 3.2G 0% /run/user/1000
/dev/mapper/media-downloads 58T 403G 55T 1% /mnt/downloads
pvs, vgs, lvs
root@ds44370:/etc/apache2/sites-available# pvs
PV VG Fmt Attr PSize PFree
/dev/sda5 media lvm2 a-- <14.05t 0
/dev/sdb media lvm2 a-- 14.55t 0
/dev/sdc media lvm2 a-- 14.55t 0
/dev/sdd media lvm2 a-- 14.55t 0
root@ds44370:/etc/apache2/sites-available# vgs
VG #PV #LV #SN Attr VSize VFree
media 4 2 0 wz--n- <57.71t 0
root@ds44370:/etc/apache2/sites-available# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
downloads media -wi-ao---- <57.46t
home media -wi-ao---- 256.00g
pvdisplay
root@ds44370:/etc/apache2/sites-available# pvdisplay
--- Physical volume ---
PV Name /dev/sdb
VG Name media
PV Size 14.55 TiB / not usable 4.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 3814911
Free PE 0
Allocated PE 3814911
Free PE 0 [0/364]
Allocated PE 3814911
PV UUID 5DT8ht-L3Q9-SsZK-zbci-XzxJ-KUJv-yYTpuY
--- Physical volume ---
PV Name /dev/sdc
VG Name media
PV Size 14.55 TiB / not usable 4.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 3814911
Free PE 0
Allocated PE 3814911
PV UUID PQXBPP-4cek-hcl1-ATX9-Tf0c-ySFg-10j3fe
--- Physical volume ---
PV Name /dev/sdd
VG Name media
PV Size 14.55 TiB / not usable 4.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 3814911
Free PE 0
Allocated PE 3814911
PV UUID gtZQJE-zkWI-tGuV-OeUO-Yf6j-EO2T-9323Bo
--- Physical volume ---
PV Name /dev/sda5
VG Name media
PV Size <14.05 TiB / not usable 2.98 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 3682484
Free PE 0
Allocated PE 3682484
PV UUID RAl3cJ-6ze9-vUh2-BzCQ-GXod-ifZ7-gpmNO0
vgdisplay
root@ds44370:/etc/apache2/sites-available# vgdisplay
--- Volume group ---
VG Name media
System ID
Format lvm2
Metadata Areas 4
Metadata Sequence No 6
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 4
Act PV 4
VG Size <57.71 TiB
PE Size 4.00 MiB
Total PE 15127217
Alloc PE / Size 15127217 / <57.71 TiB
Free PE / Size 0 / 0
VG UUID Q85EeG-Os3Q-ZxUR-139Q-Xjal-C7G3-UmYWCk
lvdisplay
root@ds44370:/etc/apache2/sites-available# lvdisplay
--- Logical volume ---
LV Path /dev/media/downloads
LV Name downloads
VG Name media
LV UUID qhwncU-lLSW-CAAJ-PXI9-H8Gp-jNKq-bXbPrR
LV Write Access read/write
LV Creation host, time ds44370, 2022-05-18 22:11:34 +0800
LV Status available
# open 1
LV Size <57.46 TiB
Current LE 15061681
Segments 4
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
--- Logical volume ---
LV Path /dev/media/home
LV Name home
VG Name media
LV UUID 4Ud41X-58Db-RFEg-LdpY-Pm2A-1lfE-rpShzb
LV Write Access read/write
LV Creation host, time ds44370, 2022-05-18 22:23:11 +0800
LV Status available
# open 1
LV Size 256.00 GiB
Current LE 65536
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1
hetzner-dedi64
lsblk
deluge23@Ubuntu-1804-bionic-64-minimal:/mnt/downloads/rtorrent-dl/deluge23$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 1 14.6T 0 disk
├─sda1 8:1 1 32G 0 part [SWAP]
├─sda2 8:2 1 1G 0 part /boot
├─sda3 8:3 1 512G 0 part /
├─sda4 8:4 1 1M 0 part
└─sda5 8:5 1 14T 0 part
├─media-downloads 253:0 0 57.4T 0 lvm /mnt/downloads
└─media-home 253:1 0 256G 0 lvm /home
sdb 8:16 1 14.6T 0 disk
└─media-downloads 253:0 0 57.4T 0 lvm /mnt/downloads
sdc 8:32 1 14.6T 0 disk
└─media-downloads 253:0 0 57.4T 0 lvm /mnt/downloads
sdd 8:48 1 14.6T 0 disk
└─media-downloads 253:0 0 57.4T 0 lvm /mnt/downloads
pvs, vgs, lvs
root@hetzner-dedi64 /mnt/downloads/rtorrent-dl/deluge23 # pvs
PV VG Fmt Attr PSize PFree
/dev/sda5 media lvm2 a-- 14.02t 0
/dev/sdb media lvm2 a-- 14.55t 0
/dev/sdc media lvm2 a-- 14.55t 0
/dev/sdd media lvm2 a-- 14.55t 0
root@hetzner-dedi64 /mnt/downloads/rtorrent-dl/deluge23 # vgs
VG #PV #LV #SN Attr VSize VFree
media 4 2 0 wz--n- <57.68t 0
root@hetzner-dedi64 /mnt/downloads/rtorrent-dl/deluge23 # lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
downloads media -wi-ao---- <57.43t
home media -wi-ao---- 256.00g
References
https://www.techandme.se/install-rutorrent-plex-on-a-headless-ubuntu-server-16-04-part-1/
https://www.techandme.se/install-rutorrent-plex-on-a-headless-ubuntu-server-16-04-part-2/
https://www.rapidseedbox.com/kb/beginners-guide-to-rutorrent
https://gist.github.com/mturley/c10b8527aa2f1a6dafb936561e11181a
https://forums.plex.tv/t/how-do-i-set-up-a-remote-headless-plex-media-server/145890/4