New Found Love for LaTeX

In a previous post called, Scaled Solar System, I used \LaTeX for math equations. Recently I needed the ability to create a few documents that are mostly works in progress, and I wanted the ability to track the progress of these documents using git.

Traditional word processing tools like Google Docs or Microsoft Word are insufficient because tracking changes with Microsoft Word is simply too difficult to deal with.

Both my wife and I are about to travel to China in November and we had several disparate itineraries from various airlines, tour operators, hotels, and such. In the past, I usually used Microsoft Excel to create a combined itinerary. However, last year I tried to keep the combined itinerary in the iOS Notes App. Both solutions were less than ideal. Excel proved too difficult to edit on the go because I either had to use the mobile Excel app or open up my laptop. Once changes are made it would be difficult to track the changes that I made.

With the iOS Notes App, editing the cells within a table is okay for simple stuff, but for a complicated itinerary, the formatting capabilities simply did not exist. The tracking of changes was also an issue.

This time around, I am going to use \LaTeX. I have not used \LaTeX since I wrote my fourth-year thesis back at University of Toronto, that would be 33 years ago!

It took me some time to set up my Neovim environment for \LaTeX editing and previewing. The MacTeX package is an excellent all-in-one package for my Mac. After about a couple days, I was able to create a master itinerary with all the attached source itineraries, all delivered in a single PDF document. I am also able to create hyperlinks within the PDF so that I can jump to the source itinerary or booking information from the master itinerary entry.

The resulting PDF master itinerary has been very satisfactory. It was fulfilling to once again work with \LaTeX!

Bedroom Audio Setup

After watching the YouTube video below:

YouTube video that I watched
Playlist

I felt compelled to listen to my Bedroom audio system which I have not done for quite a while. I was pleasantly surprised by the musicality of the playlist that I quickly mustered for the night. I created the playlist on my old Mac mini 2018 using Apple Music configured for lossless music and USB output. On the other end of the USB is a Topping D90 DAC. My Q-Acoustic 3020i bookshelf speakers are powered by the S.M.S.L. DA-9 stereo amplifier.

With the acquisition of the S.M.SL. DA-9 stereo amplifier from my Winnipeg trip last year, and a freed, old Mac mini. I am able to swap out the old Raspberry Pi running Volumio as my streamer, and use the Mac mini instead. This way not only can I take advantage of Apple Music Loseless, but I can also install mpd to play my FLAC library. I still use the Rigelian App on both my Mac and iOS devices to control music from my mpd.

However to get the Mac mini working with my Topping D90 external DAC, I had to configure mpd appropriately. Below is a snippet of the mod configuration for audio_output. The configuration file is stored in ~/.mpd/mpd.conf.

audio_output {
          type            "osx"
          name            "D90 "
          device          "D90 " # optional
          mixer_type      "disabled"
          dop              "yes"
}

The following command can be used to obtain the detail of the USB audio devices that my Mac is aware of:

system_profiler SPAudioDataType

Note the extra trailing space of the D90 name.

Below are the pictures of the equipment and software of my stack.

My External DAC Topping D90
My Stereo Amplifier S.M.S.L DA-9
Q-Acoustics 3020i Bookshelf Speakers
I use the Rigelian App to control my music on mpd
All together now!

Replacing VDEV in a ZFS Pool

Several months ago I had an old 3TB hard drive (HDD) crashed on me. Luckily it was a hard drive that is primarily used for backup purposes, so the data lost can quickly be duplicated from source by performing another backup. Since it was not critical that I replace the damaged drive immediately, it was kind of left to fester until today.

Recently I acquired four additional WD Red 6TB HDD, and I wanted to install these new drives into my NAS chassis. Since I am opening the chassis, I will irradicate the damaged drive, and also take this opportunity to swap some old drives out of the ZFS pool that I created earlier and add these new drives into the pool.

I first use the following command to add two additional mirror vdev’s each composed of the two new WD Red drives.

sudo zpool add vault mirror {id_of_drive_1} {id_of_drive_2}

The drive id’s is located in the following path: /dev/disk/by-id and is typically prefixed with ata or wwn.

This created two vdev’s into the pool, and I can remove an existing vdev. Doing so will automatically start redistributing the data on the removing vdev to the other vdev’s in the pool. All of this is performed while the pool is still online and running to service the NAS. To remove the old vdev, I execute the following command:

sudo zpool remove vault {vdev_name}

In my case, the old vdev’s name is mirror-5.

Once the remove command is given, the copying of data from the old vdev to the other vdev’s begins. You can check the status with:

