Setting up a home server

I was working on the Zpool last night for ENTIRELY TOO LONG. I was up till nearly 02:30, so I only got about 3.5 hours of sleep.... JOY....

My issue was that the pool would create without issue, I could get the directories working, and visible from a computer on the network, but I couldn't connect. I am still working that issue, but I am not worried about it at this point. Just to test out the setup, I rebooted the server, and uh-oh, NO ZPOOL.... Worked on that all of last night, and a little bit this morning. I found myself continually rebooting to see if this was the one, so I created the zpool maybe 2 dozen times. The repetition is nice if for nothing else just becoming more familiar with the commands and the outputs. After hours and hours of searching, I found a SINGLE thread that had the answer, https://github.com/zfsonlinux/zfs/issues/2927 . All I had to do was log into root, and issue "echo manual >/etc/init/zpool-import.override". Issued that, rebooted, and BOOM, everything worked. Right now I don't have quotas setup or anything like that (yet), but I have 2 directories I have created, 1 obviously for backup up important data from other machines, and the other will be media back ups, photos, videos, movies, TV shows, music, and anything else the Plex server will read. Please will have access (hopefully) to the entire /mnt/Storage/Media folder.

Today I will be working on connecting to the shared Media folder and mapping a network drive from my desktop machine. (As long as I can remote to the Desktop, not currently at home). Call it a lunch project. If nothing else, I can pull the disks and insert them into the server and copy the files that way if need be (if that will work). I will also be working on the sensors to see what I can do to monitor temps. I could probably safely remove all the fans and run a pure silent set up since I have 3 sensors reporting -48* C...... [/badjoke]. I did end up ordering the front bezel but it hasn't processed yet almost a week later, may just end up canceling it, not sure what happened there...


As far as the server goes, I am not sure if I am going to keep this setup, or format the boot drive and start over, again. I thought that the web admin panel would be more useful than it is, so not sure if I will want that, or just do a fresh install, update, then set up ZFS and the zpool. I was thinking that I would have been able to CREATE the virtual guest form the ISPConfig web admin panel, but it appears you can only manage existing guests from there. Oh well. I am digging the command Line. It isn't foreign as I am in Cisco and Juniper router command lines all day at work, just different commands. Sometimes Unix jumper servers too, nothing other than creating router configs with vi, changing permissions, searching, and copying files though with those.
Code:
ziggidy@Ziggidy-VH:~$ sudo zpool status
  pool: Storage
 state: ONLINE
  scan: none requested
config:

        NAME                                            STATE     READ WRITE CKSUM
        Storage                                         ONLINE       0     0     0
          raidz2-0                                      ONLINE       0     0     0
            ata-WDC_WD40EFRX-68WT0N0_WD-WCC4E1304884    ONLINE       0     0     0
            ata-WDC_WD40EFRX-68WT0N0_WD-WCC4E1344552    ONLINE       0     0     0
            ata-WDC_WD40EFRX-68WT0N0_WD-WCC4E1344610    ONLINE       0     0     0
            ata-WDC_WD40EFRX-68WT0N0_WD-WCC4E1324763    ONLINE       0     0     0
            ata-WDC_WD40EFRX-68WT0N0_WD-WCC4E1380342    ONLINE       0     0     0
            ata-WDC_WD40EFRX-68WT0N0_WD-WCC4EFUL6XA9    ONLINE       0     0     0
        logs
          ata-TOSHIBA_THNSNH256GBST_83IS10JLTE8Y-part1  ONLINE       0     0     0
          ata-TOSHIBA_THNSNH256GBST_83JS106NTE8Y-part1  ONLINE       0     0     0
        cache
          ata-TOSHIBA_THNSNH256GBST_83IS10JLTE8Y-part2  ONLINE       0     0     0
          ata-TOSHIBA_THNSNH256GBST_83JS106NTE8Y-part2  ONLINE       0     0     0

errors: No known data errors
ziggidy@Ziggidy-VH:~$
ziggidy@Ziggidy-VH:~$
ziggidy@Ziggidy-VH:~$ sudo zfs list
NAME              USED  AVAIL  REFER  MOUNTPOINT
Storage          1.80M  14.3T   272K  /Storage
Storage/Backups   272K  14.3T   272K  /mnt/Storage/Backups
Storage/Media     272K  14.3T   272K  /mnt/Storage/Media
ziggidy@Ziggidy-VH:~$
ziggidy@Ziggidy-VH:~$
ziggidy@Ziggidy-VH:~$ sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0:       +29.0°C  (high = +85.0°C, crit = +95.0°C)
Core 1:       +29.0°C  (high = +85.0°C, crit = +95.0°C)
Core 9:       +29.0°C  (high = +85.0°C, crit = +95.0°C)
Core 10:      +26.0°C  (high = +85.0°C, crit = +95.0°C)

