Showing posts with label workstation. Show all posts
Showing posts with label workstation. Show all posts

Wednesday, October 10, 2018

Home Server Update

If you’ve followed this blog for any length of time, you’ve known my home server has served multiple purposes over the years and has been built with simplicity in mind. We’re not talking enterprise grade components or architecture here. I’ve found that many consumer-grade resources work extremely well for my needs.
What are those needs?
Simple: media management/DVR capability, and private cloud file server. This is where Plex and Seafile step in.

Most everyone’s heard of Plex these days. It’s a media-managing powerhouse that makes organizing and consuming your content easy and enjoyable. As a Plex Pass subscriber, you also gain OTA TV DVR capabilities. As a closet cord cutter, this has been a crucial capability. The fact that it adds the DVR’d content into my normal TV Media Library is a huge win!



Second is Seafile which is a Dropbox/Google Drive alternative. It’s open source, lightweight, and runs beautifully on a Ubuntu Server mini.iso build. With Seafile, I can access my files and documents from anywhere, using any device.



It came time to upgrade my Server as I wanted to get better transcoding power for my DVR content, and faster access to all my files. Additionally, a major goal of this upgrade was to rid myself of Windows 10. If you recall, I ran Windows 10 on my server natively, then ran my Plex/Seafile servers in VMs using VMware Workstation. This made management incredibly simple, however Windows 10 became such an annoying ‘hypervisor’ that I couldn’t wait to get rid of it. Furthermore, my MSI Motherboard was old enough that it wouldn’t allow installation of newer Linux Operating Systems. The last BIOS update was from 2014 and there were no signs of a newer version coming.
So as any geek would logically conclude, it was time for an upgrade!

After some research, I ended up with the following components:

1. AMD Ryzen 5 2400G with Radeon RX Vega Graphics (Coming from an A10 6800k APU)
2. Asus PRIME B450M-A Motherboard (Micro ATX)
3. Corsair Vengeance LPX DDR4 Memory, 16GB running at 2900 MHz (Coming from 8GB 2100 MHz.. fast memory compliments the APU)
4. Linux Mint 19 installed natively on a 500GB WD M.2 SSD (Blue)

The rest of my Media is stored on a random selection of spinning disk that are configured with LVM. LVM allows me to specify a single location for Plex to reference for all the video/music/photos.

Seafile is still running in a VM as it was much easier to move this over along with its Certificates and configurations than to rebuild. I was really impressed at how it booted up, connected to the new data repository and took no additional configuration!

I like the concept of the APU for my home needs. It creates a flexible environment as my needs grow and change with the home server (if I choose to run Steam in the off hours, for example!)

One thing I’m missing is a DR plan

As it stands, if a disk within my LVM group fails, I lose that data. I need to look into the best DR option in this setup. Let me know in the comments if you have any recommendations!
Share:

Thursday, November 3, 2016

Send Time Machine backups to a VM hosted in Windows

I've successfully configured Time Machine backups over my home network using VMware Workstation, Ubuntu, and a 1 TB WD drive. A big thanks to HowToGeek for their Raspberry Pi post for the inspiration and to Netatalk's Wiki. Here we go!

screen-shot-2016-11-03-at-8-44-29-am:: Prerequisites


  • Windows (using Windows 10 in this tutorial)

  • VMware Workstation (using 12.5 Pro)

  • Linux ISO (using Ubuntu 16.04 mini.iso)

  • Dedicated backup drive (using a 1TB WD) formatted as HFS+

  • macOS Seirra

:: Prepare your drive


Format your hard drive to be HFS+. This can be done by booting to any linux live disk and using gparted. You'll likely need to install hfsprogs and hfsplus to enable the formatting.

When attached to your Windows Host system, Windows won't mount this drive in Explorer, but you can still see it in Windows Disk Management to ensure it's working properly. Here it shows as Disk 0screen-shot-2016-11-02-at-9-22-21-pm

Choose a mount point that your backup server will use for the drive. I'll use /media/tm
Choose a user that will connect to your backup server from the Mac. <your-user>

Save these for later.

:: Setting up the dedicated backup server


