Ubuntu

Adding HDD

#Ubuntu Server – Adding a new Hard Disk

#First find the drive mounting point, usually located in /dev. In this example, /dev/sdd is the new disk.

sudo fdisk -l

#Create a new partition on the drive

sudo fdisk /dev/sdd

#Once in fdisk, press the following

- d – to delete any partitions you want removed
- n – create a new partition
- defaults for partition number, start and end sectors on disk
- w – write partition changes

#Next format the disk

sudo mkfs /dev/sdd1 -t ext4

#Create a mount point for the disk

cd /mnt sudo mkdir sdd1 sudo chmod 777 sdd1 sudo chown  currentuser -R sdd1

#Mount the disk

sudo mount /dev/sdd1 /mnt/sdd1 -t ext4

#Edit fstab file

sudo vi /etc/fstab

#add the line

/dev/sdd1 /mnt/sdd1 ext4 defaults 0 0

#save the file and then

sudo mount -a

Adding and mounting windows shares

# First install the cifs utilitySudo apt install cifs-utils

# Create the dir

sudo mkdir /mnt/myFolder

# Create the mount to the directory

sudo mount -t cifs -o username=serverUserName //myServerIpAdress/sharename /mnt/myFolder/

Ex: sudo mount -t cifs -o username=admin //192.168.58.106/"Plex Data" /mnt/Plex_Data/

Ex: sudo mount -t cifs -o username=admin //192.168.58.106/Public/watch  /mnt/downloads