Tin's Journey

Enter a journey into a sysadmin world

Browsing Posts published by Tin'

The following idioms describe how to select a range of records given a specific pattern to match:
Print all records from some pattern:

awk '/pattern/{found=1}f' file

Print all records after some pattern:

awk 'found;/pattern/{found=1}' file

Print the Nth record after some pattern:

awk 'count&&!--count;/pattern/{count=N}' file

Print every record except the Nth record after some pattern:

awk 'count&&!--count{next}/pattern/{count=N}1' file

Print the N records after some pattern:

awk 'count&&count--;/pattern/{count=N}' file

Print every record except the N records after some pattern:

awk 'count&&count--{next}/pattern/{count=N}1' file

Print the N records from some pattern:

awk '/pattern/{count=N}count&&count--' file

iDRAC 7 CheatSheet

No comments

# Get all iDRAC settings in a file

racadm get -f config.txt

# Set password for root user

racadm set iDRAC.Users.2.Password "password"

# List all ssh key for root user

racadm sshpkauth -i 2 -v -k all

continue reading…

As for Debian and deb-multimedia.org, ia64 packages have been removed from testing and unstable.
As also sparc packages from testing.

After new LUNs addition

Restart multipathd daemon

/etc/init.d/multipathd restart

Then check that all your LUNs are displayed and there is no orphans

multipathd -k"show maps"

You can also see how are your paths

multipathd -k"show paths"

For more information about multipathd command

multipathd -k"help"

continue reading…

Ever wonder how to install MariaDB rpm in a dedicated openSVC service, with the possibility to switch the service without installation everything in the system directory ?
Just follow the this simple how-to


First of all create your openSVC service with the 3 following filesystem
* /$SVCNAME/mysql (500M should be enought for binaries, need more for mysql logs)
* /$SVCNAME/mysqldata (depends on the database size)
* /$SVCNAME/mysqldump (depends on the dump size)

Create misc directory

mkdir -p /$SVCNAME/mysql/{var/log,var/run,var/lib/rpm,startup}

Install MariaDB server and client binairies

continue reading…

As I’m always googling for this command I just post it here so I won’t need to search for it again.


:g will execute a command on lines which match a regex. The regex is ^$(blank line) and the command is :d

For a mass storage application we had to use HP smart array Raid 6 functionality. Usually we bought P812 card which come directly with the Raid 6 features. But those new server I didn’t check the quotation and our supplier shipped us a Smart Array P421 which required the Extend Pack to work with Raid 6.
So after ordering it and going through the various HP web site in order to get my license key, here’s how to add it using the CLI.

continue reading…

Following release of the new Debian 7.0 “Squeeze”, deb-multimedia mirror on Gnali has been updated.

sid -> unstable
wheezy -> stable
   |- binary-amd64
   |- binary-armel
   |- binary-i386
   |- binary-ia64
   |- binary-kfreebsd-i386
   |- binary-mipsel
   |- binary-powerpc
   |- binary-sparc
   |- source
jessie -> testing

Thanks again to Christian Marillat for his awesome work !

Here’s a quick loop to delete Clariion LUNZ pseudo devices to prevent process to submit I/Os, which will never satisfied.

Really useful, when a new Clariion Disk Array is connected to your server

for i in $(ls /sys/class/scsi_device/)
    grep -q LUNZ /sys/class/scsi_device/$i/device/model && {
        echo deleting bdev $i
        echo 1 > "/sys/class/scsi_device/$i/device/delete"

Christian Marillat, who’s well known for packaging multimedia application for debian, has change his domain name from debian-multimedia.org to deb-multimedia.org.


debian-multimedia.org is now deb-multimedia.org

All services are working (see below). If you intent to change the path
in the mirror URL, tell me I’ll update my mirors page.

| rsync://www.deb-multimedia.org/deb
| http://www.deb-multimedia.org
| ftp://www.deb-multimedia.org


So in order to be compliante with him, Gnali.org is changing its mirror site to deb-mutimedia.gnali.org. Please update your apt source.list file. Old domain name will be still available for few weeks.

QR Code Business Card