« Posts tagged Linux

NFS VMware Datastore with QNAP

The new Qnap nas has also NFS service onboard, so I want try to use it as "addon datastore" for my VMware infrastructure.
I know poor performance but I'll use it to keep CD/DVD images, test virtual machines an why not, backup.

First of all we have to check if our esx hosts can reach the NAS, I mean the VMKERNEL, not the management, so ssh into your ESX and try with

root@esxhost# vmkping your.nas.ip

If you get response you are done, if not you have 2 solutions:

  • put your nas in the vmkernel's network
  • add another vmkernel

I've added another vmkernel, because we use the first for Vmotion and I want keep this separate.

So, open VI client, from inventory view choose "Hosts and Clusters" select the first Esx host and go to "configuration tab.", select "Networking" then "Add Networking".

Using the Wizard, select VMkernel and click Next. According with your network configuration, select the VSwitch that can communicate with your NAS

Give a name, IP Address and netmask (on the same netwok of NAS) to the new interface

Click Next and finish.

Try to "vmkping" and you should see response.

Now repeat these steps for all ESX hosts you have

Instruction From QNAP to use NFS on with VMware are not correct, because ESX is able to use NFS only over TCP; unforntunatley Qnap nas use NFS over UDP.

So we have to "force" the QNAP to use TCP instead of UDP...
In the configuration page on NAS there's no way to change this; so we have to connect in SSH and edit this file:
/etc/init.d/nfs

the line to change is #132

NO_V4="-N 4 --no-udp"

Reload the NFS service

/etc/initd/nfs restart

Now through the web management we can set permission to the share we want use

I permit full access from both esx hosts to this share

So, open VI client, from inventory view choose "Hosts and Clusters" select the first Esx host and go to "configuration tab.", select "Storage" then "Add Storage".

Follow the wizard  for configuration:

Select "Network File System"

Fill with ip address or name of your NAS, in the Path field put the name of the share you previously defined on the NAS

Click Next and finish.

Repeat this step with same data for all ESX hosts and you are done.

N.B.
this how to require you know what are you doing.
I'm not responsible if you destroy your production machine following my instruction.

Debian GNU/Linux as Enterprise Desktop #2 – iSeries Access

iSeries access is needed if you have an AS400 or Iseries, so we can start installing...

You need the following packages:

iseriesaccess_6.1.0-2_i386.deb
libmotif3
libstdc++5

install with apt-get or what way you want, then you need to create a file like

/etc/ld.so.conf.d/iseriesaccess.conf

that must contain this line:

/opt/ibm/iSeriesAccess/lib

Now run

user@linux$ sudo ldconfig

Edit file /etc/locale.gen and uncomment line for your lang (for me is “it_IT ISO-8859-1” )
And generate languages with :

root@linux#  locale-gen 

Now setup general emulator options

user@linux$ /opt/ibm/iSeriesAccess/bin/setup5250 

(especialy to column separator)

You are finished... now you can run session with:

user@linux$ /opt/ibm/iSeriesAccess/bin/ibm5250 -LANGID "your_lang" "as400_system"

where "your_lang" is language you specified before in /etc/locale.gen, for me is IT_it
and "as400_system" is ip address or hostname of yout iSeries.

Squid proxy + Antivirus

In an earlier post I've told you how to use an eebox as a cache proxy and content filter...Today I've added also an antivirus control with HAVP ( http://www.server-side.de/ ) and ClamAV ( http://www.clamav.net )

let's go:

me@linuxbox# apt-get update && apt-get install havp

Now we need to configure havp so open /etc/havp/havp.config and edit these values:

PARENTPROXY localhost
PARENTPORT 8081
FORWARDED_IP true
BIND_ADDRESS 127.0.0.1
TEMPLATEPATH /etc/havp/templates/"yourlang"

These are "sufficient" so read the manual and config HAVP to fit your needs.

Now edit /etc/squid/squid.conf and add these options

http_port localhost:8081
acl Scan_HTTP proto HTTP
never_direct allow Scan_HTTP
cache_peer 127.0.0.1 parent 8080 0 no-query no-digest no-netdb-exchange default
cache_peer_access 127.0.0.1 allow Scan_HTTP

Reload Squid and start HAVP and you can test if the system is working downloading an "eicar test" here http://www.eicar.org/anti_virus_test_file.htm

SSD drive On thinkpad T60

Hello,
last week my new SSD drive is arrived, so I've want tell you the REAL performance of this disk.
We bought a 128GB Kingston SSDNow V+ Series sata2 drive model SNVP325-S2/128GB to use on a IBM thinkpad T60.

Before installing this drive I've ran a test on the original sata2 drive from IBM and these are detail:


Writing 1GB

crash@hal9000:~$ dd if=/dev/zero of=test1GB bs=4k count=250000
250000+0 records in
250000+0 records out
1024000000 bytes (1,0 GB) copied, 38,6391 s, 26,5 MB/s

Reading 1 GB

crash@hal9000:~$ dd if=test1GB of=/dev/null bs=4k count=250000
250000+0 records in
250000+0 records out
1024000000 bytes (1,0 GB) copied, 22,2653 s, 46,0 MB/s

As you can the real performance are 26,5 MB/s (write) and 46 MB/s (read)

Then I've cloned my system (use the tool you prefer) an installed the new SSD.
Restored the O.S. with no problem and the operating system (debian squeeze) boot in 7 second....

Amazing...

Then I've repeated the test


Writing 1GB

crash@HAL9000:~$ dd if=/dev/zero of=test1gb bs=4k count=250000
250000+0 records in
250000+0 records out
1024000000 bytes (1,0 GB) copied, 7,39791 s, 138 MB/s

Reading 1 GB

crash@hal9000:~$ dd if=test1GB of=/dev/null bs=4k count=250000
250000+0 records in
250000+0 records out
1024000000 bytes (1,0 GB) copied, 3,50632 s, 292 MB/s

So.. the new performance are 138 MB/s (write) and 292 MB/s (read)

Amazing....

*****************************************

UPDATE  more Info about:

HAL9000:~# hdparm -t /dev/sda

/dev/sda:
Timing buffered disk reads:  334 MB in  3.01 seconds = 110.84 MB/sec

Debian GNU/Linux as Enterprise Desktop #1

Hi,
today I want to tell you how I've deployed my first linux Client in our network.

The goal is to have a "stable" client joined in our active directory domain with all standard application used so let's start.

The first things to do after installing and "tuning" the system, removing all not-useful apps is to join this workstation to the Active directory domain...no, don't worry.... there's a great tool from Likewise that help you.
Download the DEB package (I've used Bitrock installer) for both command line version (required) and GUI (optional but useful) and install first the CLI then the GUI.
Be sure you can ping your domain controller and run as root:

/opt/likewise/bin/domainjoin-gui

fill all requested field, and join your domain.
Now to login with your "domain account" you have to use the format "domain\username"....this suck, but there's a solution;
edit the file /etc/likewise/lsassd.conf and uncomment the line:
assume-default-domain = yes
edit also /etc/samba/smb.conf and change the default "workgroup" value with your domain name.

Stay tuned;
next time I'll explain how to install and configure Lotus notes "native" and IBM Iseries access for linux.