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.


Installing PlexGuide

  1. PlexGuide Install Information

Preplanning & Information

  1. PG Folder Structure

Domain and Port Control

  1. CloudFlare Tunnel

Primary Applications

  1. Plex

Useful Links

  1. PG YouTube Channel
Clone this wiki locally