Adding new disk to user directory

wiki
debian8
disk
hdd
ubuntu

#1

Adding New disk to user directory

This is a how to for people wanting to add a disk to the current build and add to home user directory so that you can use it with QuickBox.
This setup needs to be ran as sudo su or root.

Warning: this can mess up any install you already have if you are not careful.

Note: This will not increase disk space on the disk space widget , but anything you move to it will be subtracted from it.


  1. View detected devices of class "DISK"
    lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
    Example:
    masters-downloader:~# lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
    NAME FSTYPE SIZE MOUNTPOINT LABEL
    sda 931.5G
    ├─sda1 linux_raid_member 953M masters-downloader:0
    │ └─md0 swap 2.8G [SWAP]
    └─sda2 linux_raid_member 930.6G masters-downloader:1
    └─md1 ext4 2.7T /
    sdb 931.5G
    ├─sdb1 linux_raid_member 953M masters-downloader:0
    │ └─md0 swap 2.8G [SWAP]
    └─sdb2 linux_raid_member 930.6G masters-downloader:1
    └─md1 ext4 2.7T /
    sdc 931.5G
    ├─sdc1 linux_raid_member 953M masters-downloader:0
    │ └─md0 swap 2.8G [SWAP]
    ├─sdc2 1K
    └─sdc5 linux_raid_member 930.6G masters-downloader:1
    └─md1 ext4 2.7T /
    sdd 596.2G
    └─sdd1 ext4 596.2G /home/dtech/extra

  2. View existing partition table(s)
    fdisk -l

  3. After figuring out the disk name you want to mount. (in this case, “sdd”)
    fdisk /dev/sdd
    http://lookpic.com/O/i2/1029/FrT6Bw5n.png

  4. Set new partition
    -Use n to set new partition
    -Choses primary
    -Set as 1st primary partition
    -When you’re all done with that use w to save changes

  5. After adding partition you will need to format it.
    mkfs -t ext4 /dev/sdd1

  6. Now you need to make the directory for the mount and then mount it.
    mkdir /home/UsernameHere/foldername here
    mount /dev/sdd1 /home/UsernameHere/foldername

  7. now you need to add it to your fstab
    First, grab the UUID of the partition you just created:
    blkid | grep /dev/sdd1
    You should see something like:

/dev/sdd1 UUID="158fe79f-e9ea-4439-9b15-0ac9653a1650" TYPE="ext4" PARTUUID="8cbbba5b-06"

Now,

nano /etc/fstab
add at the end of it

UUID=158fe79f-e9ea-4439-9b15-0ac9653a1650 /storage ext4 errors=remount-ro,noatime 0 1

Be sure to replace UUID with the UUID you received after running blkid (without quotes!). Change /storage to whereever you would like the drive to mount on boot.

ctrl-o to save and ctrl-x to exit.

  1. now that all of that is done you want your user to be able to use it. Time to add permissions
    chmod 777 /home/UsernameHere/foldername chown Username:Username /home/UsernameHere/foldername

Resources



How to add an external drive in to the system?
Not all disk space found
How to add an external drive in to the system?
Not all disk space found
#3

ESXi - SSD for Quickbox + HDD only for torrents