sudo zpool status -v vault

The above will show the copying status and the approximate time it will take to complete the job.

Once the removal is completed, the old HDD of mirror-5 is still labeled for ZFS use. I had to use the labelclear command to clean the drive so that I could repurpose the drives for backup duty. Below is an example of the command.

sudo zpool labelclear sdb1

The resulting pool now looks like this:

sudo zpool list -v vault

(Output truncated)
                                                                                                                     NAME                                                    SIZE  ALLOC   FREE
vault                                                  52.7T  38.5T  14.3T
  mirror-0                                             9.09T  9.00T  92.4G
    ata-ST10000VN0008-2JJ101_ZHZ1KMA0-part1                -      -      -
    ata-WDC_WD101EFAX-68LDBN0_VCG6VRWN-part1               -      -      -
  mirror-1                                             7.27T  7.19T  73.7G
    wwn-0x5000c500b41844d9-part1                           -      -      -
    ata-ST8000VN0022-2EL112_ZA1E8S0V-part1                 -      -      -
  mirror-2                                             9.09T  9.00T  93.1G
    wwn-0x5000c500c3d33191-part1                           -      -      -
    ata-ST10000VN0004-1ZD101_ZA2964KD-part1                -      -      -
  mirror-3                                             10.9T  10.8T   112G
    wwn-0x5000c500dc587450-part1                           -      -      -
    wwn-0x5000c500dcc525ab-part1                           -      -      -
  mirror-4                                             5.45T  1.74T  3.72T
    wwn-0x50014ee2b9f82b35-part1                           -      -      -
    wwn-0x50014ee2b96dac7c-part1                           -      -      -
  indirect-5                                               -      -      -
  mirror-6                                             5.45T   372G  5.09T
    wwn-0x50014ee265d315cd-part1                           -      -      -
    wwn-0x50014ee2bb37517e-part1                           -      -      -
  mirror-7                                             5.45T   373G  5.09T
    wwn-0x50014ee265d315b1-part1                           -      -      -
    wwn-0x50014ee2bb2898c2-part1                           -      -      -
cache                                                      -      -      -
  nvme-Samsung_SSD_970_EVO_Plus_500GB_S4P2NF0M419555D   466G   462G  4.05G

The above indirect-5 can be safely ignored. It is just a reference to the old mirror-5.

This time we replaced the entire vdev, another technique is to replace the actual drives within the vdev. To do this, we will have to use the zpool replace command. We may also have to perform a zpool offline first before the replace command. This can be successively done on all the old drives in the mirror with newer drives with larger capacities to increase an existing vdev’s size.

Solar Savings with Ultra Low Overnight Rate

In a previous post, I talked about switching our electricity rates from a tiered rate schedule to an Ultra Low Overnight (ULO) rate schedule. The latter rate schedule effectively means we pay a third less when using electricity from 11pm to 7am.

I have received a full month’s invoice while on the ULO rate. Below is a comparison with the previous year.

Compare 2023 vs 2024 Invoices

The above is a clear depiction of the resulting differences. We are able to get way more credits using the ULO rates. I call this a huge success, especially since we had a few hot days with the air conditioning running. Let us see how the remaining months will add to our credits.

Ultra-Low Overnight Rates

As of January 2024, Alectra Utilities begin to allow residential customers with net meters to take advantage of the Ultra-Low Overnight (ULO) rate schedule. Since I have plenty of battery backup, I thought this ULO pricing schedule is perfect for my solar and battery backup situation.

Ultra-Low Overnight Electricity Rates from Alectra Utilities

The idea is to use my batteries from 7am to 11pm during the non-ULO periods, and then replenish my batteries at the low $0.028 per kWh after 11pm. I also switched our two Green Vehicles to charge after 11pm.

Another great benefit of the ULO schedule is that electricity generated and feedback to the grid is credited with the increased rates. This means any surplus electricity sent back to the grid between 4pm and 9pm during the weekdays gets a premium credit of $0.286 per kWh. This is ten times more than the usage after 11pm!

Typical weekday grid utilization (May 24, 2024 – Friday)

After reconfiguring my solar – backup system to this new schedule, you can see from the above chart that my electricity consumption is now in alignment with the ULO schedule.

The process of switching from a Tier Rate schedule to the ULO schedule was not simple. I had to call Alectra customer support and waited for literally hours to get a staff member who was knowledgeable enough to help me with the switch.

I hope the pain is now over and we begin to reap the benefits of the ULO pricing. Let us hope that this summer we will be able to collect much more credit because of ULO.

