Replacing a Drive in FreeNAS 11.2

How to replace a drive in FreeNAS 11.2 using the wizard.

First we need to remove the bad drive from our pool.
1. Login to the wizard UI.
2. Go to Storage->Pools->Select a Pool->Click the Gear Icon->Select Status
3. Pick the drive you wish to take offline, click the 3 dots and select Offline.
4. Turn off your system so you can replace the drive.

Remove the physical disk
1. Now physically remove the drive you took offline.
2. Then install the new drive.

Adding the New Drive to your Volume and Resilvering.
1. Power up your system.
2. Login to the wizard. From the Dashboard your pool should show one less disk than before.
3. Go to Storage->Disks
4. You should see the new disk and in the Pool column it should show: Unused. (It is not assigned to a pool). Note it’s name, ie ada3 (or whatever for yours).
5. Go back to Storage-Pool->Click the Gear Icon->Select Status
6. You should see your old drive as OFFLINE. From the 3 dots select Replace. From the popup asking you the Replacing disk just select the disk, you inserted, ie ada3 and click Replace Disk.
7. FreeNAS should then start resilvering which is rebuilding the RAID array. This can take a long time so be patient. (A 10 TB drive can take a day or more).
8. In the top right it will show resilvering with an icon with 2 arrows spinning in a circle.

Links:
https://www.youtube.com/watch?v=mb_1pKI398Y

FreeNAS RAID Mirroring For Home Use

Simple mirroring (RAID 1) is my RAID choice for home FreeNAS setups.  My choice is a 3 drive mirrored RAID.  Quick summary below.

Why Mirroring?

  • Simple
  • Capacity is the same as a single drive. 
  • The more disks the more reliability.
  • Read speed is faster due to round robin reading from the mirrored drives.
    • A 3 way mirror gives you 3x read performance.
  • Write speed is the same as a single drive.
  • Fault Tolerance via mirroring.
    • A 3rd drive in a mirror gives you a hot-spare that is already synced.
  • More Flexibility — Upgrading the pool with mirroring is easy, just zpool add.

Why Not RAID-Z?

  • Most home RAIDs won’t have 4, 5, …, 8 or more disks.
  • Generally Slower Read Performance than mirrored
    •  Must access all disks for every single block of data, no gain, speed limited to the speed of a single disk.
    • Corner Case: Streaming large amounts of data in parallel can be faster than mirrored, but this is not normal for home users.
  • Write speed is the same as a single drive.
  • Fault Tolerance — a higher probability that we lose data
    • More disks means higher probability for a failure.
    • Disk Failures means you need to get a replacement quickly, more quickly than a mirror.
  • Less Flexibility — generally once your set your RAID it’s set.
    • It can be changed but it’s complicated.

Reference:

  • resilvering – the act of recreating data on a drive added to the pool.
  • RAID-0 – basic striping. All disks work as 1 giant disk, no fault tolerance.
  • MIRRORING / RAID-1 – basic mirroring.  Every disk has the same data.  The more disks, the more reliability.  Minimum of 2 disks required.
  • RAID-Z / RAID-5 – n-1 space, 1 parity disk for fault tolerance. 1 disk failure, before you lose data.  Reads and Writes about the same speed as a single disk.  Minimum of 3 disks but 4 recommended.
  • RAID-Z2 and RAID-Z3 – same as RAID-Z but with 2 or 3 disks for pairty.  This equates to 2 or 3 disk failures before you lose data.  Minimum of 5 and 8 disks respectively.
  • RAID-10 – RAID 1 + 0.  Mirrors then stripes data.  Minimum of 4 disks required.

Links:
https://constantin.glez.de/2010/01/23/home-server-raid-greed-and-why-mirroring-still-best/
https://jrs-s.net/2015/02/06/zfs-you-should-use-mirror-vdevs-not-raidz/
https://www.ixsystems.com/community/threads/mirroring-vs-raidz2-resilvering.43230/

Recover Administrator Account on Mac

If you lost your Administrator Account on your Mac for whatever reason here’s what you can do to recover it.

