Server build running FreeNAS 12.04 U4 and storage 2x RAIDZ2 of four WD RED 3tb hard drives each. Lives in my closet.
Name | OS | Purpose |
---|---|---|
ubuntu_host | Ubuntu 18.04 | Main VM that hosts dash, peti.work, payme, brotein, covid dash, and OpenVPN |
ubuntu_jupyter | Ubuntu 18.04 | For the sole purpose of hosting JupyterLab |
ubuntu_docker | Ubuntu 18.04 | Hosts docker and docker apps, specifically Bitwarden, Ghost, NginxProxyManager,Wordpress, Postgres DB, Portainer |
Plugin | Purpose |
---|---|
qBittorrent | Downloading Linux ISOs |
Jail | Purpose |
---|---|
Nextcloud | Syncs folders and files between PC, laptop, phone. Easy access off site. Plugin wouldn't update so went all jail using this script |
Plex | Streaming videos and shows to all devices. Jail is easier to update than plugin. |
Hard drives come and go, but data is for a lifetime. Currently installed HDD.
Mount | Serial | Model | Installed | SATA | Errors |
---|---|---|---|---|---|
ada0 | WD-WCC[CENSORED] | WDC WD3[CENSORED] | N/A | SATA0 | 0 |
ada2 | WD-WCC[CENSORED] | WDC WD3[CENSORED] | Dec 24 2021 | SATA2 | 0 |
ada3 | WD-WCC[CENSORED] | WDC WD3[CENSORED] | Jan 4 2020 | SATA3 | self-healed |
ada4 | WD-WCC[CENSORED] | WDC WD3[CENSORED] | Jan 4 2022 | SATA4 | 0 |
ada5 | WD-WX3[CENSORED] | WDC WD3[CENSORED] | Apr 16 2021 | SATA5 | 0 |
ada1 | WD-WX3[CENSORED] | WDC WD3[CENSORED] | Jun 21 2021 | SATA1 | 0 |
da0 | WD-WCC[CENSORED] | ATA WDC[CENSORED] | Jun 7 2019 | BLUE2 | 0 |
da1 | WD-WMC[CENSORED] | ATA WDC[CENSORED] | N/A | BLUE1 | 0 |
da | 070A6C53DE908E55 | USB |
add_kernel.sh
will add a python kernel linking from given conda environment to jupyterlab using the given display name. Created with heavy inspiration from neatshell's simple bash template.
Prereqs:
- Conda if on Ubuntu, miniconda3 if on MacOS.
- Must have python and ipykernel installed in given environment.
- Assumes .conda and /opt/miniconda folders are in home folder (change lines 100-107 as needed).
# give execute permission
sudo chmod 700 add_kernel.sh
# default os is mac
./add_kernel.sh -e my_env -d "My Env" -os "ubuntu"
--help
output:
usage: add_kernel MANDATORY [OPTION]
Adds a python kernel to the jupyterlab instance.
MANDATORY:
-e, --env str Name of conda environment
-d, --display_name str What is shown inside JupyterLab
OPTION:
-o, --os str What os is used. Accepts 'mac' (default) or 'ubuntu' as parameters.
-h, --help Prints this help
example: add_kernel -e my_env -d 'My Env'
backup_server.sh
initiates rsync
command to backup SMB folders in order of importance. All outputs will be shown in the terminal and saved in output.txt
. Created to backup FreeNAS shares to an external hard drive over the network. Modify:
- Line 3: change name or order of folders
- Line 8: change location of SMB mount and backup location
Sample output:
initiate_ubuntu.sh
will be a collection of commands to carry out common tasks whenever a new ubuntu server is created. Right now it:
- Appends HDA SMB folder locations to fstab file
- Creates new folders for the defined SMB folders under
/mnt/Network/$folder
- Creates
.smbcredentials
file with the passed-u
and-p
variables, withchmod 600
- Mounts all folders in the fstab file
Modify:
- Lines 16-25, settings for server location, folder names, etc.
- Lines 132-146, folders that have spaces in them are special cases that need to be added to fstab with
\040
in place of space - Line 158, if the password protected folder is not outside the $remote_mount folder
mount_usb.sh
asks user for drive info and then mounts the USB drive to
- Prints all connected drives that are named "sd**"
- Asks user for drive name (ex: sda1)
- Asks user for file system type (ex: ntfs)
- Mounts the drive to
/mnt/usb
- Shows contents of
/mnt/usb
so user can confirm it was mounted
Modify:
- Lines 47, 50, 52, 56 location to mount the drive to