coretemp-isa-0001
Adapter: ISA adapter
Core 0:       +23.0°C  (high = +85.0°C, crit = +95.0°C)
Core 1:       +25.0°C  (high = +85.0°C, crit = +95.0°C)
Core 9:       +24.0°C  (high = +85.0°C, crit = +95.0°C)
Core 10:      +30.0°C  (high = +85.0°C, crit = +95.0°C)

w83627hf-isa-0a00
Adapter: ISA adapter
in0:          +3.84 V  (min =  +0.00 V, max =  +4.08 V)
in1:          +3.86 V  (min =  +0.00 V, max =  +4.08 V)
in2:          +3.84 V  (min =  +2.82 V, max =  +3.79 V)  ALARM
in3:          +3.06 V  (min =  +4.08 V, max =  +4.08 V)  ALARM
in4:          +3.09 V  (min =  +4.08 V, max =  +4.08 V)  ALARM
in5:          +3.14 V  (min =  +4.08 V, max =  +4.08 V)  ALARM
in6:          +3.15 V  (min =  +4.08 V, max =  +4.08 V)  ALARM
in7:          +3.31 V  (min =  +4.08 V, max =  +4.08 V)  ALARM
in8:          +3.25 V  (min =  +4.08 V, max =  +4.08 V)  ALARM
fan1:           0 RPM  (min =    0 RPM, div = 8)
fan2:           0 RPM  (min =    0 RPM, div = 8)
fan3:           0 RPM  (min =    0 RPM, div = 8)
temp1:        -48.0°C  (high =  -1.0°C, hyst =  -1.0°C)  sensor = thermistor
temp2:        -48.0°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor
temp3:        -48.0°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor
cpu0_vid:    +1.419 V
beep_enable: enabled

ziggidy@Ziggidy-VH:~$
 
Last edited:
Throwing in an additional quiestion about the virtual guests....

Would it be better to set up a folder inside of the zpool at /mnt/Storage/Virtual/<hostname> for each virtual host running on the server, or would it be better to have a separate drive, say a 500 Gig drive for the virtual guests, or would they need to be on the OS drive itself?? This part I am not too sure of, but I am leaning towards a pair of drives similar to the OS drives, where they are separate drives, and master drive backs up to the back up drive.

I may need to work on the OS drive as well to expand the partition, as I think I used only 50% for the OS install, as I wasn't sure if the virtual guests would be using that drive as well or not...
 
I want to start off by thanking everyone for the assistance through this project, it has been GREAT!!!


Work and family life has been busy, so I haven't had much time to tinker on the server. Things have been better this week, so yesterday I took the time to format the OS drive on the server, and got it up and working the way I wanted in about 2 hours. I have 3 live virtual machines running, and so far all is well. Plex works, and I was able to get it access to the ZFS pool via NFS for the media. I sent all night getting my Standard Def movies and music copied to the server, currently working on the High Def movies, will take a day or two probably. The Minecraft server works, I was able to connect to it from a local laptop, haven't tried over the internet yet, but it should work once I get the port forwarding set up. I also have a test server in there so that any changes I want to make I can try in there before possibly breaking production.

I still have more to do, but I am just happy this is up and working. I have a backups folder in the zpool which all of the virtual guests have access to. Right now they all have access to the full folder, but I will eventually make it so that each guest has its own folder and can only save data to that folder, unable to access anything else. I also want to figure out how to get Samba to require logging in from a Windows client, so that everyone doesn't have wide-open access to the shares. I tried before, could SEE the shares, but couldn't access them, or mount them as network drives from the windows hosts. This backups folder will be for the virtual guests, our laptops, and my desktop. I would EVENTUALLY like to figure out how to get phones to back up to it as well (create and app, hit sync or something, and all of the photos in the albums get copied to the back up folder for instance...) As noted though, there is more reading and testing to do. I am not sure what exactly on each of the virtual guests would need to be back up, and not sure how to accomplish that. Eventually down the road, that backups folder would then automatically back up to a second network device, a D-Link DNS-323 with two 3TB drives in it. I have it sitting here, just not plugged in or connected to the network at the moment. I migrated its duties to my desktop which has 3x 2TB drives in it for just about the same capacity as the network drive.