Boot into Single User Mode by Restarting your Mac and pressing and holding ⌘ + s
Using the Terminal:

Check the dive (I skipped): /sbin/fsck -fy
Mount the drive as read-write: /sbin/mount -uw /
Remove the Apple Setup Done file: rm /var/db/.AppleSetupDone
Restart the system: reboot

Upon restarting the system you’ll go through the setup process and create a new admin account.  Using that you can restore or give admin status to another account if so desired.

Link:
https://apple.stackexchange.com/questions/164331/i-dont-have-administrator-account-on-my-mac

Using your Sony Camera and Canon DSLR as a Webcam on Mac OS X Without a Capture Card

During the COVID-19 Shelter-in-Place we’ve been on video conferences a lot more than usual. To use your Sony Camera or Canon DSLR as a webcam without a capture card here are some things you can do.
I have successfully tried this with a Sony RX100 VA and a Sony A7ii and a Canon SL1 though not every model works.  You will need CamTwist for either camera and additional software for Sony and Canon.

Install CamTwist for both Sony and Canon.

  1. Install CamTwist
    1. http://camtwiststudio.com/download/
  2. Start CamTwist
  3. Open Preferences
  4. Set your video size, I use Custom and 1920×1080
  5. Set your Frame rate, I use 30
  6. You will have to restart CamTwist for the changes to go into effect.

Sony (kind of a hack)

Sony cameras must support Display Live View which can be seen here https://support.d-imaging.sony.co.jp/app/imagingedge/en/devices.

  1. Install Sony Imaging Edge Desktop.
    1. https://imagingedge.sony.net/en-us/ie-desktop.html
  2. Install Sony Remote from the Imaging Edge application.
  3. With your camera set the USB Connection to PC Remote
    1. For the RX100 VA (new sony menu) it was under Setup3
    2. For the a7ii (original sony menu) it was under ……
  4. Turn on your camera
  5. Plug in a micro usb cable to your camera and the computer.
  6. Start Imaging Edge Desktop
  7. Click Start for Remote
  8. Double Click on your Camera with the pop up.
  9. The Remote Application should show up with a live preview.
  10. Start CamTwist
  11. Select Desktop+, then click Select
  12. Under Settings unselect Full Screen and select Confine to Application Window.
  13. From the Select from existing windows select Remote (Remote)
  14. Select Resizeable selection.
  15. Click Select capture area
  16. Position the rectangle over the live preview.
  17. When you start your video conference software, like zoom, go to Prefences->Settings->Video->Camera and select CamTwist.

Note that you must leave the Remote application running and up on the screen but you can obstruct it and put other windows on top of it and still use it as a webcam.

Canon

For a list of supported Canon Cameras go here: https://github.com/v002/v002-Camera-Live/blob/master/CAMERAS.md

  1. Install Camera Live, I’ve linked a stable release as of today.
    1. https://github.com/v002/v002-Camera-Live/releases/download/11/Camera.Live.zip
    2. Their github (for coders)
  2. Turn on your Canon DSLR.
  3. Connect your usb cable to the Canon and the computer.
  4. Start Camera Live
    1. You should see Active for your camera in Camera Live.
  5. Start CamTwist
  6. Select Syphon
  7. Click Select
  8. In the Settings section under Syphon Server select Camera Live.
  9. When you start your video conference software, like zoom, go to Prefences->Settings->Video->Camera and select CamTwist.

3rd Gen Toyota 4Runner Drive Smog Cycle

Cheat Sheet to reset Drive Cycle for Smog Check for 3rd Generation Toyota 4Runner

  • Turn car on
  • Leave car in idle
  • Turn on defrost full blast and rear defrost
  • 2-3 mins in idle
  • 3000 rpms for 10 seconds
  • (Turn defrosters off)
  • Drive 55 mph for 5 minutes (use cruise control ) do not go above 65 mph
  • Come to complete stop, do not hit brake.  Use hand brake (not foot brake)
  • (Or 35-45 for 16 minuets)
  • Keep above 55 and less than 65

