Monday, 26 December 2022

Replacing a disk on FreeNAS

The documentation for the older FreeNAS server is slowly disappearing from the Internet. Thank you to the blog post on this link for instructions on how to rebuild a FreeNAS RAID.

If you have a degraded RAID 1 array in FreeNAS you may need to replace the disk and trigger the rebuild on your NAS device. Thankfully it is really easy to repair broken raid in FreeNAS.

If you go to disk > software raid and click on tools you can send commands and if you send the status command you will see that your RAID 1 is marked degraded.


You can also see which disk is still running so that you know which disk to remove, the next step is to forget the broken disk. All you need to do is use the forget command.


Once you have done this you can insert your new disk into the array and the rebuild should start automatically, it may take some time to rebuild a RAID 1 array.


A few hours later you will have fixed a degraded RAID 1 array which you can once again confirm by running the status or list command in the freenas GUI. The FreeNAS RAID is pretty user friendly in this regard since you can remove and add disks easily and have a raid rebuild running in a matter of seconds. 

Wednesday, 23 November 2022

Running multiple identities on GitHub on Windows

 

You can run multiple identities on GitHub, by putting a copy of the two files

id_ed25519 and id_ed25519.pub 

in the 

C:\Users\<username>\.ssh 

directory.

It is worth creating two subfolders

C:\Users\<username>\.ssh\user1 and

C:\Users\<username>\.ssh\user2

to keep the original copies of the keys and copy them into the parent folder as required.

If you try and clone a GitHub repo under the wrong user, than isn't permissioned, then you will get the error:

Cloning into 'myrepo'...

remote: Repository not found.

fatal: repository 'https://github.com/myteam/myrepo.git/' not found



Friday, 14 October 2022

ZoomIt shortcuts

Ctrl+1 Zoom

Ctrl+5 Record

e delete all


pens

r red

b blue

g green

o orange

y yellow

p pink


shift line

ctrl rectangle

elipse tab

shift+ctrl arrow

w white

b black


ctrl+c copy

ctrl+s save




Wednesday, 28 September 2022

3D Printer tips for the Longer LK4

Tree supports are the best kind of support. Select "Touching Buildplate" to avoid having them join the print.

Support structure: Tree

Support placement: Touching Buildplate


Thursday, 1 September 2022

READPAST SQL hint

 We had a batch process that retrieved 1,000s of rows from SQL Server, processed them and updated them.

Multiple readers were operating in parallel. We found that throughput hit some limitations because of the number of locked rows.


READPAST is a good SQL hint that will ignore locked rows when returning a resultset. If the rows are locked, they are excluded.

This allows a processor to read unlocked rows and process them. Once the locked rows are released they can be processed if applicable.

Using NOLOCK and READPAST table hints in SQL Server | TechRepublic

Friday, 26 August 2022

SSH to Freenas

If you SSH to freenas, it errors:

Unable to negotiate with <ipaddress> port 22: no matching host key type found. Their offer: ssh-dss

Solution:

 ssh -oHostKeyAlgorithms=+ssh-dss freenas