If anyone else is looking for help in getting things up and running, here are the commands I used to get this working...

[EDIT]
Plenty more room to stretch my legs, AND, 6 empty drives bays too!!
Code:
NAME              USED  AVAIL  REFER  MOUNTPOINT
Storage          1.97T  12.3T   192K  /Storage
Storage/Backups   192K  12.3T   192K  /mnt/Storage/Backups
Storage/Media    1.97T  12.3T  1.97T  /mnt/Storage/Media

[/EDIT]

Code:
1. Install Ubuntu Server, with only open-ssh
2. Root Password
3. Install other packages
4. Updates
5. network
6. ZFS 
7. KVM



=====================================================================

1.
Install Ubunty server with only open ssh package
verify device IP, connect with putty from network host


=====================================================================

2.
Root Password

sudo passwd root


=====================================================================

3.
Install other packages


sudo add-apt-repository ppa:zfs-native/stable;
sudo apt-get update
sudo apt-get install bridge-utils htop samba qemu-kvm libvirt-bin ubuntu-vm-builder stress nfs-kernel-server nfs-common ubuntu-zfs

 	
=====================================================================

4.
Network:


sudo vi etc/network/interfaces

"
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet manual

# The secondary network interface
auto eth1
iface eth1 inet manual

# The bridge network interface
auto br0
 iface br0 inet static
  address 172.16.5.25
  netmask 255.255.255.0
  network 172.16.5.0
  gateway 172.16.5.1
  dns-nameservers 8.8.8.8 8.8.4.4
  bridge_ports eth0 eth1
  bridge_stp off
  bridge_fd 0
  bridge_maxwait 0
"
sudo reboot now


=====================================================================

5. 
Updates

sudo apt-get update
sudo apt-get upgrade


=====================================================================

6.
ZFS and shares


sudo zpool create Storage raidz2 -f /dev/disk/by-id/ata-WDC_WD40EFRX-68WT0N0_WD-WCC4E1304884 /dev/disk/by-id/ata-WDC_WD40EFRX-68WT0N0_WD-WCC4E1344552 /dev/disk/by-id/ata-WDC_WD40EFRX-68WT0N0_WD-WCC4E1344610 /dev/disk/by-id/ata-WDC_WD40EFRX-68WT0N0_WD-WCC4E1324763 /dev/disk/by-id/ata-WDC_WD40EFRX-68WT0N0_WD-WCC4E1380342 /dev/disk/by-id/ata-WDC_WD40EFRX-68WT0N0_WD-WCC4EFUL6XA9 log mirror ata-TOSHIBA_THNSNH256GBST_83IS10JLTE8Y-part1 ata-TOSHIBA_THNSNH256GBST_83JS106NTE8Y-part1 cache ata-TOSHIBA_THNSNH256GBST_83IS10JLTE8Y-part2 ata-TOSHIBA_THNSNH256GBST_83JS106NTE8Y-part2
sudo zpool status
sudo zfs create -o mountpoint=/mnt/Storage/Backups Storage/Backups
sudo zfs create -o mountpoint=/mnt/Storage/Media Storage/Media
sudo chown nobody:nogroup /mnt/Storage/Media/
sudo chown nobody:nogroup /mnt/Storage/Backups/
sudo zfs list


Go to root mode, issue - fixes reboot zpool loss issue
echo manual >/etc/init/zpool-import.override


[Only if zpool disappears]
zpool import -d /dev/disk/by-id




sudo vi /etc/samba/smb.conf

"
[Media]
path = /mnt/Storage/Media
available = yes
read only = no
browseable = yes
public = yes
writable = yes
create mask = 0755


[Backup]
path = /mnt/Storage/Backups
available = yes
read only = no
browseable = yes
public = yes
writable = yes
create mask = 0755
"



sudo vi /etc/exports
"
/mnt/Storage/Media 172.16.5.26(rw,sync,no_subtree_check)
/mnt/Storage/Backups 172.16.5.10(rw,sync,no_subtree_check) 172.16.5.26(rw,sync,no_subtree_check) 172.16.5.27(rw,sync,no_subtree_check)
"
sudo exportfs -ra
sudo service nfs-kernel-server start
showmount -e

