-
Notifications
You must be signed in to change notification settings - Fork 55
Using 2nd Harddrive
Table of Contents
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.
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
Now we can create the folder for the secondary drive, the best options are this one.
mkdir /mnt && chown -cR 1000:1000 /mnt
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
- df -h
- df -h /mnt
And now you can install PTS and all works ;-)
Don't do it after installing PTS it will break everything .
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.
Wiki - Wiki
- Recommended Pre-Reading
- Server - Storage Planning
- Usenet or BitTorrent
- PTS Editions
- PTS Folder Structure
- PTS-Repos
- Common Issues
Data Transport
- Traefik
- Port Guard
- PTS Shield
- PTS Press
- Google Cloud - GCE
- Hetzner Cloud
- PTS Fork
- Extra PTS Commands
- PTS Vault - Data Storage
- PTSPatrol
- Plex AutoScan in Docker Container
- Plex_Dupefiner
- Traktarr
- System & Network Auditor
- PreInstaller & UnInstaller
Core Apps [Expand]
Community Apps [Expand]
- AirSonic
- Bazarr
- Bitwarden
- BookSonic
- cAdvisor
- Cloud Commander
- Deluge
- DelugeVPN
- Dozzle
- Duplicati
- Filebrowser
- FlexGet
- Gazee
- Headphones
- Heimdall
- HomeAssistant
- jd2-openvpn
- Kitana
- Logarr
- MakeMKV
- MariaDB
- McMyadmin
- MEDUSA
- Mellow
- Miniflux
- Monitorr
- Muximux
- Mylar
- NextCloud
- NowShowing
- NZBHydra2
- Organizr
- plpp
- pyLoad
- qBittorrent
- QBittorrent VPN
- radarrsyncarr
- Resilio
- rflood-openvpn
- rutorrent-openvpn
- Shoko Anime Server
- SpeedTest
- SyncLounge
- Teamspeak3
- The Lounge
- Transmission
- Trakt.or
- Ubooquity
- Varken
- vnc-xfce
- vnstat
- ZeroTier