FreeNas, Transmission and Corrupted Files – Part 1

After many years of just ‘taking’ I mature and upgraded my setup to be able to give community back what I took.

I setup RAID 6 FreeNas machine. Thanks to playing with those I understood why everybody in FreeNas community hate Realtek and why people just say to throw it away and get something that works (FreeNas: Realtek 8111F and re0: Watchdog Timeout Error  and FreeNas: Realtek 8111F and “re0: Watchdog Timeout Error” – universal solution). In the end I join the ‘hate club’ and bought Intel PRO 1000 PT Dual Port NIC. Fun part is that Linux handle Realtek with ease but I been with Linux when It didn’t like most of hardware that Windows support so I can understand that there are still hardware issues with FreeBSD.

Cool, FreeNAS install without any issues.

If you unfamiliar with FreeNAS it comes with ‘plugins’ that are basically jails with pre-configured application that ‘just works’.

I slap that Install button and almost instantaneous I had working Transmission 2.93 (FreeNAS should work about pushing updates to plugins faster but yeah, nothing to complicate that we cannot fix ourself if needed)

I mounted needed directories, slap few torrent files that I already had there and enjoyed how transmission is handling all those sweet, sweet files out there.

And Tranmission was working and it was doing good. But after many, many torrent more that join the seeding happy farm not many people did connect to share the love from me. I started tweaking Transmission. Setting by setting I scope documentation looking for holy grail, some magic setting that would boost simultaneous connections. I found few. So I created new config file, and it was good. Not the best but I notice some connection increase. But I was thinking that maybe its because the application is inside jail aka virtual network interface. Few threads on popular forums, many many blog post later I saw the solution allow.raw_sockets=true. Great I saw a big improvement with connections – but who know if that was really all this tweaking doing or just someone join the swarm.

Few days later I notice big (I could even say tremendous) packet drop from/in my network. What was happening ? Router that is used between NAS and WAN have working QoS rules so it shouldn’t be a problem with using to much of bandwidth… So what was it ?

Culprit here was the CPU inside the router – we need to remember that using fancy feature that make router even smarter use CPU. QoS, Firewall, VPN all of them take some of that sweet-sweet pie (CPU). But why its dropping packets you ask? Simple, there is less and less CPU power to handle all the traffic that is going to and from network so everything is super slow. But wait, didn’t it work before Transmission? Yes it did – and we could disable some functions but we can do better. Lets optimize some firewall rules, we can cut QoS from 10 types to 5 without big sacrifices. Is that enough? No, but we can tweak both Transmission and firewall rule for it. Let set ‘Max connections’ to smaller number and double that with same (or 1% more on firewall rule so we are double sure that anything that is marked as ‘new connection’ and is about our limit get dropped).

And this game enough room for that sweet-sweet pie named CPU could handle ‘few’ packets more.

And it was good for months and months…

Until the corruption start to show !

(will continue in part 2)

Facebooktwittergoogle_plusreddit

Export or save Putty configuration

From time to time we need migrate our putty configuration/sessions that we saved (configurations, IPs etc).

Putty store those data inside system register and those are some methods to extract them and save to new pc:

We end up with putty.reg on our Desktop which we can execute on new computer and enjoy with same settings/sessions as before.

Facebooktwittergoogle_plusreddit

Bypass Windows 7 user password

  1. We need to force Windows into Automatic repair mode (just restart pc while windows is loading)
  2. We need to wait till tool will finish scanning for errors and prompt us with System Restore
  3. Cancel it
  4. Click arrow that will expand Details about error
  5. At the bottom of Details there is text file erofflps.txt, click it
  6. We should see Notepad now
  7. Pick ‘File’ – ‘Open’
  8. Go to D:/Windows/System32
  9. Change file type from .txt to All files
  10. Search for sethc and rename it to sethc_bak
  11. Search for cmd and make copy of it
  12. Rename cmd copy to sethc
  13. Close all windows and Finish Automatic Tool
  14. Your PC should restart now
  15. When Windows will ask for password for user just hit SHIFT five times
  16. Instead normal message you will see black terminal
  17. Now we need to input few command to reset password
  18. Log in as user without password
  19. Restore original sethc
Facebooktwittergoogle_plusreddit

Upgrading FreeNAS 9.x to Corral (10.x) and SMB issue

Migration to FreeNAS Corral could be problematic for previous users because of mix-matched permissions.

If you imported Volumes and DataSet from lower version, and you end up not being able to access your new shears (smb), and you already checked its not a ‘net sh’ issue, then you should definitly try to open console/ssh and manually ‘chown’ those volumes because changing them via WebUI won’t resolve the issue.

Facebooktwittergoogle_plusreddit

Visual Studio 2015 Community Nightmare

The nightmare hit me hard…

 

First I was unable to register ‘free’ ‘community’ edition – with error

After countless reinstalls from 2 different web installers provided on microsoft pages (sic!) and even installing it from iso image. I narrow the problem to be in wrong delegation setting in AD which end up being SAMBA4 bug and upgrade did help – The registration error message didn’t help with this, only adding “new account” yield at me about wrong delegation.

After successful registration and unlocking community version after 30days of trial use I hit another problem probably because I deleted one reg more than I should and installer was dumb enough to not recreate it (they need to improve installer or stop hide options in it)

I reinstall VS2015 more than few times even changing path, cleaning folder, regs. I end up digging thru forums/support pages to find those tips:

To uninstall the visual studio totally, we could try to use /uninstall /force command, it will remove the shared components, please take the following steps:

  1. Run installer (.exe) with /uninstall /force – those will clean alot more, first time I uninstall VS cleaner app found 11k files not deleted (sic!)“”
  2. Delete registry key (or rename it) HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0
  3. Delete %AppData%\Roaming\Microsoft\VisualStudio\ and %AppData%\Local\Microsoft\VisualStudio\14.0\ComponentModelCache

Only after this steps I was able to reinstall VS2015 with success and no more pop-up Errors.

Facebooktwittergoogle_plusreddit

Syncthing – own virtual drive

Syncthing – like the name tells is ‘thing’ synchronization application, which also works realy great as virtual drive (without web interface). With this in mind, this application wont fight it way on virtual drives market with Google Drive or ownCloud.

If we are looking for multi-platform solution which works out-of-box, and we want to synchronies our folder (1:1) across multiply nodes without to much configuration Syncthing is the perfect solution (for more complicated project I would go with rsync)!

Instalation (Debian/Ubuntu):

Instalation (Windows):

 

Starting application (Linux/Windows):

Syncthing run as user that run it with command:

 

Configuration as system service (Linux systemd):

Make file /etc/systemd/system/syncthing@.service

Next we create or use existing account to use for syncthing, lets assume its ‘myuser’ account:

 

Facebooktwittergoogle_plusreddit

Excel – breaking password for cell editing in Excel

    1. Open excel file with cell password protection
    2. Press ALT + F11
    3. Double click on sheet
    4. Pass this code:

            5. Press F5

 

 

Facebooktwittergoogle_plusreddit

Recover main MySQL password

*** If it is possible do this operation in environment without internet access ***

 

Facebooktwittergoogle_plusreddit

Windows – Hidden windows outside our eye sight

When we are using multiply monitor setup sometimes badly coded application vanish from our eye sight .

With this little hack we can recover almost every window:

 

Facebooktwittergoogle_plusreddit