I run my personal servers on a Windows 10 box under VMware Workstation. It's plain simple, easy to administer and maintain, and works great for home needs. Because I like dedicating my servers to individual VMs, I wanted a small VM to attach my 1 TB backup drive to - something with a small footprint as I won't need to interact with the OS much. This is why I chose to use Ubuntu's mini.iso

  1. In Workstation, create a new VM using the mini.iso. The only 'options' I chose to install with it were opensshserver for management, and samba (might use this in the future). My VM uses 512 MB of RAM and 1vCPU.

  2. Obtain HFS+ support by running
    sudo apt-get install hfsprogs hfsplus

  3. Let's take a moment to add our disk to the VM. I chose for my VM to have direct access to the physical disk as its primary purpose will be for backups.screen-shot-2016-11-02-at-9-25-48-pm
    screen-shot-2016-11-02-at-9-26-09-pm

  4. Now boot the VM back up, and mount the drive
    sudo mount -t hfsplus -o force,rw /dev/sd* /media/tm

    You should also add this to /etc/fstab so it mounts properly at boot
    /dev/sd* /media/tm hfsplus force,rw,user,auto 0 0

  5. Setup permissions for your user that will connect to the server
    sudo chown -R root:users /media/tm
    sudo chmod -R g+rwx /media/tm
    sudo usermod -a -G users <your-user>

  6. Once that's done, follow Netatalk's Wiki on setting up v3.1.10 (current at time of writing) on Ubuntu 14.04 (my server is using Ubuntu 16.04 and I can attest it works). Here are the commands for reference:
    sudo apt-get install build-essential libevent-dev libssl-dev libgcrypt11-dev libkrb5-dev libpam0g-dev libwrap0-dev libdb-dev libtdb-dev libmysqlclient-dev avahi-daemon libavahi-client-dev libacl1-dev libldap2-dev libcrack2-dev systemtap-sdt-dev libdbus-1-dev libdbus-glib-1-dev libglib2.0-dev libio-socket-inet6-perl tracker libtracker-sparql-1.0-dev libtracker-miner-1.0-dev

    wget http://prdownloads.sourceforge.net/netatalk/netatalk-3.1.10.tar.gz

    tar -xf netatalk-3.1.10.tar.gz

    cd netatalk-3.1.10

    ./configure --with-init-style=debian-systemd --without-libevent --without-tdb --with-cracklib --enable-krbV-uam --with-pam-confdir=/etc/pam.d --with-dbus-sysconf-dir=/etc/dbus-1/system.d --with-tracker-pkgconfig-version=1.0

    make

    sudo make install

     
  7. Now edit your /etc/nsswitch.conf and append mdns4 mdns to the end of the hosts file so it looks like this
    hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 mdns

     
  8. Create the file /etc/avahi/services/afpd.service with the below contents
    <?xml version="1.0" standalone='no'?><!--*-nxml-*-->
    <!DOCTYPE service-group SYSTEM "avahi-service.dtd">
    <service-group>
       <name replace-wildcards="yes">%h</name>
       <service>
         <type>_afpovertcp._tcp</type>
         <port>548</port>
       </service>
       <service>
         <type>_device-info._tcp</type>
         <port>0</port>
         <txt-record>model=TimeCapsule</txt-record>
       </service>
    </service-group>
     

  9. Setup the Netatalk AFP File Server config file /usr/local/etc/afp.conf
    [<your-user>]
     path = /home/<your-user>
     rolist = <your-user>
    
    [Global]
     mimic model = TimeCapsule6,106
    
    [Time Machine]
     path = /media/tm (or whatever your mount point is)
     time machine = yes

  10. Run the init scripts in this order
    sudo /etc/init.d/avahi-daemon start

    sudo service netatalk start
  11. Add services to default runlevels
    sudo update-rc.d avahi-daemon defaults
    sudo update-rc.d netatalk defaults

  12. Back on your Mac, add your Ubuntu machine to /etc/hosts
    x.x.x.x <ubuntu-hostname>

  13. At this point, you should be able to connect to the server via hostname. From Finder Window, press command+K and enter the server address afp://<ubuntu-hostname> 

  14. Open Time Machine Preferences and select the Time Machine disk
If you don't see your disk in Time Machine preferences, ensure that it was mounted as read/write on the backup server. Good luck!
Share:

Friday, May 29, 2015

Using OwnCloud with an NTFS file share [Updated]

Trying to use NTFS with your OwnCloud server? You may be running into some challenges.

My setup

I'm running OwnCloud 8 server in a Linux Mint VM (VMware Workstation) for personal use. It uses a USB 3.0 2TB drive formatted as NTFS and it works pretty darn well.

I won't be going over how to setup OwnCloud server in Ubuntu - if you're interested in that, here's a great guide by our friends over at Noobs Lab (I highly recommend using MySQL or any other database solution over the included SQLite.. you will have major performance issues if you use SQLite)

The reason I wanted to go this route with my configuration is because I can have a small (~20GB) Ubuntu Server utilizing a larger external drive that can be easily read by both my Linux Server, as well as my Windows host machine. Smaller VMs means more internal space on my host machine!

At first I thought I could simply "pass through" my drive to the VM for hosting my personal cloud, similar to how I configured my Plex Server. Unfortunately the system was having trouble recognizing the pass-through (even though file syncing actually worked when manually copying files to the share.. very strange). I would see an error similar to the one below:



Data directory (/mnt/hgfs/owncloud/data) is readable by other users.

Please change the permissions to 0770 so that the directory cannot be listed by other users.

I was unable to change the permissions on the NTFS mount when it was configured this way.

Through researching the issue and the options available, I decided the easiest method to continue to use NTFS with this setup is to create a Windows share on my owncloud data folder, and mount it as a CIFS share to the OwnCloud server.