Random Thoughts on Individualism

I liken individualism to cancerous cells to society, some are malignant and some are benign. If you have too much of the former, you embark on a social evolutionary force of society that may not be sustainable. Especially malignant forces that consumes social resources and then breaks foundational bonds between individuals, acting as a divisive force in society. I would also include those who are extremely wealthy and successful individuals here, since they contribute to the income gap and their individual morals act as tribal magnets creating a divisive force.

The benign goes with the flow or fails to seek enough influence or creates enough havoc to be a social impact.

Like malignant cells group together and prosper or grow to form tribes (tumors).

My current bet (not sure), is that a society that concentrates on individualism will ultimately result in a bilateral class structure where one class dominates over the other. The stability and growth potential will then depend on the attenuation of the tension between the classes. Done correctly, the subjugated class may not feel it. Done incorrectly results in a revolution.

All forms of government must face this reality of individualism. The difference is the way in which they manage it. The big experiment of the West is they let the tumors grow. This experiment has reached the typical dynastic period of 200–300 years, so it will be interesting to see if it is still sustainable or not. In the past, there has been self imposed chemotherapies to the likes of wars that perform resets on the malignant cells, so to create more room for individualism to flourish.

Vancouver Trip

On April 9th, 2024 both my wife and I hopped on a flight to Vancouver to visit some friends and family. I got an excellent deal from Expedia for TD paying $1035 CAD for 2 return trips and a rental SUV for the week. We ended up getting a fancy Nissan Rogue for the trip.

We did not do any sightseeing other than Port Moody. Our primary purpose while staying in the City of Vancouver is to sample the Chinese food in Vancouver. This means hanging out largely in Richmond and doing some dim sum.

On the fourth day of our trip, we took the BC Ferries to Vancouver Island, visiting Nanaimo for two days, and spending our final two days in Victoria. We finished the week-long trip by taking a return ferry to Tsawwassen terminal, which is close enough to Richmond for us to get another good Chinese B.B.Q pork meal at HK BBQ Master, which I highly recommend!

Our rough schedule looked something like this:

  • Day 1 – Fish & chips along with ice cream at Port Moody; visited Natalie’s beautiful home on the hills, and gave Zoey (her cat) a nice rub; and then to Burnaby to stay at our cousin’s place and got introduced to Maple our new, small canine friend;
  • Day 2 – Lunch, snacks & dinner in Richmond; love the pineapple bun with its tasty, thick, cold butter; savored the lamb served at Hao’s;
  • Day 3 – Dim sum at Kirin restaurant in New Westminister and catching up with Agnes; followed by dessert at La Foret Jubilee with Natalie joining us;
  • Day 4 – Ferry from Horseshoe Bay to Departure Bay at Nanaimo; did some hiking and scenery;
  • Day 5 – More scenery in Nanaimo and shopping at The Old Country Market at Coombs; What goat on the roof?
  • Day 6 – Drive to Victoria with a stop in Chemainus to inspect the murals, hike on the Kinsol Trestle bridge, with a late lunch at OEB Breakfast, and dinner at Finn’s;
  • Day 7 – Hiked the Beacon’s Hill Park with a huge breakfast at Blue Fox Cafe; met a couple of new friends, one named Lynda at the cafe; visited the Butterfly Gardens; drove along the Malahat scenic views; experienced high tea at Pendray Inn and Tea House; and finally dinner at the Pagliacci’s.
  • Day 8 – Took the ferry back from Swartz Bay to Tsawwassen just in time to do lunch at HK BBQ Master; say goodbye to Derrick and Maple; and back on the afternoon flight to Toronto; Darci welcomed us back home at 2:00am on the following day!

The most memorable part of the trip was of course getting to meet up with our family and friends. The best food from this trip had to be from HK BBQ Master, in my opinion, with an honorable mention of the Banh-mi sandwiches that Derrick got for us from his famous Vietnamese sandwich vendor.

What would we do differently? I think knowing what we know about Nanaimo, we would probably skip all of Nanaimo1 and reallocate the days to be one more in Vancouver and an extra day in Victoria. We would also switch the order of our visit to Vancouver and the Island. This way we can spend more time during the weekend with our friends and family.

With this trip and our visit to Victoria, the capital city of British Columbia, we have completed our tour of all of the provincial capitals in Canada. Checkbox checked!

Below is a summary video produced by Carol of our trip.

Produced, Directed, and Edited by Carol
  1. I decided to visit Nanaimo out of curiosity based on the Gweilo 60 YouTube channel that I follow. ↩︎