Original Notes:
1. Start the engine. Idle the engine in drive for two and a half minutes with the A/C and rear defroster on.
2. Turn the A/C and rear defrost off, and accelerate to 55 mph at half throttle.
3. Hold at a steady speed of 55 mph for three minutes.
4. Decelerate (coast down) to 20 mph without braking.
5. Accelerate back to 55 to 60 mph at *** throttle.
6. Hold at a steady speed of 55 to 60 mph for five minutes.
7. Decelerate (coast down) to a stop without braking.
If all other emissions systems are functioning properly, completing the drive cycle above should make your 2002 Toyota Camry’s emission monitors READY to pass the smog check.
We recommend performing the drive cycle 2 or 3 times to make sure all monitors are complete. Take extra caution when performing drive cycles on public roadways.

qDslrDashboard wireless camera tethering

Wirelessly tether your Sony, Canon or Nikon camera with qDslrDashboard.  It works in OS X, Windows, Linux, Android and iOS.  This application allows you to control your camera remotely without wires.

For Sony RX100 V

  1. Go to Network -> Ctrl w/ Smartphone -> Connection -> Trash (to connect with Password)
  2. From your computer (or whatever device) connect to the Camera’s wifi.
  3. From qDslrDashboard click Sony.
  4. You are now tethered.


https://dslrdashboard.info

RAW Video on the Canon SL1 with Magic Lantern

Shoot Raw Video on the Canon SL1 with Magic Lantern

Make Sure your SL1 firmware is Magic Lantern requests, which as of this post is 1.0.1.

Download the latest Magic Lantern Firmware, which as of this post is
https://builds.magiclantern.fm/jenkins/job/100D.101/15/artifact/platform/100D.101/magiclantern-Nightly.2018Jun06.100D101.zip

Installation is simple.

  • Unzip the file and copy the contents onto a formatted SD Card.
  • After inserting the card in the camera, from the Canon Menu select Firmware Update.
  • After installation, please copy your ROM backup files (ML/LOGS/ROM*.BIN on the card) to a safe place.

Settings
Press the Trash button to enter the Magic Lantern menu.  My settings don’t quite work right yet but here’s what I’m using so far

Modules

  • mlv_lite.mo
  • mlv_play.mo
  • mlv_rec.mo
  • mlv_snd.mo

Movie

  • FPS Override 23.991
  • RAW video (MLV)
  • 1280×544
  • 2.35:1
  •  Reserve card space off

Audio

  • MLV Sound on

Uninstall Method 1

  • Canon menu: Format card, remove Magic Lantern.
    • This procedure does not disable the BOOTDISK flag. With this method, you will still be able to run Magic Lantern from other cards. 
  • Never delete the Magic Lantern files from the card! Format the card instead.

Uninstall Method 2

  • Run Firmware Update from your ML card.
  • Follow the on-screen instructions, including the fine print.
    • This procedure disables the BOOTDISK flag. You will no longer be able to run Magic Lantern, unless you reinstall it.
    • Some settings changed by Magic Lantern might be persistent; this procedure will not reset them. To restore the camera to factory state, you may also want to clear all camera settings and custom functions from Canon menu.

Useful Links:
Magic Lantern for the Canon SL1 https://builds.magiclantern.fm/100D-101.html
Magic Lantern https://www.magiclantern.fm/
Howto Video: https://www.youtube.com/watch?v=b70s-RAT2qw

Brew Package Manager for Mac

Homebrew, via the command brew, is a package manger for Mac like apt-get is for Debian.
brew installs packages to their own directory /usr/local/Cellar and then symlinks their files into /usr/local/bin.

Basic Usage:
Install brew
/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)”

Update Homebrew
brew update

Install an App
brew install wget

Uninstall an App
brew uninstall wget

Upgrade an App
brew update wget

Remove stale file and outdated downloads
brew cleanup

Analytics:
Recently brew has turned on analytics recording from your device to a google cloud server.  If you wish to disable this you can run
brew analytics off

Or you can enter the following in your environment, .bash_profile
export HOMEBREW_NO_ANALYTICS=1

Links:
https://brew.sh/
https://docs.brew.sh/Analytics