=====================================================================

7.
KVM: 


Plex

sudo ubuntu-vm-builder kvm trusty \
 --domain * \
 --dest VG-PlexMediaServer \
 --hostname VG-PlexMediaServer \
 --arch amd64 \
 --mem 8192 \
 --cpus 4 \
 --user *** \
 --pass *** \
 --bridge br0 \
 --ip 172.16.5.26 \
 --mask 255.255.255.0 \
 --net 172.16.5.0 \
 --bcast 172.16.5.255 \
 --gw 172.16.5.1 \
 --dns 8.8.8.8 8.8.4.4 \
 --components main,universe \
 --addpkg acpid \
 --addpkg openssh-server \
 --addpkg nfs-common \
 --addpkg linux-image-generic \
 --addpkg htop \
 --addpkg stress \
 --libvirt qemu:///system ;

virsh
autostart VG-PlexMediaServer
start VG-PlexMediaServer


ON GUEST
  wget downloads.plex.tv/plex-media-server/0.9.12.1.1079-b655370/plexmediaserver_0.9.12.1.1079-b655370_amd64.deb
  sudo dpkg -i plexmediaserver_0.9.12.1.1079-b655370_amd64.deb
  mkdir Backups
  mkdir Media
  sudo vi /etc/fstab

  "
  172.16.5.25:/mnt/Storage/Backups                /home/padmin/Backups nfs  auto         0       0
  172.16.5.25:/mnt/Storage/Media                  /home/padmin/Media   nfs  auto         0       0
  "
  sudo mount -a





----------

Minecraft

sudo ubuntu-vm-builder kvm trusty \
 --domain * \
 --dest VG-MineCraftServer \
 --hostname VG-MineCraftServer \
 --arch amd64 \
 --mem 8192 \
 --cpus 4 \
 --user *** \
 --pass *** \
 --bridge br0 \
 --ip 172.16.5.27 \
 --mask 255.255.255.0 \
 --net 172.16.5.0 \
 --bcast 172.16.5.255 \
 --gw 172.16.5.1 \
 --dns 8.8.8.8 8.8.4.4 \
 --components main,universe \
 --addpkg acpid \
 --addpkg openssh-server \
 --addpkg nfs-common \
 --addpkg linux-image-generic \
 --addpkg htop \
 --addpkg stress \
 --addpkg default-jdk \
 --libvirt qemu:///system ;

virsh
autostart VG-MineCraftServer
start VG-MineCraftServer


ON GUEST
  mkdir Backups
  sudo vi /etc/fstab

  "
  172.16.5.25:/mnt/Storage/Backups                /home/madmin/Backups nfs  auto          0       0
  "
  sudo mount -a
  mkdir MCServers
  cd MCServers
  mkdir CreativeWorld1
  mkdir SurvivalWorld1
  cd SurvivalWorld1
  wget https://s3.amazonaws.com/Minecraft.Download/versions/1.8.4/minecraft_server.1.8.4.jar
  sudo vi eula.txt
  "
  eula=true
  "
  java -Xmx4096M -Xms8192M -jar minecraft_server.1.8.4.jar nogui

----------

sudo ubuntu-vm-builder kvm trusty \
 --domain * \
 --dest VG-TestServer \
 --hostname VG-TestServer \
 --arch amd64 \
 --mem 1024 \
 --cpus 1 \
 --user *** \
 --pass *** \
 --bridge br0 \
 --ip 172.16.5.30 \
 --mask 255.255.255.0 \
 --net 172.16.5.0 \
 --bcast 172.16.5.255 \
 --gw 172.16.5.1 \
 --dns 8.8.8.8 8.8.4.4 \
 --components main,universe \
 --addpkg acpid \
 --addpkg openssh-server \
 --addpkg linux-image-generic \
 --addpkg htop \
 --addpkg stress \
 --libvirt qemu:///system ;

virsh
autostart VG-TestServer
start VG-TestServer

----------

