You are viewing [info]mytechspam's journal

28 January 2018 @ 06:49 am
Это специальный журнал для того чтобы постить разный tech-related shit и добавлять его в делишс.
 
 
Realtek drivers on linux boxes are not perfect - were leading servers to occasional hangs, especially when working in gigabit network. Hetzner's has special Wiki page for it - "The Linux r8169 driver for the Realtek network chips does not always work correctly, even in the newest kernel versions." . So, I was forced to build module from Realtek's sources and load it before/instead of r8169. That shouldn't be hard, even that wiki article has all needed steps. But article suggests to disable r8169 module via blacklisting, but I wanted to provide fallback mode - i.e. imagine you installed new kernel/upgraded old one and server be booted without network as custom module is not compiled for it and new one is blacklisted.
So, I've googled around and found that modprobe.conf(5) with help of modprobe(8), can be set to execute particular command on module load request (install). 
coolcold@server1:~$ cat /etc/modprobe.d/forceinstall.conf
#using forced install for module override:
#r8169
install r8169 /sbin/modprobe r8168 || /sbin/modprobe -v -i r8169

This conf line tells modprobe what to do on request of loading module r8169 - it will try to load r8168 module, if this fails, tries to load 8169 modules with "-i" switch, which instructs modprobe to ignore install sections within this invocation (so it won't cycle). Therefore, even if module r8168 is missing in system, 8169 will be loaded, and there is not need for blacklisting!

P.S. Hint - don't forget to update-initramfs after editing modprobe related configs.


 
 
03 August 2011 @ 03:23 pm
 let's assume we wanna change terminal type, here is short putty.bat file:


@echo off
set CMD=reg query HKCU\Software\SimonTatham\PuTTY\Sessions

for /f %%i in ('%CMD%') do (
rem echo %%i
reg add %%i /v TerminalType /t REG_SZ /d "xterm-256color"
)
rem "TerminalType"="xterm-256color"
Tags:
 
 
30 May 2011 @ 07:21 pm
To keep filesystem acls on repository metadata when using mercurial, one should clone repo with:
hg clone --pull /home/user/reponame /projects/repos/hg/reponame
 
Tags: ,
 
 
After successful creation of own repository with Debian packages, one may face the problem of apt blaming that repo like:

W: GPG error: http://repo.coolcold.org lenny-coolcold Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 25102036038088B3
and

WARNING: The following packages cannot be authenticated!

Puppet gonna be sad too and will complain it can't install packages.
Read more... )
 
 
26 January 2011 @ 01:24 pm
If you have packet loss & timeouts even when pinging your WRT610N v2 router and you are on Hyper-v host with virtual network, don't blame router at once, first check tcp offloading settings . If this doesn't help, then blame router & try to play with SPI setting :)
 
 
24 January 2011 @ 05:48 pm
Entry update was issued by Mark Callaghan tests.


XFS file system is known to provide parallelism in operations. There is question-answer text from IRC below, stealing secret knowledge & explanations. Short summary is:
  • metadata operations, like modifying ctime, are not concurrent (for the same object)
  • direct-io data operations are concurrent (you can do several writes in to the same file in one time)
  • for buffered I/O there can be either one writer, or multiple readers
  • extN & co allow readers in parallel to writers which actually is against the fine print in posix


Read more... )
Tags:
 
 
23 December 2010 @ 03:36 pm
For successfull compiling & booting openvz kernel 2.6.18 ( 028stab079.2 ) on debian lenny it should be compiled with 
1) gawk installed instead of default mawk
2) gcc-4.1 instead of default gcc-4.3
3) command line should look like MAKEFLAGS="CC=gcc-4.1" CONCURRENCY_LEVEL=5 make-kpkg --initrd --append-to-version '-mykernel-gcc4.1' kernel_image kernel_headers

history of debugging - output in hyper-v & debugging kernel & awk problems
 
 
30 November 2010 @ 03:40 pm
> root# dd bs=512 skip=19087681 seek=19087681 count=1 if=/dev/sdc of=/dev/sdb
> dd: writing `/dev/sdb': Input/output error
> 1+0 records in
> 0+0 records out
> 0 bytes (0 B) copied, 11.3113 s, 0.0 kB/s

You should probably had added oflag=direct.

When you write 512 byte blocks to a block device, it will read a 4096 byte block, update the 512 bytes, and write the 4096 bytes back.


Что было несколько не очевидно для меня.
taken from
Tags: , ,
 
 
Getting drivers (really anything) change history from kernel git repo:

For example, you would do

git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
cd linux-2.6
git log --pretty=oneline drivers/message/fusion/

Would give you commits related to mpt and mptsas drivers, while
ignoring unrelated commits. It is also easy to find out whether a given
release has a specific commit or not and find commits by a specific
author and much, much more.

The commit messages also tend to explain quite well the issues fixed,
so it is usually enough to figure if a given commit is interesting or
not.

git-diff will also generate a patch which is often good enough to
apply to an older kernel, provided the piece of code hasn't changed a
lot.

from http://marc.info/?l=linux-raid&m=128876576032049&w=2
Tags: , , , , , ,