Skip to content

Using 2nd Harddrive

Clownfused edited this page Apr 17, 2019 · 55 revisions
WANT TO HELP? CLICK THE ★ (STAR LOGO) in the Upper-Right!

  • 📂 [Click Here] - Google G-Suite (Unlimited Hard Drive Space & Storage)
  • 📂 [Click Here] - Top Performance NewsHost! - Blitz Members Receive a 58% Discount

Reference Shortcut - http://secondhd.pgblitz.com | Discord ( !secondhd )



Table of Contents

  1. Intro
  2. Creating a file partition
  3. Create the secondary mount
  4. edit fstab
  5. Check your space
  6. tune2fs

1. Intro

Situation:

Have a 250GB SSD and a second 2TB hard drive? The problem that you'll run into with PlexGuide is that all of your stuff downloading and uploading will target your PRIMARY DRIVE (in this example, the 250GB SSD).

The following instructions will assist you in SETTING up your second hard drive.

To check, type df -h and if you notice your OTHER HD not there, you need to follow the steps below.


2. Creating a file partition

fdisk -l

Pay attention to the name of the new disk

type fdisk name-of-drive (mine was /dev/sdb)

m - print menu

if there is a valid partition, you can delete it with d

n - add new partition

p - to create a primary partition

1 - choose the number of partition (pick only 1)

Press enter twice

press w to write to disk and exit

create a file system

mkfs.ext4 /dev/sdb -- keep pushing enter until done


3. Create the secondary mount

Now we can create the folder for the secondary drive, the best options are this one.

mkdir /mnt && chown -cR 1000:1000 /mnt

in some systems is /mnt already created

4. edit fstab

What is fstab ??

short explain about fstab,

Fstab is your operating system’s file system table. In the old days, it was the primary way that the system mounted files automatically. Nowadays, you can plug in a USB drive of any kind and it’ll just pop up in Nautilus as it does in Windows and Mac OS, but once upon a time, you had to manually mount those disks to a specific folder using the “mount” command. This held true for DVDs, CDs, and even floppies (remember those?).

Back then, your only alternative was the tell the computer that anytime a specific device was plugged in, it should be automatically mounted in a specific place. This is where fstab came in, and it was awesome. Suppose you swapped hard disks on your IDE or SCSI controller. The computer could load the file systems in a different order, potentially messing things up. Fstab is configured to look for specific file systems and mount them automatically in the desired way each and every time, preventing a myriad of disasters from occurring.


type blkid

  • look for the name of the device you're looking for, mine was /dev/sdb

copy the uuid number

/dev/sdb: UUID=<<< TAKE YOUR NUMBER >>> TYPE="ext4"

type: nano /etc/fstab

Enter at the bottom of the file:

UUID=<<< TAKE YOUR NUMBER >>> /mnt ext4 defaults 0 0

(edit the UUID with the UUID of your hard drive you found earlier)

ctrl + x to save

type: sudo reboot or mount -a


5. Check your space

  • df -h

  • df -h /mnt

And now you can install PG and all works ;-)

Don't do it after installing PGBlitz it will break everything .


6. tune2fs

short explain

tune2fs command is one of the advanced Unix commands which allows you to adjust various tunable parameters of the ext2/ext3 filesystems. Naturally, it also helps you confirm the existing parameters configured for your filesystems.

Here's how we change the default reserve to be 6% of the overall filesystem size:

6% reserved SPACE

tune2fs -m 6 /dev/sdb
tune2fs 1.43.4 (31-Jan-2017)
Setting reserved blocks percentage to 6% 12226 blocks

And here we change it back. Note how the number of the block corresponding to 5% is exactly the figure we've seen earlier – 249036 blocks:

5% reserved SPACE

tune2fs -m 5 /dev/sdb
tune2fs 1.43.4 (31-Jan-2017)
Setting reserved blocks percentage to 5% 10188 blocks

for 100% using the drive USE this one

0% reserved SPACE

tune2fs -m 0 /dev/sdb
tune2fs 1.43.4 (31-Jan-2017)
Setting reserved blocks percentage to 0% 0 blocks

**Default block size for a filesystem**

If you ever want to confirm the block size of any filesystem, tune2fs will help you do just that:


tune2fs -l /dev/sda1 | grep Block
Block count:              203776
Block size:               1024
Blocks per group:         8192

From this example, you can see that the default block size for the filesystem on /dev/sda1 partition is 4096 bytes or 4k. That's the default block size for ext3 filesystem.


http://PGBlitz.wiki

Useful Starter Links

  1. Introduction
  2. Blitz YouTube Channel
  3. G-Suite Signup
  4. Recommended NewsHosts

Prior Planning 101

  1. Recommended Pre-Reading
  2. Server - Storage Planning
  3. Usenet or BitTorrent
  4. PG Editions
  5. PGBlitz Repos
  6. Common Issues

Deploy & Config

PGBlitz
  1. SSH Server Access
  2. Create a SUDO User
  3. Install PGBlitz
  4. WatchTower
  5. Remote Path Mappings

Data Transport
  1. PG Clone
    1. Google OAuth Keys
    2. PG Move
    3. PG Blitz
    4. 2nd HD Option

Key Components

  1. Traefik
  2. Port Guard
  3. PG Shield
  4. PG Press
  5. Google Cloud - GCE
    1. Automated setup
  6. Hetzner Cloud
  7. PG Fork
  8. Extra PG Commands

Blitz App Info

  1. Accessing PG Apps
  2. App Port Scheme
  3. Plex to AutoScan

Tools & Services

Core Apps [Expand]
  1. Emby
  2. Jackett
  3. Jellyfin
  4. LazyLibrarian
  5. Lidarr
  6. Netdata
  7. NZBGet
  8. Ombi
  9. Plex
  10. Portainer
  11. qBittorrent
  12. Radarr
  13. RuTorrent
  14. SABNZBD
  15. Sonarr
  16. Tautulli
Community Apps [Expand]
  1. AirSonic
  2. AllTube
  3. Bazarr
  4. Beets
  5. Bitwarden
  6. BookSonic
  7. cAdvisor
  8. Cloud Commander
  9. DDClient
  10. Deezloaderremix
  11. Deluge
  12. DelugeVPN
  13. Duplicati
  14. EmbyStats
  15. FlexGet
  16. Gazee
  17. Gitea
  18. Handbrake
  19. Headphones
  20. Heimdall
  21. HomeAssistant
  22. HTPCManager
  23. JDownloader2
  24. jd2-openvpn
  25. Kitana
  26. Logarr
  27. MakeMKV
  28. MariaDB
  29. McMyadmin
  30. MEDUSA
  31. Mellow
  32. Monitorr
  33. Muximux
  34. Mylar
  35. NextCloud
  36. NowShowing
  37. NZBHydra2
  38. NZBThrottle
  39. Organizr
  40. pyLoad
  41. Radarr4k
  42. Resilio
  43. rflood-openvpn
  44. rutorrent-openvpn
  45. ShareSite
  46. Shoko Anime Server
  47. SpeedTest
  48. SyncLounge
  49. Syncthing
  50. The Lounge
  51. Transmission
  52. Trakt.or
  53. Ubooquity
  54. x TeVe
  55. Zammad

Misc Info & Articles

  1. Change Server Time
  2. Fail2Ban
  3. Custom Containers
Scripts
  1. Scripting Area
    1. Auto Upload for Sonarr and Lidarr
    2. Auto Delete Log
    3. Plex Plugin DB Backup
    4. Plex fast BACKUP
Clone this wiki locally
You can’t perform that action at this time.