sudo ubuntu-vm-builder kvm trusty \
 --domain *** \
 --dest VG-<NAME> \
 --hostname <NAME> \
 --arch amd64 \
 --mem <MEM M-BYTES> \
 --cpus <#> \
 --user <USER> \
 --pass <PASS> \
 --bridge  br0 \
 --ip 172.16.5.<##> \
 --mask 255.255.255.0 \
 --net 172.16.5.0 \
 --bcast 172.16.5.255 \
 --gw 172.16.5.1 \
 --dns 8.8.8.8 8.8.4.4 \
 --components main,universe \
 --addpkg acpid \
 --addpkg openssh-server \
 --addpkg linux-image-generic \
 --libvirt qemu:///system ;

=====================================================================
 
Last edited:
It turns out I made a mistake, as this is my first ever dance with Virtualization at all. I was under the impression that the virtual guest would be limited only by the free space on the drive(s) on which it resides. It turns out that isn't the case, and the guest has a finite amount of disk space....

After I moved the images for the guests to the ZFS pool, the Plex Media Storage totally blew up. Any new media was showing up in the library, but the metadata (posters, and movie summary, ratings, etc. etc.) wasn't loading for the new media. Also, NOTHING would play, not even music, or direct play movies. I knew that this was a guest issue, and not an issue with the source files, as I was able to watch any of the movies directly from the mapped drive with VLC on any of my LAN hosts without an issue. As it turned out, the guest was limited to under 4 Gig of storage, and it was completely maxed out (see below output). I was advised to increase the size of the guest. I figured out how to increase the image, but the increase wasn't translating to the guest itself, and I couldn't figure it out. SO.... I decided to completely wipe out ALL of the guests, and start over. I was able to actually kill two birds with one stone on this. Initially, the images were on the OS drive, then I moved them with a simlink to the ZFS pool. Rebuilding the guests allowed me to specify the image location, and drive size right off the bat. Now that the Plex guest has been rebuilt, it is working wonderfully. After creating the media libraries, I saw the data used over 3 Gig after downloading all of the metadata for the files.


Code:
padmin@VG-PlexMediaServer:~$ df -h
Filesystem                                           Size  Used Avail Use% Mounted on
/dev/sda1                                            3.7G  3.5G     0 100% /
none                                                 4.0K     0  4.0K   0% /sys/fs/cgroup
udev                                                 3.8G  4.0K  3.8G   1% /dev
tmpfs                                                780M  296K  780M   1% /run
none                                                 5.0M     0  5.0M   0% /run/lock
none                                                 3.9G  4.0K  3.9G   1% /run/shm
none                                                 100M     0  100M   0% /run/user
172.16.5.25:/mnt/Storage/Media                        15T  4.5T  9.8T  32% /home/padmin/Media
172.16.5.25:/mnt/Storage/Backups/VG-PlexMediaServer  9.8T     0  9.8T   0% /home/padmin/Backups
padmin@VG-PlexMediaServer:~$


New guest:

Code:
sudo ubuntu-vm-builder kvm trusty \
 --domain *** \
 --dest /mnt/Storage/Virtual_Machines/VG-PlexMediaServer/VG-PlexMediaServer.qcow2 \
 --hostname VG-PlexMediaServer \
 --arch amd64 \
 --mem 8192 \
 --cpus 8 \
 --user padmin \
 --pass *** \
 --bridge br0 \
 --ip 172.16.5.26 \
 --mask 255.255.255.0 \
 --net 172.16.5.0 \
 --bcast 172.16.5.255 \
 --gw 172.16.5.1 \
 --dns 8.8.8.8 8.8.4.4 \
 --components main,universe \
 --addpkg acpid \
 --addpkg openssh-server \
 --addpkg nfs-common \
 --addpkg linux-image-generic \
 --addpkg htop \
 --addpkg stress \
 --rootsize=100000 \
 --libvirt qemu:///system ;
 
I'm working for a company that develops high tech graphics tablets, & they have some desktops for scrap that I'd like to take home w/me. I have already asked if there were a way for me to take them home & was told that the motherboards had to be wiped & certified.
Is there a way to wipe information from a motherboard?
If there is, isn't it as simple as removing the 2032 form/size battery & doing a full power cycle?
I do intend on using the parts to piece together a server.
 
I'm working for a company that develops high tech graphics tablets, & they have some desktops for scrap that I'd like to take home w/me. I have already asked if there were a way for me to take them home & was told that the motherboards had to be wiped & certified.
Is there a way to wipe information from a motherboard?
If there is, isn't it as simple as removing the 2032 form/size battery & doing a full power cycle?
I do intend on using the parts to piece together a server.

I suggest creating your own thread.
 
Back
Top Bottom