What you'll need

  1. Host machine with VMware Workstation (or similar software)

  2. OwnCloud server in a Ubuntu-based Virtual Machine (~20gb vm)

  3. External USB 3.0 Drive formatted as NTFS

  4. Patience and determination!
On to the how-to:

I should preface this section: this setup works for me and my needs, which is a single-user personal setup. This is not recommended for a multi-user, production configuration.

  1. Remove any VMware Workstation-based pass through you have configured for the NTFS drive. This may require you to power off the VM and delete the pass through.

  2. On the host side (in my case, Windows 8.1 Windows 10) create a local user account dedicated for owning the share. This will be used later when we mount it to Linux. In my example, ocadmin

  3. On the host side, create a normal share on the folder you'll be using as the owncloud data folder (right click, properties, Sharing tab, Share...) and give full permissions to the user account you created. This should create a share location similar to \\hostname\data

  4. Now login to the OwnCloud server, edit your /etc/fstab using vi, or gedit, or what have you. At the bottom of the file, add an entry that looks like this://<ip of host>/data </location/to/put/share> cifs uid=www-data,username=ocadmin,password=<your password>,iocharset=utf8,file_mode=0770,dir_mode=0770,sec=ntlm 0 0Tips:<ip of host> This is the IP of the machine running Workstation
    </location/to/put/share> This is where the share will be mounted to the Linux OwnCloud server. This could be your Linux Home folder, desktop, documents folder.. the options are endless... endless
    www-data is the default OwnCloud server account running the owncloud service
    ocadmin/password is the local host machine account we careated earlier

  5. Now we need to make OwnCloud aware of the location we want it to use for storing files. Edit the config.php file to include the you typed above.sudo vi /var/www/owncloud/config/config.phpModify the 'datadirectory' field to your new location so it reads something like:'datadirectory' => '/var/www/owncloud/data',

    Save and close this file.

  6. Now in the terminal, type sudo mount -a and ensure there are no errors mounting the share we configured in fstab.

  7. Give your Linux system a quick reboot and you should no longer receive the errors at the top of this post when accessing your OwnCloud URL.
[Update, May 13 2016]

If you've followed this method and are planning on an upgrade from OC8 to OC9, be sure to read the OC Upgrade documentation very carefully as it states, "When using an NFS mount for the data directory, do not change its ownership from the default. The simple act of mounting the drive will set proper permissions for ownCloud to write to the directory. Changing ownership as above could result in some issues if the NFS mount is lost."

Did this post help you? Let me know in the comments!
Share:

Thursday, September 11, 2014

Running Workspace Portal 2.1 in VMware Workstation 10

With the release of Workspace Portal 2.1, the vApp has been reduced to a single VM providing simpler deployment and administration. [See my post What's New in Workspace Portal 2.1] This also means it's extremely easy to run inside of VMware Workstation or Fusion. In this post, we'll be covering how to import Workspace Portal 2.1 into VMware Workstation.
Why would you want to run Workspace Portal in a desktop solution like Workstation?



Well it's by no means a production solution. It does provide a decent lab environment at best though! This is great for tinkering with the product before implementing in a vSphere environment. You can get a pretty good idea for how the product flows. If you happen to have a more advanced home lab setup in Workstation already (With Active Directory, vCenter Server, etc). If you don't, luckily there is a Demo User Store that can be selected during the Web GUI configuration which will create dummy accounts for you and use an embedded OpenLDAP instance on the VM. Pretty cool!

More info on using the Demo User Store here

To install Workspace Portal 2.1 in Workstation:



  1. Download the Workspace Portal 2.1 OVA

  2. In Workstation, choose File > Open

  3. Configure your desired Name and Location, and choose Import

  4. Review the details of the VM


  5. Power on the VM, and you'll run through the Setup Wizard

    1. Choose [1] for a complete installation

    2. Enter [y] to accept

    3. Next configure your hostname, DNS, and IP settings

    4. When done, hit [q] to continue, then [y] to confirm



  6. After it performs its initial boot and configuration, you'll see the familiar Login screen with an IP address.

    NOTE: in this example, we're using a Bridged network connection. This can be verified and configured under VM > Settings > Network Adapter

  7. In my setup, I want to be able to access Workspace with the hostname I provided earlier in the setup. In order to do that, I need to modify my computer's /etc/hosts file. My daily OS is Linux Mint, so I will perform this via the command line:

    1. First ensure you can ping the appliance from the IP listed in the console window
      ping 192.168.3.161

    2. Then add an entry for the appliance in the hosts file
      vi /etc/hostsThe entry should follow this format:
      FQDN shortname

      e.g., 192.168.3.161 workspace21.mycomputer.local workspace21



  8. Once your hosts file is updated, you should be able to ping the appliance by the name you gave it.

  9. Final step is to open a browser and login per the console window's instructions!



Next Steps: Run through the web GUI to further configure the appliance. See my post on Installing/Configuring Workspace Portal


Share: