<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>church1e&#039;s blog</title>
<subtitle>A repository of information technology questions and answers</subtitle>
<link href="https://churchill.ddns.me.uk/feed" rel="self" />
<id>https://churchill.ddns.me.uk/feed</id>
<updated>2024-05-10T11:23:25+01:00</updated>
<entry>
<title type="html">&quot;upgrades have been deferred due to phasing&quot;</title>
<content type="html">&lt;p&gt;If you are using Ubuntu 24.04, you are likely to come across the following message while updating your system in the terminal:&lt;/p&gt;
&lt;pre&gt;&lt;strong&gt;The following upgrades have been deferred due to phasing&lt;/strong&gt;&lt;/pre&gt;
&lt;!-- pagebreak --&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;pre&gt;martin@church1e$ &lt;strong&gt;sudo apt update &amp;&amp; sudo apt upgrade -y&lt;/strong&gt;
[sudo] password for martin:
Hit:1 http://security.ubuntu.com/ubuntu noble-security InRelease
Hit:2 http://gb.archive.ubuntu.com/ubuntu noble InRelease
Hit:3 http://gb.archive.ubuntu.com/ubuntu noble-updates InRelease
Hit:4 http://gb.archive.ubuntu.com/ubuntu noble-backports InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
2 packages can be upgraded. Run &#039;apt list --upgradable&#039; to see them.
Fetched 89.7 kB in 21s (4,340 B/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
&lt;strong style=&quot;color:red&quot;&gt;The following upgrades have been deferred due to phasing:&lt;/strong&gt;
  dmsetup libdevmapper1.02.1
0 to upgrade, 0 to newly install, 0 to remove and 2 not to upgrade.&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;DON&#039;T PANIC&lt;/strong&gt; ... It&#039;s not an error it&#039;s just a message that informs you that the package(s) in question have an update but it&#039;ll be rolled out in phases. In other words, if the upgraded package(s) causes regression, the updates are rolled back to lessen any greater impact.&lt;/p&gt;
&lt;p&gt;Thinking out loud, I&#039;m sure this is a reworded version of the message that was seen in previous versions of Ubuntu&lt;/p&gt;
&lt;pre&gt;&lt;strong&gt;following packages have been kept back&lt;/strong&gt;&lt;/pre&gt;
&lt;p&gt;You could try running the update process again in a few days to see if the package(s) have been updated.&lt;/p&gt;
</content>
<link href="https://churchill.ddns.me.uk/post/upgrades-have-been-deferred-due-to-phasing-in-ubuntu-24-04/" />
<id>https://churchill.ddns.me.uk/post/upgrades-have-been-deferred-due-to-phasing-in-ubuntu-24-04/</id>
<updated>2024-05-10T11:23:25+01:00</updated>
<category term="Linux"/>
</entry>
<entry>
<title type="html">Rebooting Windows with a scheduled task</title>
<content type="html">&lt;p&gt;Creating a scheduled task to reboot your Windows machine once a week or nightly may help avoid issues such as high CPU or ram, frozen applications, or older hardware that could benefit from frequent reboots.&lt;!-- pagebreak --&gt;&lt;/p&gt;
&lt;h4&gt;Creating the scheduled task&lt;/h4&gt;
&lt;ol&gt;
   &lt;li&gt;Logon to the machine with an account with admin rights&lt;/li&gt;
   &lt;li&gt;Open &lt;strong&gt;Task Schedular&lt;/strong&gt; &amp;rarr; &lt;strong&gt;Action&lt;/strong&gt; &amp;rarr; &lt;strong&gt;Create Task&lt;/strong&gt;&lt;/li&gt;
   &lt;ol type=&quot;I&quot;&gt;
      &lt;li&gt;In the GENERAL tab: &lt;img src=&quot;http://churchill.ddns.me.uk/media/windows/scheduled-reboot-1.png&quot; alt=&quot;Scheduled reboot GENERAL tab&quot; /&gt;
      &lt;ol type=&quot;a&quot;&gt;
         &lt;li&gt;Name: &lt;strong&gt;Reboot Server Nightly&lt;/strong&gt; (or name it whatever you want)&lt;/li&gt;
         &lt;li&gt;Author: &lt;strong&gt;Administrator&lt;/strong&gt;&lt;/li&gt;
         &lt;li&gt;Description: &lt;strong&gt;Reboot Server Nightly at #pm&lt;/strong&gt;&lt;/li&gt;
         &lt;li&gt;Security Options:&lt;ol type=&quot;i&quot;&gt;
         &lt;li&gt;Select: &lt;strong&gt;Run whether user is logged on or not&lt;/strong&gt;&lt;/li&gt;
         &lt;li&gt;Seelct: &lt;strong&gt;Run with highest privileges&lt;/strong&gt;&lt;/li&gt;
      &lt;/ol&gt;&lt;/li&gt;
   &lt;/ol&gt;&lt;/li&gt;
   &lt;li&gt;In the TRIGGERS tab: &lt;img src=&quot;http://churchill.ddns.me.uk/media/windows/scheduled-reboot-2.png&quot; alt=&quot;Scheduled reboot TRIGGERS tab&quot; /&gt;
   &lt;ol type=&quot;a&quot;&gt;
      &lt;li&gt;In Settings, select &lt;strong&gt;Daily&lt;/strong&gt;, and enter the desired start date/time.&lt;/li&gt;
      &lt;li&gt;In Advanced Settings, make sure &lt;strong&gt;Enabled&lt;/strong&gt; is slected at the bottom.&lt;/li&gt;
   &lt;/ol&gt;&lt;/li&gt;
   &lt;li&gt;In the ACTIONS tab: &lt;img src=&quot;http://churchill.ddns.me.uk/media/windows/scheduled-reboot-3.png&quot; alt=&quot;Scheduled reboot ACTIONS tab&quot; /&gt;
   &lt;ol type=&quot;a&quot;&gt;
      &lt;li&gt;Action: &lt;strong&gt;Start a program&lt;/strong&gt;&lt;/li&gt;
      &lt;li&gt;In &quot;Program/script&quot; field, enter &lt;strong&gt;c:\Windows\System32\shutdown.exe&lt;/strong&gt;&lt;/li&gt;
      &lt;li&gt;In &quot;Add arguments (optional)&quot; field, enter &lt;strong&gt;/r&lt;/strong&gt;&lt;/li&gt;
   &lt;/ol&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;If you want to see the last time the server was rebooted, you can use the &lt;strong&gt;systeminfo&lt;/strong&gt; command. For example:
&lt;pre&gt;&lt;strong&gt;systeminfo | find /i &quot;Boot Time&quot;&lt;/strong&gt;
System Boot Time:              07/06/2022, 22:00:00&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;WARNING:&lt;/strong&gt; The scheduled task will reboot the machine even with active users using the system &amp;mdash; users will get message on their desktop saying &amp;quot;you will be signed out automatically&amp;quot;&lt;/p&gt;</content>
<link href="https://churchill.ddns.me.uk/post/rebooting-windows-with-a-scheduled-task/" />
<id>https://churchill.ddns.me.uk/post/rebooting-windows-with-a-scheduled-task/</id>
<updated>2022-06-08T08:54:45+01:00</updated>
<category term="Windows"/>
</entry>
<entry>
<title type="html">Unable to open FTP links in Mozilla Firefox 89</title>
<content type="html">&lt;p&gt;A strange issue today after an update for the Mozilla Firefox web browser. I can no longer access FTP sites which is a problem for me and some of my customers who require access to certain FTP sites to download updates and patches, etc.&lt;!-- pagebreak --&gt;&lt;/p&gt;
&lt;p&gt;After a quick search around the web I found an article whereby Mozilla announced that Mozilla&#039;s Firefox web browser will no longers support the FTP protocol from Firefox 90 onwards. Hmmm! this is strange as I am current running Mozilla Firefox version 89.0.2 so should not be affected by this upcoming change - but I am!!&lt;/p&gt;
&lt;p&gt;A little further digging around the web and we find that Mozilla published a deprecation timeline on the organization&#039;s Addons blog. According to the information published there, FTP support will be turned off by default in Firefox 88 but not removed until Firefox 90 -- So that explains it!&lt;/p&gt;
&lt;h4&gt;What happens when I access an FTP link?&lt;/h4&gt;
&lt;p&gt;Firefox displays a prompt when a user attempts to load an FTP address. Installed FTP programs are displayed in the list, but if there are none available you are advised to install an FTP client and make it the default FTP handler in your Firefox browser.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://churchill.ddns.me.uk/media/misc/firefox-ftp-dialog.png&quot; alt=&quot;Firefox ftp APP chooser dialog&quot; /&gt;&lt;/p&gt;
&lt;h4&gt;Opening FTP link in Firefox 88/89&lt;/h4&gt;
&lt;p&gt;As the FTP code has not been removed from Firefox versions 88 and 89, we can simply change the preferences to restore FTP support in these browsers:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://churchill.ddns.me.uk/media/misc/firefox-enable-ftp.png&quot; alt=&quot;Firefox ENABLED ftp&quot; /&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Enter &lt;strong&gt;about:config&lt;/strong&gt; in the Firefox address bar.&lt;/li&gt;
&lt;li&gt;Confirm that you will be careful.&lt;/li&gt;
&lt;li&gt;Search for &lt;strong&gt;network.ftp.enabled&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Set the value to &lt;strong&gt;true&lt;/strong&gt; by double-clicking on the line, or with a &lt;code&gt;left-click&lt;/code&gt; on the toggle icon.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Firefox will again open ftp resources&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; This will continue to work until Mozilla Firefox browser version 90, as FTP code will be disabled completely in that release.&lt;/p&gt;</content>
<link href="https://churchill.ddns.me.uk/post/unable-to-open-ftp-links-in-mozilla-firefox-89/" />
<id>https://churchill.ddns.me.uk/post/unable-to-open-ftp-links-in-mozilla-firefox-89/</id>
<updated>2021-04-22T10:11:29+01:00</updated>
<category term="Misc"/>
</entry>
<entry>
<title type="html">IP essentials</title>
<content type="html">&lt;p&gt;In later releases of the Linux OS, &lt;code&gt;ip&lt;/code&gt; has replaced the older &lt;code&gt;ifconfig&lt;/code&gt; to configure network interfaces. In this article we&#039;ll provide essential examples using both these commands.&lt;!-- pagebreak --&gt;&lt;/p&gt;
&lt;h4&gt;Add IP address&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Using &#039;ifconfig&#039;:&lt;br /&gt;
&lt;pre&gt;ifconfig &amp;lt;interface&amp;gt; &amp;lt;ip-address&amp;gt; netmask &amp;lt;netmask-addr&amp;gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Using &#039;ip&#039;:&lt;br /&gt;
&lt;pre&gt;ip addr add &amp;lt;ip-address&amp;gt;/&amp;lt;netmask&amp;gt; dev &amp;lt;interface&amp;gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example to add address 10.10.10.10 with netmask 24 to device eth0&lt;/p&gt;
&lt;pre&gt;linux@host% &lt;strong&gt;sudo ifconfig eth0 10.10.10.10 netmask 255.255.255.0&lt;/strong&gt;
linux@host% &lt;strong&gt;sudo ip addr add 10.10.10.10/24 dev eth0&lt;/strong&gt;&lt;/pre&gt;
&lt;h4&gt;Remove IP address&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Using &#039;ifconfig&#039;:&lt;br /&gt;
&lt;pre&gt;ifconfig &amp;lt;interface&amp;gt; &amp;lt;ip-address&amp;gt; 0.0.0.0&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Using &#039;ip&#039;:&lt;br /&gt;
&lt;pre&gt;ip addr del &amp;lt;ip-address&amp;gt;/&amp;lt;netmask&amp;gt; dev &amp;lt;interface&amp;gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;pre&gt;linux@host% &lt;strong&gt;sudo ifconfig eth0 0.0.0.0&lt;/strong&gt;
linux@host% &lt;strong&gt;sudo ip addr del 10.10.10.10/24 dev eth0&lt;/strong&gt;&lt;/pre&gt;
&lt;h4&gt;Down an interface&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Using &#039;ifconfig&#039;:
&lt;pre&gt;ifconfig &amp;lt;interface&amp;gt; down&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Using &#039;ip&#039;:
&lt;pre&gt;ip link set &amp;lt;interface&amp;gt; down&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;pre&gt;linux@host% &lt;strong&gt;sudo ifconfig eth0 down&lt;/strong&gt;
linux@host% &lt;strong&gt;sudo ip link set eth0 down&lt;/strong&gt;&lt;/pre&gt;
&lt;h4&gt;Up an interface&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Using &#039;ifconfig&#039;:
&lt;pre&gt;ifconfig &amp;lt;interface&amp;gt; up&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Using &#039;ip&#039;:
&lt;pre&gt;ip link set &amp;lt;interface&amp;gt; up&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;pre&gt;linux@host% &lt;strong&gt;sudo ifconfig eth0 up&lt;/strong&gt;
linux@host% &lt;strong&gt;sudo ip link set eth0 up&lt;/strong&gt;&lt;/pre&gt;
&lt;h4&gt;Enable Promiscious mode&lt;/h4&gt;
&lt;p&gt;Promiscuous mode is a network setting that lets a network interface card (NIC) capture and process all data packets on a network segment, not just those addressed to it, effectively allowing a device to &quot;listen&quot; to all traffic passing by.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Using &#039;ifconfig&#039;:
&lt;pre&gt;ifconfig &amp;lt;interface&amp;gt; promisc&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Using &#039;ip&#039;:
&lt;pre&gt;ip link set &amp;lt;interface&amp;gt; promisc on&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;pre&gt;linux@host% &lt;strong&gt;sudo ifconfig eth0 promisc&lt;/strong&gt;
linux@host% &lt;strong&gt;sudo ip link set eth0 promisc on&lt;/strong&gt;&lt;/pre&gt;
&lt;h4&gt;Show device&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Using &#039;ifconfig&#039;:
&lt;pre&gt;ifconfig &amp;lt;interface&amp;gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Using &#039;ip&#039;:
&lt;pre&gt;ip addr show dev &amp;lt;interface&amp;gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;pre&gt;linux@host% &lt;strong&gt;ifconfig eth0&lt;/strong&gt;
linux@host% &lt;strong&gt;ip addr show dev eth0&lt;/strong&gt;&lt;/pre&gt;</content>
<link href="https://churchill.ddns.me.uk/post/ip-essentials/" />
<id>https://churchill.ddns.me.uk/post/ip-essentials/</id>
<updated>2021-01-02T20:58:47+00:00</updated>
<category term="Linux"/>
</entry>
<entry>
<title type="html">How to convert VM disk from qcow2 to raw format</title>
<content type="html">&lt;p&gt;&lt;!-- pagebreak --&gt;&lt;/p&gt;
&lt;p&gt;This article provides a 5 step process to convert an existing virtual machine disks format from &lt;em&gt;qcow2&lt;/em&gt; to &lt;em&gt;raw&lt;/em&gt; format.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; This article assumes to have existing Virtual Machines (VMs) in order to following these steps!&lt;/p&gt;
&lt;ol&gt;&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Backup current virtual machine config&lt;/strong&gt;
&lt;pre&gt;virsh dumpxml vm-name &amp;gt; vm-name.xml&lt;/pre&gt;
replace &lt;strong&gt;vm-name&lt;/strong&gt; with your virtual machine name. In this example, we will use the virtual machine &#039;&lt;em&gt;alpha&lt;/em&gt;&#039;:
&lt;pre&gt;root@vmsvr# &lt;strong&gt;virsh dumpxml alpha &amp;gt; ~/alpha.xml&lt;/strong&gt;&lt;/pre&gt;
If you are unsure or just want to double check the virtual machine name, you can find this information by running the following command:
&lt;pre&gt;virsh list --all&lt;/pre&gt;
for example:
&lt;pre&gt;root@vmsvr# &lt;strong&gt;virsh list --all&lt;/strong&gt;
 Id   Name          State
------------------------------
 1    alpha         running
 2    bravo         running
 4    charlie       running
 5    echo          running
 12   foxtrot       paused
 -    golf          shut off
 -    vmtest        shut off&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Find the path of the exisiting disk image&lt;/strong&gt;
&lt;pre&gt;virsh dumpxml vm-name | grep file&lt;/pre&gt;
in our example:
&lt;pre&gt;root@vmsvr# &lt;strong&gt;virsh dumpxml alpha | grep file&lt;/strong&gt;
  &amp;lt;disk type=&#039;file&#039; device=&#039;disk&#039;&amp;gt;
    &amp;lt;source file=&#039;/var/lib/libvert/images/alpha/tmplEzSU838.qcow2&#039;/&amp;gt;&lt;/pre&gt;
&lt;/li&gt;
from the about output, we can confirm that our disk image is named &#039;&lt;em&gt;/var/lib/libvert/images/alpha/tmplEzSU838.qcow2&lt;/em&gt;&#039;&lt;/br&gt;&lt;/br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Convert the disk image&lt;/strong&gt;
&lt;pre&gt;qemu-img convert &amp;lt;image-name&amp;gt;.qcow2 &amp;lt;image-name&amp;gt;.raw&lt;/pre&gt;
in our example:
&lt;pre&gt;root@vmsvr# &lt;strong&gt;qemu-img convert /var/lib/libvert/images/alpha/tmplEzSU838.qcow2 \
                  /var/lib/libvert/images/alpha/tmplEzSU838.raw&lt;/strong&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Edit the VM config&lt;/strong&gt;
&lt;pre&gt;virsh edit &amp;lt;vm-name&amp;gt;&lt;/pre&gt;
then find the &lt;strong&gt;driver&lt;/strong&gt; and &lt;strong&gt;source&lt;/strong&gt; lines:
&lt;pre&gt;   &amp;lt;disk type=&#039;file&#039; device=&#039;disk&#039;&amp;gt;
      &amp;lt;driver name=&#039;qemu&#039; type=&#039;&lt;mark&gt;qcow2&lt;/mark&gt;&#039;/&amp;gt;
      &amp;lt;source file=&#039;/var/lib/libvert/images/alpha/tmplEzSU838.&lt;mark&gt;qcow2&lt;/mark&gt;&#039;/&amp;gt;
      &amp;lt;target dev=&#039;vda&#039; bus=&#039;virtio&#039;/&amp;gt;
      &amp;lt;address type=&#039;pci&#039; domain=&#039;0x0001&#039; bus=&#039;0x00&#039; slot=&#039;0x04&#039; function=&#039;0x0&#039;/&amp;gt;
   &amp;lt;/disk&amp;gt;&lt;/pre&gt;
replace &lt;strong&gt;qcow2&lt;/strong&gt; with &lt;strong&gt;raw&lt;/strong&gt; in the highlighted places. The changes should look something like:
&lt;pre&gt;&amp;lt;disk type=&#039;file&#039; device=&#039;disk&#039;&amp;gt;
      &amp;lt;driver name=&#039;qemu&#039; type=&#039;&lt;strong&gt;raw&lt;/strong&gt;&#039;/&amp;gt;
      &amp;lt;source file=&#039;/var/lib/libvert/images/alpha/tmplEzSU838.&lt;strong&gt;raw&lt;/strong&gt;&#039;/&amp;gt;
      &amp;lt;target dev=&#039;vda&#039; bus=&#039;virtio&#039;/&amp;gt;
      &amp;lt;address type=&#039;pci&#039; domain=&#039;0x0001&#039; bus=&#039;0x00&#039; slot=&#039;0x04&#039; function=&#039;0x0&#039;/&amp;gt;
    &amp;lt;/disk&amp;gt;&lt;/pre&gt;
save changes and exit the editor.&lt;/br&gt;&lt;/br&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Start the VM&lt;/strong&gt;
&lt;pre&gt;virsh start vm-name&lt;/pre&gt;
in our example:
&lt;pre&gt;root@vmsvr# &lt;strong&gt;virsh start alpha&lt;/strong&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;</content>
<link href="https://churchill.ddns.me.uk/post/how-to-convert-vm-disk-from-qcow2-to-raw-format/" />
<id>https://churchill.ddns.me.uk/post/how-to-convert-vm-disk-from-qcow2-to-raw-format/</id>
<updated>2020-12-18T09:15:30+00:00</updated>
<category term="Linux"/>
</entry>
<entry>
<title type="html">How to refresh Apps on your Sky Q box</title>
<content type="html">&lt;p&gt;Have you ever got into the state were your TV apps are missing from the Apps or Sidebar sections of your Sky Q box, or your Apps (ie: Prime, Netflix, Spotify, YouTube) freezes, or even get a blank screen 15-30 seconds after starting your app?&lt;/p&gt;
&lt;p&gt;If so, follow these simple steps to resolve the problem!&lt;!-- pagebreak --&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Press the &lt;strong&gt;Home&lt;/strong&gt; button on your Sky Q remote&lt;/li&gt;
&lt;li&gt;Highlight &lt;strong&gt;Settings&lt;/strong&gt; on the left-hand menu &lt;span style=&quot;color: red;&quot;&gt;&amp;mdash; &lt;strong&gt;DO NOT PRESS SELECT&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;On your remote press &lt;kbd&gt;0&lt;/kbd&gt; &lt;kbd&gt;0&lt;/kbd&gt; &lt;kbd&gt;1&lt;/kbd&gt;, then press &lt;kbd&gt;Select&lt;/kbd&gt; to access the Installer menu.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Apps&lt;/strong&gt;, and highlight &lt;strong&gt;Refresh&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Refresh all Apps on this box&lt;/strong&gt;. You&#039;ll then see the message:
&lt;pre&gt;&lt;strong&gt;Your apps are being refreshed&lt;/strong&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Press &lt;strong&gt;Dismiss&lt;/strong&gt; to return to normal viewing.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If after you&#039;ve performed an App refresh and you still have an issue &amp;mdash; Contact Sky for support.&lt;/p&gt;</content>
<link href="https://churchill.ddns.me.uk/post/how-to-refresh-sky-q-apps/" />
<id>https://churchill.ddns.me.uk/post/how-to-refresh-sky-q-apps/</id>
<updated>2020-08-07T19:23:01+01:00</updated>
<category term="Misc"/>
</entry>
<entry>
<title type="html">How to setup ZFS Storage Appliance iSCSI luns on Ubuntu Server</title>
<content type="html">&lt;p&gt;Both Ubuntu Server 20.10 and Ubuntu Server 21.04 come with the iSCSI initiator package &lt;code&gt;open-iscsi&lt;/code&gt; installed out of the box allowing for easy configuration for iSCSI attached storage.&lt;/p&gt;
&lt;p&gt;This article describes how to integrate iSCSI LUNs presented by an ZFS Storage Appliance (&lt;abbr title=&quot;ZFS Storage Appliance&quot;&gt;ZFSSA&lt;/abbr&gt;) onto the Ubuntu Server environment using the command-line interface.&lt;/p&gt;
&lt;p&gt;This article has been updated to show an installation on Ubuntu Server 21.04, thus your output may differ from that below.&lt;!-- pagebreak --&gt;&lt;/p&gt;
&lt;h2&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;This article assumes the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;For the Ubuntu server:&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;You know the &lt;code&gt;root&lt;/code&gt; password.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;For the ZFSSA:&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;You know the &lt;code&gt;hostname&lt;/code&gt;/&lt;code&gt;IP address&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You know and &lt;code&gt;root&lt;/code&gt; password.&lt;/li&gt;
&lt;li&gt;Pools are configured.&lt;/li&gt;
&lt;li&gt;The network has been configured to present LUNS.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Installing the Ubuntu iSCSI Initiator&lt;/h4&gt;
&lt;p&gt;The &lt;code&gt;open-iscsi&lt;/code&gt; package is installed by default on both Ubuntu Server 20.10 and 21.04. However, if you have removed the package for some reason you can simply reinstall the iSCSI initiator package using the &lt;code&gt;apt(8)&lt;/code&gt; command. For example:&lt;/p&gt;
&lt;pre&gt;# &lt;strong&gt;apt install open-iscsi&lt;/strong&gt;
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libisns0 libopeniscsiusr0.2.0
The following NEW packages will be installed:
  libisns0 libopeniscsiusr0.2.0 open-iscsi
0 upgraded, 3 newly installed, 0 to remove and 15 not upgraded.
Need to get 437 kB of archives.
After this operation, 2176 kB of additional disk space will be used.
Do you want to continue? [Y/n] &lt;strong&gt;y&lt;/strong&gt;
   :
Preconfiguring packages ...
   :
   :
Preparing to unpack .../open-iscsi_2.1.2-1ubuntu1_amd64.deb ...
Unpacking open-iscsi (2.1.2-1ubuntu1) ...
   :
   :
Setting up open-iscsi (2.1.2-1ubuntu1) ...
Created symlink /etc/systemd/system/sockets.target.wants/iscsid.socket → /lib/systemd/system/iscsid.socket.
Created symlink /etc/systemd/system/iscsi.service → /lib/systemd/system/open-iscsi.service.
Created symlink /etc/systemd/system/sysinit.target.wants/open-iscsi.service → /lib/systemd/system/open-iscsi.service.
   :
   :
update-initramfs: Generating /boot/initrd.img-5.8.0-36-generic&lt;/pre&gt;
&lt;h4&gt;iSCSI Initiator auto startup&lt;/h4&gt;
&lt;p&gt;The iSCSI Initiator should automatically start on each reboot of the Ubuntu Server. However, we can confirm here that this is the case.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Check that the iSCSI Initiator will start when the system is rebooted:
&lt;pre&gt;# &lt;strong&gt;systemctl is-enabled open-iscsi.service&lt;/strong&gt;
enabled&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;If the iSCSI Initiator service is &lt;strong&gt;disabled&lt;/strong&gt;, we can simple enable it and start the service as follows:
&lt;pre&gt;# &lt;strong&gt;systemctl enable open-iscsi.service&lt;/strong&gt;
Synchronizing state of open-iscsi.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable open-iscsi
Created symlink /etc/systemd/system/iscsi.service → /lib/systemd/system/open-iscsi.service.
Created symlink /etc/systemd/system/sysinit.target.wants/open-iscsi.service → /lib/systemd/system/open-iscsi.service.
# &lt;strong&gt;systemctl start open-iscsi&lt;/strong&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Ubuntu Server Configuration&lt;/h2&gt;
&lt;h4&gt;Identifying the Host IQN&lt;/h4&gt;
&lt;p&gt;The iSCSI Qualified Name (&lt;abbr title=&quot;iSCSI Qualified Name&quot;&gt;IQN&lt;/abbr&gt;) of the Ubunutu server is used to identify the host to the ZFSSA. The IQN is automatically generated when the iSCSI initiator package is installed and is stored in a file in &lt;code&gt;/etc/iscsi&lt;/code&gt;. To find the IQN of your Ubuntu server, simply type:&lt;/p&gt;
&lt;pre&gt;# &lt;strong&gt;cat /etc/iscsi/initiatorname.iscsi&lt;/strong&gt;
InitiatorName=iqn.1993-08.org.debian:01:b96d30143d8e&lt;/pre&gt;
&lt;p&gt;The IQN for our Ubuntu Server is &lt;code&gt;iqn.1993-08.org.debian:01:b96d30143d8e&lt;/code&gt;.&lt;/p&gt;
&lt;h4&gt;CHAP Authentication&lt;/h4&gt;
&lt;p&gt;In this article, we are using the Challange Handshake Authentication Protocol (&lt;abbr title=&quot;Challenge Handshake Authentication Protocol&quot;&gt;CHAP&lt;/abbr&gt;) to authenticate communication between the Ubuntu server and the ZFSSA. The IQN is used as the CHAP name for the iSCSI initiator and a secure password is used for the CHAP secret.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;To configure CHAP authentication, use your favourite text editor and edit the file &lt;code&gt;/etc/iscsi/iscsid.conf&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Remove the # character from the beginning of the following line:
&lt;pre&gt;#node.session.auth.authmethod = CHAP&lt;/pre&gt;
to:
&lt;pre&gt;&lt;strong&gt;node.session.auth.authmethod = CHAP&lt;/strong&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Set the CHAP username and password, using the following steps:&lt;ol type=&quot;a&quot;&gt;
&lt;li&gt;Edit the lines that set the CHAP username and password to remove the # character from the beginning of these lines:
&lt;pre&gt;#node.session.auth.username = username
#node.session.auth.password = password&lt;/pre&gt;
to:
&lt;pre&gt;&lt;strong&gt;node.session.auth.username = username&lt;/strong&gt;
&lt;strong&gt;node.session.auth.password = password&lt;/strong&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Change &lt;code&gt;username&lt;/code&gt; to the IQN of the Ubuntu server. For example, the username is:
&lt;pre&gt;node.session.auth.username = &lt;strong&gt;iqn.1993-08.org.debian:01:b96d30143d8e&lt;/strong&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Change the password to a reasonably secure password to be used for authentication. For our example, the password &lt;code&gt;CHAPsecret11&lt;/code&gt; is used.  The line now look like:
&lt;pre&gt;node.session.auth.password = &lt;strong&gt;CHAPsecret11&lt;/strong&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;To set the username and password for all targets, use the following:&lt;ol type=&quot;a&quot;&gt;
&lt;li&gt;Removing the # character in front of the following lines:
&lt;pre&gt;#node.session.auth.username_in = username
#node.session.auth.password_in = password&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;and also set the username and password as shown:
&lt;pre&gt;node.session.auth.username_in = &lt;strong&gt;chapuser&lt;/strong&gt;
node.session.auth.password_in = &lt;strong&gt;CHAPsecret22&lt;/strong&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;Save the changes and quit your editor&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Configure the ZFSSA using CLI&lt;/h2&gt;
&lt;p&gt;Access to the ZFSSA CLI is possibe using any SSH client. For example:&lt;/p&gt;
&lt;pre&gt;% &lt;strong&gt;ssh root@zfssa&lt;/strong&gt;
Password: &lt;strong&gt;************&lt;/strong&gt;
Last login: Sun May 10 19:39:23 2020 from ubuntu
zfssa:&amp;gt;&lt;/pre&gt;
&lt;h4&gt;Define the iSCSI Target Group&lt;/h4&gt;
&lt;p&gt;A target group is created on the ZFSSA to define the ports and the protocol by which the LUNs to be presented to the Ubuntu server is accessed.&lt;/p&gt;
&lt;p&gt;In our example, an iSCSI target group is created that contains the LUN as an iSCSI target that is identified by the default IQN for the ZFSSA and presented over default appliance interfaces.&lt;/p&gt;
&lt;pre&gt;zfssa:&amp;gt; &lt;strong&gt;configuration san targets&lt;/strong&gt;
zfssa:configuration san targets&amp;gt; &lt;strong&gt;iscsi&lt;/strong&gt;
zfssa:configuration san targets iscsi&amp;gt; &lt;strong&gt;create&lt;/strong&gt;
zfssa:configuration san targets iscsi target (uncommitted)&amp;gt; &lt;strong&gt;set alias=iSCSI-Targets&lt;/strong&gt;
           alias = iSCSI-Targets (uncommitted) 
zfssa:configuration san targets iscsi target-001 (uncommitted)&amp;gt; &lt;strong&gt;commit&lt;/strong&gt;
zfssa:configuration san targets iscsi&amp;gt; &lt;strong&gt;list&lt;/strong&gt;
TARGET     ALIAS
target-000 iSCSI-Targets
           |
           +-&amp;gt; IQN
               iqn.1986-03.com.sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881
zfssa:configuration san targets iscsi&amp;gt; &lt;strong&gt;select target-000&lt;/strong&gt;
zfssa:configuration san targets iscsi target-000&amp;gt; &lt;strong&gt;list&lt;/strong&gt;
Properties:
           alias = iscsi-Target
             iqn = iqn.1986-03.com.sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881
            auth = none
  targetchapuser = (unset)
targetchapsecret = (unset)
      interfaces = nge0
zfssa:configuration san targets iscsi target-000&amp;gt; &lt;strong&gt;set targetchapuser=chapuser&lt;/strong&gt;
  targetchapuser = iqn.1986-03.com.sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881 (uncommitted)

zfssa:configuration san targets iscsi target-000&amp;gt; &lt;strong&gt;set targetchapsecret=CHAPsecret22&lt;/strong&gt;
targetchapsecret = ************ (uncommitted)
zfssa:configuration san targets iscsi target-000&amp;gt; &lt;strong&gt;commit&lt;/strong&gt;
zfssa:configuration san targets iscsi target-000&amp;gt; &lt;strong&gt;list&lt;/strong&gt;
Properties:
           alias =
             iqn =
            auth =
  targetchapuser = \
      iqn.1986-03.com.sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881
targetchapsecret = ************
      interfaces =

zfssa:configuration san targets iscsi target-000&amp;gt; &lt;strong&gt;cd ..&lt;/strong&gt;
zfssa:configuration san targets iscsi&amp;gt; &lt;strong&gt;list&lt;/strong&gt;
TARGET     ALIAS
target-000 iSCSI-Targets
           |
           +-&amp;gt; IQN
               iqn.1986-03.com.sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881

zfssa:configuration san targets iscsi&amp;gt; &lt;strong&gt;group&lt;/strong&gt;
zfssa:configuration san targets iscsi groups&amp;gt; &lt;strong&gt;create&lt;/strong&gt;
zfssa:configuration san targets iscsi group (uncommitted)&amp;gt; &lt;strong&gt;set name=iscsi-TG&lt;/strong&gt;
name = iscsi-TG (uncommitted)
zfssa:configuration san targets iscsi group (uncommitted)&amp;gt; &lt;strong&gt;set targets=iqn.1986-03.com.sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881&lt;/strong&gt;
targets = iqn.1986-03.com.sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881 (uncommitted)
zfssa:configuration san targets iscsi group (uncommitted)&amp;gt; &lt;strong&gt;commit&lt;/strong&gt;
zfssa:configuration san targets iscsi groups&amp;gt; &lt;strong&gt;list&lt;/strong&gt;
GROUP      NAME
group-000   iscsi-TG
            |
            +-&amp;gt; TARGETS
                iqn.1986-03.com.sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881
zfssa:configuration san targets iscsi groups&amp;gt; &lt;strong&gt;cd /&lt;/strong&gt;
zfssa:&amp;gt;&lt;/pre&gt;
&lt;h4&gt;Defining an iSCSI Initiator&lt;/h4&gt;
&lt;p&gt;An iSCSI initiator is defined to restrict which servers have access to a particular volume. If more than one host can write to a given volume concurrently, inconsistency in file system caching between hosts can cause corruption in the on-disk image. Typically, a single initiator is given access to a volume, unless a specialized cluster file system is being used.&lt;/p&gt;
&lt;p&gt;The iSCSI initiator serves to define the “host” from the point of view of the ZFS Storage Appliance. To identify the Ubuntu server to the ZFS Storage Appliance, the Ubuntu iSCSI IQN must be registered with the ZFS Storage Appliance as shown in the following example.&lt;/p&gt;
&lt;pre&gt;zfssa:&amp;gt; &lt;strong&gt;configuration san initiators&lt;/strong&gt;
zfssa:configuration san initiators&amp;gt; &lt;strong&gt;iscsi&lt;/strong&gt;
zfssa:configuration san initiators iscsi&amp;gt; &lt;strong&gt;ls&lt;/strong&gt;
Children:
                            groups =&amp;gt; Manage groups
zfssa:configuration san initiators iscsi&amp;gt; &lt;strong&gt;create&lt;/strong&gt;
zfssa:configuration san initiators iscsi initiator (uncommitted)&amp;gt; &lt;strong&gt;set alias=Ubuntu&lt;/strong&gt;
                            alias = Ubuntu (uncommitted)
zfssa:configuration san initiators iscsi initiator (uncommitted)&amp;gt; &lt;strong&gt;set initiator= iqn.1993-08.org.debian:01:b96d30143d8e&lt;/strong&gt;
initiator = iqn.1993-08.org.debian:01:b96d30143d8e (uncommitted)
zfssa:configuration san initiators iscsi initiator (uncommitted)&amp;gt; &lt;strong&gt;set chapuser= iqn.1993-08.org.debian:01:b96d30143d8e&lt;/strong&gt;
chapuser = iqn.1993-08.org.debian:01:b96d30143d8e (uncommitted)
zfssa:configuration san initiators iscsi initiator (uncommitted)&amp;gt; &lt;strong&gt;set chapsecret=CHAPsecret11&lt;/strong&gt;
chapsecret = ************ (uncommitted)
zfssa:configuration san initiators iscsi initiator (uncommitted)&amp;gt; &lt;strong&gt;commit&lt;/strong&gt;
zfssa:configuration san initiators iscsi&amp;gt; &lt;strong&gt;ls&lt;/strong&gt;
Initiators:
&lt;br /&gt;NAME          ALIAS
initiator-000 Ubuntu
              |
              +-&amp;gt; INITIATOR
                  iqn.1993-08.org.debian:01:b96d30143d8e
&lt;br /&gt;Children:
              groups =&amp;gt; Manage groups
&lt;br /&gt;zfssa:configuration san initiators iscsi&amp;gt;
&lt;/pre&gt;
&lt;h4&gt;Defining an iSCSI Initiator Group&lt;/h4&gt;
&lt;p&gt;Related iSCSI initiators can be combined into logical groups to allow single commands to be executed on multiple iSCSI initiators, such as, for example, assigning LUN access to all iSCSI initiators in a group with one command. In this example, the iSCSI initiator group will contain one initiator, but in a cluster, where multiple servers are treated as a single logical entity, the initiator group may contain multiple initiators.&lt;/p&gt;
&lt;pre&gt;zfssa:configuration san initiators iscsi&amp;gt; &lt;strong&gt;groups&lt;/strong&gt;
zfssa:configuration san initiators iscsi groups&amp;gt; &lt;strong&gt;create&lt;/strong&gt;
zfssa:configuration san initiators iscsi group (uncommitted)&amp;gt; &lt;strong&gt;set name=ubuntu-servers&lt;/strong&gt;
name = ubuntu-servers (uncommitted)
zfssa:configuration san initiators iscsi group (uncommitted)&amp;gt; &lt;strong&gt;set initiators=iqn.1993-08.org.debian:01:b96d30143d8e&lt;/strong&gt;
initiators = iqn.1993-08.org.debian:01:b96d30143d8e (uncommitted)
zfssa:configuration san initiators iscsi group (uncommitted)&amp;gt; &lt;strong&gt;commit&lt;/strong&gt;
zfssa:configuration san initiators iscsi groups &amp;gt; &lt;strong&gt;ls&lt;/strong&gt;
Groups:
GROUP      NAME
group-000  ubuntu-servers
           |
           +-&amp;gt; INITIATORS
               iqn.1988-12.com.oracle:5fa4af61c4a0

zfssa:configuration san initiators iscsi groups&amp;gt; &lt;strong&gt;cd /&lt;/strong&gt;
zfssa:&amp;gt;&lt;/pre&gt;
&lt;h4&gt;Defining an ZFS Storage Appliance Project&lt;/h4&gt;
&lt;p&gt;A project can be defined in the ZFS Storage Appliance to group related volumes. A project allows inheritance of properties for file systems and LUNs presented from the project and also allows quotas and reservations to be applied.&lt;/p&gt;
&lt;pre&gt;zfssa:&amp;gt; &lt;strong&gt;shares&lt;/strong&gt;
zfssa:shares&amp;gt; &lt;strong&gt;project ubuntu-project&lt;/strong&gt;
zfssa:shares ubuntu-project (uncommitted)&amp;gt; &lt;strong&gt;commit&lt;/strong&gt;
&lt;/pre&gt;
&lt;h4&gt;Defining an Oracle ZFS Storage Appliance LUN&lt;/h4&gt;
&lt;p&gt;A LUN must now be created from an existing pool of storage resources, which the Ubuntu server will access. For this example, a thin-provisioned 32 GB LUN called Demo will be created. The LUN will be set up for an EXT4 file system.&lt;/p&gt;
&lt;p&gt;The target group will be the iSCSI target group created in the section &quot;Defining an iSCSI Target Group&quot; to ensure that this LUN can be accessed using iSCSI protocol. The initiator group defined in the section &quot;Defining an iSCSI Initiator Group&quot; will be used to ensure that only the server(s) defined in the &lt;code&gt;ubuntu-servers&lt;/code&gt; group can access this LUN. (In this example, this group contains only one server.)&lt;/p&gt;
&lt;pre&gt;zfssa:shares&amp;gt; &lt;strong&gt;select ubuntu-project&lt;/strong&gt;
zfssa:shares ubuntu-project&amp;gt; &lt;strong&gt;lun Demo&lt;/strong&gt;
zfssa:shares ubuntu-project/Demo (uncommitted)&amp;gt; &lt;strong&gt;set volsize=32G&lt;/strong&gt;
volsize = 32G (uncommitted)
zfssa:shares ubuntu-project/Demo (uncommitted)&amp;gt; &lt;strong&gt;set targetgroup=iscsi-TG&lt;/strong&gt;
targetgroup = iscsi-TG (uncommitted)
zfssa:shares ubuntu-project/Demo (uncommitted)&amp;gt; &lt;strong&gt;set initiatorgroup=ubuntu-servers&lt;/strong&gt;
initiatorgroup = ubuntu-servers (uncommitted)
zfssa:shares ubuntu-project/Demo (uncommitted)&amp;gt; &lt;strong&gt;list&lt;/strong&gt;
Properties:
               checksum = fletcher4 (inherited)
            compression = off (inherited)
                  dedup = false (inherited)
                 copies = 1 (inherited)
                logbias = latency (inherited)
         secondarycache = all (inherited)
           volblocksize = 8K (default)
                volsize = 32G (uncommitted)
                 sparse = false (default)
               exported = true (inherited)
            targetgroup = iscsi-TG (uncommitted)
         initiatorgroup = ubuntu-servers (uncommitted)
               lunumber = (default)
         assignednumber = (default)
                 status = (default)
            fixednumber = (default)
                lunguid = (default)
         canonical_name = (default)
              nodestroy = (default)

Children:
              snapshots =&amp;gt; Manage snapshots
            replication =&amp;gt; Manage remote replication

zfssa:shares ubuntu-project/Demo (uncommitted)&amp;gt; &lt;strong&gt;set volblocksize=16k&lt;/strong&gt;
           volblocksize = 16K (uncommitted)
zfssa:shares ubuntu-project/Demo (uncommitted)&amp;gt; &lt;strong&gt;commit&lt;/strong&gt;
zfssa:shares ubuntu-project&amp;gt; &lt;strong&gt;cd /&lt;/strong&gt;
zfssa&amp;gt;&lt;/pre&gt;
&lt;h2&gt;Configuring a LUN for Use by the Ubuntu Server&lt;/h2&gt;
&lt;p&gt;Now that the LUN is prepared and available to an authenticated iSCSI initiator, the LUN must be configured for use by the Ubuntu server by completing the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Initiate an Ubuntu iSCSI session with the ZFS Storage Appliance. Since the LUN was created prior to initiating the iSCSI session, it will be automatically enabled.
&lt;pre&gt;# &lt;strong&gt;systemctl start open-iscsi&lt;/strong&gt;
# &lt;strong&gt;iscsiadm -m discovery -t sendtargets -p zfssa&lt;/strong&gt;
192.168.0.73:3260,2 iqn.1986-03.com.sun:02:012213d6-826b-47b3-a438-f336cf0f8c01
# &lt;strong&gt;iscsiadm -m node -p zfssa -l&lt;/strong&gt;
Logging in to [iface: default, target: iqn.1986-03.com.sun:02:012213d6-826b-47b3-a438-f336cf0f8c01, portal: 192.168.0.73,3260]
Login to [iface: default, target: iqn.1986-03.com.sun:02:012213d6-826b-47b3-a438-f336cf0f8c01, portal: 192.168.0.73,3260] successful.&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;(optional) Review &lt;code&gt;/var/log/syslog&lt;/code&gt; and check for any errors associated with iSCSI initiator and connectivity. For example:
&lt;pre&gt;# &lt;strong&gt;tail /var/log/syslog&lt;/strong&gt;
May 10 12:36:16 ubuntu kernel: [70844.682726] scsi host3: iSCSI Initiator over TCP/IP
May 10 12:36:16 ubuntu kernel: [70844.693372] scsi 3:0:0:0: Direct-Access     SUN      Sun Storage 7000 1.0  PQ: 0 ANSI: 5
May 10 12:36:16 ubuntu kernel: [70844.695880] sd 3:0:0:0: Attached scsi generic sg2 type 0
May 10 12:36:16 ubuntu kernel: [70844.696616] sd 3:0:0:0: Power-on or device reset occurred
May 10 12:36:16 ubuntu kernel: [70844.700720] sd 3:0:0:0: [sdb] 67108864 512-byte logical blocks: (34.4 GB/32.0 GiB)
May 10 12:36:16 ubuntu kernel: [70844.701208] sd 3:0:0:0: [sdb] Write Protect is off
May 10 12:36:16 ubuntu kernel: [70844.701211] sd 3:0:0:0: [sdb] Mode Sense: 53 00 00 00
May 10 12:36:16 ubuntu kernel: [70844.702200] sd 3:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn&#039;t support DPO or FUA
May 10 12:36:16 ubuntu kernel: [70844.729760] sd 3:0:0:0: [sdb] Attached SCSI disk
May 10 12:36:17 ubuntu iscsid: Connection1:0 to [target: iqn.1986-03.com.sun:02:012213d6-826b-47b3-a438-f336cf0f8c01, portal: 192.168.0.73,3260] through [iface: default] is operational now&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Locate the new LUN device on the Ubuntu server. The quickest method I find is to grep syslog for &lt;code&gt;Attached SCSI disk&lt;/code&gt;. For example:
&lt;pre&gt;# &lt;strong&gt;grep -i &quot;attached scsi disk&quot; /var/log/syslog&lt;/strong&gt;
May 10 11:27:39 ubuntu kernel: [66727.428119] sd 3:0:0:0: [sdb] Attached SCSI disk
May 10 12:36:16 ubuntu kernel: [70844.729760] sd 3:0:0:0: [sdb] Attached SCSI disk&lt;/pre&gt;
From the about output we can determine that our new lun is &lt;code&gt;sdb&lt;/code&gt;. Let&#039;s confirm:
&lt;pre&gt;# &lt;strong&gt;ls -l /dev/sdb&lt;/strong&gt;
brw-rw---- 1 root disk 8, 16 May 10 12:36 /dev/sdb&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Prepare the lun by creating a Linux partition table using the &lt;code&gt;fdisk(8)&lt;/code&gt; command:
&lt;pre&gt;# &lt;strong&gt;fdisk /dev/sdb&lt;/strong&gt;

Welcome to fdisk (util-linux 2.36.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognised partition table.
Created a new DOS disklabel with disk identifier 0x1581ec2b.

Command (m for help): &lt;strong&gt;p&lt;/strong&gt;
Disk /dev/sdb: 32 GiB, 34359738368 bytes, 67108864 sectors
Disk model: Sun Storage 7000
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 32768 bytes / 32768 bytes
Disklabel type: dos
Disk identifier: 0x1581ec2b

Command (m for help): &lt;strong&gt;n&lt;/strong&gt;
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): &lt;strong&gt;p&lt;/strong&gt;
Partition number (1-4, default 1): &lt;strong&gt;1&lt;/strong&gt;
First sector (2048-67108863, default 2048): &lt;strong&gt;2048&lt;/strong&gt;
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-67108863, default 67108863): &lt;strong&gt;67108863&lt;/strong&gt;

Created a new partition 1 of type &#039;Linux&#039; and of size 32 GiB.

Command (m for help): &lt;strong&gt;w&lt;/strong&gt;
The partition table has been altered.
Calling ioctl() to re-read partition table.
Synching disks.

#&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Configure the device as storage for a large EXT4 file system without any intervening virtualization as shown in the following example:
&lt;pre&gt;# &lt;strong&gt;mkfs.ext4 -L Demo /dev/sdb1&lt;/strong&gt;
mke2fs 1.45.6 (20-Mar-2020)
Creating filesystem with 8388352 4k blocks and 2097152 inodes
Filesystem UUID: c103d253-5861-4800-9d6e-086fa8712b80
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624

Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Setup the new filesystem for mounting at system boot time:
&lt;pre&gt;# &lt;strong&gt;echo &quot;LABEL=Demo /demo ext4 defaults 2 2&quot; &amp;gt;&amp;gt; /etc/fstab&lt;/strong&gt;
# &lt;strong&gt;mkdir /demo&lt;/strong&gt;
# &lt;strong&gt;mount /demo&lt;/strong&gt;
# &lt;strong&gt;df -h /demo&lt;/strong&gt;
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdb1        32G   49M   30G   1% /demo&lt;/pre&gt;
The output from the &lt;code&gt;df(1)&lt;/code&gt; command shows that we now have 32 GB of new space is now available.&lt;/li&gt;
&lt;/ol&gt;</content>
<link href="https://churchill.ddns.me.uk/post/how-to-setup-zfs-storage-appliance-iscsi-luns-on-ubuntu-server/" />
<id>https://churchill.ddns.me.uk/post/how-to-setup-zfs-storage-appliance-iscsi-luns-on-ubuntu-server/</id>
<updated>2020-05-10T19:39:23+01:00</updated>
<category term="Storage"/>
</entry>
<entry>
<title type="html">LibreOffice cannot print text and exported PDF are blank</title>
<content type="html">&lt;p&gt;After recently upgrading a lab system to the latest Lubuntu 20.04 release, I could not get LibreOffice to print the text of any document and any PDF created within LibreOffice export produces a blank document (no text) with the exception of graphics or background colours (where applicable). This is also true with &lt;em&gt;Print-to-File&lt;/em&gt;.&lt;!-- pagebreak --&gt;&lt;/p&gt;
&lt;style&gt;
.images{display:flex;justify=content:center}.nblogo{display:inline-block;margin-left:auto;margin-right:auto;height:30px}
&lt;/style&gt;
&lt;div class=&quot;images&quot;&gt;
&lt;img class=&quot;nblogo&quot; src=&quot;http://churchill.ddns.me.uk/content/public/media/linux/libreoffice-lubuntu2004.png&quot; alt=&quot;LibreOffice and Lubuntu 20.04&quot; /&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; I only see this issue with LibreOffice under Lubuntu 20.04. Running the same version of LibreOffice under Lubuntu 19.10 works as it should.  I&#039;ve also tested on other flavours of Linux (inc. RHEL 8.1, Debian 10) and the symptoms are not shown.&lt;!-- pagebreak --&gt;&lt;/p&gt;
&lt;h4&gt;Errors&lt;/h4&gt;
&lt;p&gt;On the command-line we see the following during PDF creation from LibreOffice:&lt;/p&gt;
&lt;pre&gt;$ &lt;strong&gt;libreoffice --writer&lt;/strong&gt;
&quot;Error: Unknown font tag &#039;F1&#039;&quot;
&quot;Error (198): No font in show/space&quot;
&quot;Error: Unknown font tag &#039;F1&#039;&quot;
&quot;Error (207): No font in show/space&quot;
&quot;Error: Unknown font tag &#039;F1&#039;&quot;
&quot;Error (217): No font in show&quot;
&quot;Error: Unknown font tag &#039;F1&#039;&quot;
&quot;Error (223): No font in show&quot;
&quot;Error: Unknown font tag &#039;F1&#039;&quot;
&quot;Error (229): No font in show&quot;
&quot;Error: Unknown font tag &#039;F1&#039;&quot;
&quot;Error (198): No font in show/space&quot;
&quot;Error: Unknown font tag &#039;F1&#039;&quot;
&quot;Error (207): No font in show/space&quot;
&quot;Error: Unknown font tag &#039;F1&#039;&quot;
&quot;Error (217): No font in show&quot;
&quot;Error: Unknown font tag &#039;F1&#039;&quot;
&quot;Error (223): No font in show&quot;
&quot;Error: Unknown font tag &#039;F1&#039;&quot;
&quot;Error (229): No font in show&quot;&lt;/pre&gt;
&lt;p&gt;And within the generated PDF documents themselves, we see entries like:&lt;/p&gt;
&lt;pre&gt;% CreateFontSubset failed for font &quot;Liberation Serif&quot; weight=5
% CreateFontSubset failed for font &quot;Ariel&quot; weight=5&lt;/pre&gt;
&lt;h4&gt;Workaround&lt;/h4&gt;
&lt;p&gt;Defining the following environment variable solved my problem, although switching to print preview temporary blurs the image until a page refresh is performed (that is the only caveate I&#039;ve found)&lt;/p&gt;
&lt;pre&gt;&lt;strong&gt;SAL_VCL_QT5_USE_CAIRO=true&lt;/strong&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;via LUBUNTU MENU
&lt;ul&gt;
&lt;li&gt;Preferences&lt;/li&gt;
&lt;li&gt;LXQt settings&lt;/li&gt;
&lt;li&gt;Session settings&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Click &lt;strong&gt;Environment (Advanced)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Add&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Double click the empty &lt;em&gt;variable name&lt;/em&gt;, and type &lt;strong&gt;SAL_VCL_QT5_USE_CAIRO&lt;/strong&gt;, press &lt;em&gt;Enter&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Double click the &lt;em&gt;Value&lt;/em&gt; field, and type &lt;strong&gt;true&lt;/strong&gt;, press &lt;em&gt;Enter&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Close&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;OK&lt;/strong&gt; to the dialog box
&lt;pre&gt;&lt;strong&gt;Session Restart Required&lt;/strong&gt;
Some settings will not take effect until the next log in.&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Logout and Log back in for the variable to take effect.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can also test the variable on command-line. For example:&lt;/p&gt;
&lt;pre&gt;$ &lt;strong&gt;SAL_VCL_QT5_USE_CAIRO=true libreoffice --writer&lt;/strong&gt;&lt;/pre&gt;
&lt;h4&gt;To summarise&lt;/h4&gt;
&lt;p&gt;This seems to be an issue with a combination of Libreoffice 6.4x + QT5 + Cairo specifically on the Lubuntu 20.04 OS release. There are a number of bugs associated around it. Will update here when I see more.&lt;/p&gt;
&lt;p style=&quot;color:#3875ba;&quot;&gt;[&lt;strong&gt;UPDATE]&lt;br/&gt;According to __BUGID__ this issue is fixed with Libreoffice 7.0. After downloading and installing the latest release, I also confirm the issue is fixed :-D&lt;/strong&gt;&lt;/p&gt;
</content>
<link href="https://churchill.ddns.me.uk/post/libreoffice-cannot-print-text-and-exported-pdf-are-blank/" />
<id>https://churchill.ddns.me.uk/post/libreoffice-cannot-print-text-and-exported-pdf-are-blank/</id>
<updated>2020-04-13T20:05:53+01:00</updated>
<category term="Linux"/>
</entry>
<entry>
<title type="html">How to find your Windows 10 Product Key using command prompt.</title>
<content type="html">&lt;p&gt;I recently came across a strange issue with a customer who was unable to find the Window Product Keys for some of the systems they had in the office. &quot;&lt;em&gt;No worries&lt;/em&gt;&quot;, I said. &quot;&lt;em&gt;We can get that information directly from Windows itself&lt;/em&gt;&quot;... Or so I thought!!&lt;!-- pagebreak --&gt;&lt;/p&gt;
&lt;p&gt;I tend to use one of following trusted methods to find product keys for any Windows 10 system &amp;mdash; I&#039;m a command-line kind of guy &amp;mdash; GUI&#039;s are not for me :-)&lt;/p&gt;
&lt;ul&gt;
&lt;ol&gt;
&lt;li&gt;via Command Prompt (with elevated priviledges):
&lt;pre&gt;C:\&amp;gt; &lt;strong&gt;wmic path SoftwareLicensingService get OA3xOriginalProductKey&lt;/strong&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;via PowerShell:
&lt;pre&gt;PS C:\&amp;gt; &lt;strong&gt;(Get-WmiObject -query &#039;select * from SoftwareLicensingService&#039;).OA3xOriginalProductKey&lt;/strong&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/ul&gt;
&lt;p&gt;All went well with the exception of 10 systems the company had acquired via acquisitions, as neither of the above commands returned any output, not even an error message.&lt;/p&gt;
&lt;p&gt;After a little digging about, it turned out that these systems were activated with digital licenses &amp;mdash; That solved one mystery. &lt;em&gt;(there&#039;s loads of information out there which explains about digital licenses so I won&#039;t cover it here).&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Dilemma #2 &amp;dash; On some of the systems I have access to I&#039;m still puzzled. Whilst these sytems are all activated using digital certificates, some return the Windows Product Key and some don&#039;t &amp;mdash; The solution it transpires, is that some of these systems have the Product Keys hard-coded in the BIOS, so will return that key...&lt;/p&gt;
&lt;p&gt;Eureka, problem solved!&lt;/p&gt;</content>
<link href="https://churchill.ddns.me.uk/post/how-to-find-your-windows-10-product-key-using-command-prompt-/" />
<id>https://churchill.ddns.me.uk/post/how-to-find-your-windows-10-product-key-using-command-prompt-/</id>
<updated>2019-12-22T13:51:08+00:00</updated>
<category term="Windows"/>
</entry>
<entry>
<title type="html">client_loop: send disconnect: Broken pipe</title>
<content type="html">&lt;p&gt;Have you ever come across the situation when logged on to a server using &lt;code&gt;ssh&lt;/code&gt; that after a period of inactivity your session terminates and you get the following message:&lt;/p&gt;
&lt;pre&gt;user@remote%
client_loop: send disconnect: Broken pipe
user@local%&lt;/pre&gt;
&lt;p&gt;
&lt;p&gt;Whilst this is a harmless message &amp;mdash; Often only seen when you leave an &lt;code&gt;ssh&lt;/code&gt; session open for a long period of inactivity. It can also occur when your WiFi or Internet disconnects &amp;mdash; It&#039;s still an annoyance!&lt;/p&gt;
&lt;p&gt;So the question to ask is...&lt;br/&gt;&lt;strong&gt;&quot;How can I fix this and keep my ssh session alive?&quot;&lt;/strong&gt;&lt;!-- pagebreak --&gt;&lt;/p&gt;
&lt;p&gt;Below are some examples on how to resolve ssh timeouts?&lt;/p&gt;
&lt;h2&gt;On a &quot;per session&quot; basis...&lt;/h2&gt;
&lt;p&gt;You can use the argument &lt;code&gt;-o&lt;/code&gt; on the &lt;code&gt;ssh&lt;/code&gt; command-line to accomplish this on a per session basis (no need to configure the server&#039;s ssh-config).&lt;/p&gt;
&lt;p&gt;From the &lt;a href=&quot;https://man.openbsd.org/ssh_config&quot; target=_blank&gt;ssh_config(5)&lt;/a&gt; man page the options related to keeping connection alive are &lt;code&gt;TCPKeepAlive&lt;/code&gt;, &lt;code&gt;ServerAliveCountMax&lt;/code&gt; and &lt;code&gt;ServerAliveInterval&lt;/code&gt;. The man page gives detailed information, but basically the syntax is:
&lt;pre&gt;user@local% &lt;strong&gt;ssh -o TCPKeepAlive=yes \
    -o ServerAliveCountMax=20 -o ServerAliveInterval=15 \
    &amp;lt;username&amp;gt;@&amp;lt;server&amp;gt;&lt;/strong&gt;&lt;/pre&gt;
&lt;p&gt;The above example forces the client to send &quot;keep-alive&quot; messages every 15 seconds. If the limit of 20 consecutive messages do not get an answer back from the server (20x15 = 5 minutes) then it is understood the connection is broken/dead and the client ssh session is terminated.&lt;/p&gt;
&lt;h2&gt;System wide settings...&lt;/h2&gt;
&lt;p&gt;If you have Administrative rights (super-user capabilities) on the remote server, you can set the &lt;code&gt;ClientAliveInterval&lt;/code&gt; option in the ssh server configuration file &lt;a href=&quot;https://man.openbsd.org/sshd_config&quot; target=_blank&gt;sshd_config(5)&lt;/a&gt;. From the man page:&lt;/p&gt;
&lt;ul&gt;&lt;strong&gt;ClientAliveInterval&lt;/strong&gt;&lt;br/&gt;Sets a timeout interval in seconds after which if no data has been received from the client, &lt;a href=&quot;https://man.openbsd.org/sshd.8&quot; target=_blank&gt;sshd(8)&lt;/a&gt; will send a message through the encrypted channel to request a response from the client. The default is 0, indicating that these messages will not be sent to the client.&lt;/ul&gt;
&lt;p&gt;To set a &lt;code&gt;ClientAliveInterval&lt;/code&gt; value of 300 (&lt;em&gt;5 minutes&lt;/em&gt;). Perform the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Logon to your remote server,&lt;/li&gt;
&lt;li&gt;With administrative rights, using your favourite editor, modify the SSH servers configuration file (&lt;strong&gt;sshd_config&lt;/strong&gt;). For example:
&lt;pre&gt;user@remote% &lt;strong&gt;sudo vi /etc/ssh/sshd_config&lt;/strong&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Add the following entry:
&lt;pre&gt;&lt;strong&gt;ClientAliveInterval 300&lt;/strong&gt;&lt;/pre&gt;
&lt;strong&gt;NOTE:&lt;/strong&gt; Change the value if it is already set &amp;mdash; also making sure there is no # prefix to the option.&lt;/li&gt;
&lt;li&gt;Restart your SSH server. For example:
&lt;pre&gt;user@remote% &lt;strong&gt;sudo systemctl reload sshd.service&lt;/strong&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;On a &quot;per user&quot; basis...&lt;/h2&gt;
&lt;p&gt;If you don&#039;t have administrative rights on the remote server, and equally do not wish to type the options each time you &lt;code&gt;ssh&lt;/code&gt;, you can set the desired options in the user&#039;s &lt;code&gt;ssh&lt;/code&gt; configuration file (&lt;code&gt;~/.ssh/config&lt;/code&gt;). For example:&lt;/p&gt;
&lt;pre&gt;user@local% &lt;strong&gt;cat ~/.ssh/config&lt;/strong&gt;
Host remote
    Hostname my-remote-server.fqdn
    TCPKeepAlive yes
    ServerAliveCountMax 20
    ServerAliveInterval 15
&lt;/pre&gt;
&lt;p&gt;Using the above example. For each &lt;code&gt;ssh&lt;/code&gt; session the user makes to host &lt;em&gt;remote&lt;/em&gt; a &lt;code&gt;ssh&lt;/code&gt; session is established to the server &lt;em&gt;my-remote-server.fqdn&lt;/em&gt;, and each of the options specified in the configuration file are set just as if the user had entered them on the command line.&lt;/p&gt;
&lt;p&gt;Review the &lt;a href=&quot;https://man.openbsd.org/ssh_config&quot; target=_blank&gt;ssh_config(5)&lt;/a&gt; man page for definitiations for each keyword used.&lt;/p&gt;</content>
<link href="https://churchill.ddns.me.uk/post/client-loop-send-disconnect-broken-pipe/" />
<id>https://churchill.ddns.me.uk/post/client-loop-send-disconnect-broken-pipe/</id>
<updated>2019-11-09T08:52:10+00:00</updated>
<category term="Linux"/>
</entry>
</feed>