With this article I want you to show how to use Slackware as a host for virtual machine(s) using qemu and kvm. The physical machine I'm using is an old AMD 4000+ single core CPU, has 1GB of RAM, a single 1GBit network interface and is running Slackware64-14.0. I assume that you've basic Slackware and qemu knowledge because this article does not focus to much on Slackware or qemu. The focus of this article is to get both working with each other.
This article covers the following topics:
1. Prepare your physical network interface for bridging
2. Load the kvm module
3. Install qemu
4. Setup a little Slackware sample VM
5. Start/Stop a VM during booting and shutting down the host
Sunday, December 29, 2013
Monday, December 16, 2013
ORA-28000: the account is locked
When you try to login as a user to your database and you get the following error:
$ sqlplus "user/password@database"
...
ORA-28000: the account is locked
$ sqlplus "user/password@database"
...
ORA-28000: the account is locked
Wednesday, December 11, 2013
VxVM vxassist ERROR V-5-1-15304 Cannot allocate space for dco volume
That one gave me a headache and I couldn't find any solution on the internet. So maybe this article might help some one some day.
Story so far: a customer has a RAC envinment based on Veritas CVM. One day a disk was in state FAILING like this:
Story so far: a customer has a RAC envinment based on Veritas CVM. One day a disk was in state FAILING like this:
Friday, November 22, 2013
StorEdge 6180: Battery {0} has expired.
Today a customer called in telling me that one of his batteries for his StorEdge 6180 has expired the lifetime. Since the customer doesn't have any valid support for the storage I deceided to set the lifetime expiration to never. To do this I needed the sscs and service command (package SUNWstkcam, SUNWsefms etc) in my environment. In normal cases these packages are installed to /opt:
Monday, November 18, 2013
Initial Ramdisk
A short howto for using a initial ramdisk (initrd) in Slackware Linux.
A initrd is very handy when you need a special module already during booting and you don't want to recompile the entire kernel. So let's get started directly by creating a simple initrd without any particular modules etc:
A initrd is very handy when you need a special module already during booting and you don't want to recompile the entire kernel. So let's get started directly by creating a simple initrd without any particular modules etc:
Thursday, November 14, 2013
plex in RECOVER state, subdisk in RELOCATE state
After a 'crash' plexes were in RECOVER state and subdisk in RELOCATE state (the customer updated and rebooted his storages online which causes Veritas to fail).
The system was a HP-UX 11.31. The situation was like that:
The system was a HP-UX 11.31. The situation was like that:
Friday, October 4, 2013
Using UUID's and label for partitions
Using label and UUID can be come very handy when you're using multiple disks or change disks frequently (for any reason). Imagine your machine is powered on. Then you connect the first external disk which will appear as /dev/sdb for eg. /usr. The second external disk that will be connected appears as /dev/sdc for eg. /opt. If you disconnect both disks and connect the second disk for /opt first it will appear as /dev/sdb which was the device entry for /usr before. One chance to avoid that is mounting disks by UUID's. Each partition on a disk has it's own UUID. The UUID can be listed with blkid or lsblk:
Tuesday, September 3, 2013
ORA-01536: space quota exceeded for tablespace xyz
Today I had this error:
ORA-01536: space quota exceeded for tablespace
So it seems that my user couldn't write to his default tablespace. So deceided to check my user:
SQL> select tablespace_name, username, bytes, max_bytes from dba_ts_quotas where username like '%KAREL%';
no rows selected
ORA-01536: space quota exceeded for tablespace
So it seems that my user couldn't write to his default tablespace. So deceided to check my user:
SQL> select tablespace_name, username, bytes, max_bytes from dba_ts_quotas where username like '%KAREL%';
no rows selected
Saturday, August 31, 2013
Replace lilo with grub2
As a Slackware user I use lilo as bootloader by default. But I also like to change things and try out new/other things. One is grub2 which I'll explain a little in this article. The topics of this article are:
Create a backup of your current boot loader
Download, compile and install grub2
Generate a basic configuration and install grub2 into MBR
Define a new timeout
Change the distributor from GNU/Linux to Slackware
Loading the kernel in framebuffer
Changing menu colors
Add a initrd
Create a backup of your current boot loader
Download, compile and install grub2
Generate a basic configuration and install grub2 into MBR
Define a new timeout
Change the distributor from GNU/Linux to Slackware
Loading the kernel in framebuffer
Changing menu colors
Add a initrd
Friday, August 9, 2013
TNS lookup over LDAP
This article describes how to migrate tnsnames.ora into LDAP. My current tnsnames.ora looks like this:
$ cat tnsnames.ora
...
PINK=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.56.100)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=PINK)(GLOBAL_NAME=PINK)))
FLOYD=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.56.100)(PORT=1522)))(CONNECT_DATA=(SERVICE_NAME=FLOYD)(GLOBAL_NAME=FLOYD)))
...
$ cat tnsnames.ora
...
PINK=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.56.100)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=PINK)(GLOBAL_NAME=PINK)))
FLOYD=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.56.100)(PORT=1522)))(CONNECT_DATA=(SERVICE_NAME=FLOYD)(GLOBAL_NAME=FLOYD)))
...
Friday, August 2, 2013
Update your bios with Linux
I was thinking a lot about a bios update for my HTPC lately. The hardware is a ASUS Pundit P2-M2A690G running Slackware Linux 14.0 and XBMC. The bios itself allows a bios update through a special prepared CD and some other options but that was not what I was looking for. I just wanted to download the latest bios and install it. After some research I found a pretty cool software that did the job: flashrom.
Wednesday, July 31, 2013
Mount a ZFS dataset
Mounting an unmounted ZFS dataset is very easy. Eg I have a ZFS pool called orapool. Within in this pool I have various datasets like u01, u02, ... and u06:
# mount | grep u06
/u06 on orapool/u06 ...
# mount | grep u06
/u06 on orapool/u06 ...
Friday, July 26, 2013
Wake-On-Lan with Linux
I have two systems. One is my HTPC and the other is my notebook (both running slackware as usual). Both system are connected via my home router. My HTPC is connected directly via lan cable to my home router and my notebook is connected to my home router via wireless lan. In my case I want to wake up my HTPC from my notebook. To check if WOL is supported use the tool ethtool:
Thursday, July 18, 2013
Create SPFILE from PFILE
PFILE: traditional init.ora file, changes via eg. vi
SPFILE: binary file, changes via SQL 'alter system...'
To create a spfile login to your database as sysdba locally:
$ sqlplus "sys/oracle as sysdba"
Run the following SQL statement to create a binary spfile from a text pfile:
SPFILE: binary file, changes via SQL 'alter system...'
To create a spfile login to your database as sysdba locally:
$ sqlplus "sys/oracle as sysdba"
Run the following SQL statement to create a binary spfile from a text pfile:
Wednesday, July 17, 2013
Change Core behaviour in AIX
When you need to change the core behaviour in AIX then run lscore the check the current settings, eg.:
# lscore
compression: off
path specification: off
corefile location: not set
naming specification: off
# lscore
compression: off
path specification: off
corefile location: not set
naming specification: off
Tuesday, July 16, 2013
Suspend to disk/ram with Linux
This article describes the following topics:
Suspend to disk
Suspend to ram
Stand-By
Configure buttons for ACPI events
Issues with KDE
Issues with VT6102 (Via Rhine NIC)
Suspend to disk
Suspend to ram
Stand-By
Configure buttons for ACPI events
Issues with KDE
Issues with VT6102 (Via Rhine NIC)
Monday, July 1, 2013
List DVD content
If you need to know what is on your DVD then you can use mplayer. With the right option mplayer lists the content of any DVD. This is very useful if you need to copy your DVD's to harddisk etc. (especially for TV series on DVD). Just run the following mplayer command to list the DVD content (output truncated - very):
Tuesday, June 25, 2013
VxVM vxdisksetup ERROR V-5-2-5716 Disk c1t1d0 is in use by ZFS.
Haha, this is a stupid one since the error message contains the solutions already.
If you ever want/need to reuse a disk that was used bei ZFS prior as a disk for VxVM then you might encounter the following error:
# vxdisksetup -i c1t1d0
VxVM vxdisksetup ERROR V-5-2-5716 Disk c1t1d0 is in use by ZFS. Slice(s) 0 are in use as ZFS zpool (or former) devices.
If you still want to initialize this device for VxVM use, please destroy the zpool by running 'zpool' command if it is still active, and then remove the ZFS signature from each of these slice(s) as follows:
dd if=/dev/zero of=/dev/vx/rdmp/c1t1d0s[n] oseek=31 bs=512 count=1
[n] is the slice number.
If you ever want/need to reuse a disk that was used bei ZFS prior as a disk for VxVM then you might encounter the following error:
# vxdisksetup -i c1t1d0
VxVM vxdisksetup ERROR V-5-2-5716 Disk c1t1d0 is in use by ZFS. Slice(s) 0 are in use as ZFS zpool (or former) devices.
If you still want to initialize this device for VxVM use, please destroy the zpool by running 'zpool' command if it is still active, and then remove the ZFS signature from each of these slice(s) as follows:
dd if=/dev/zero of=/dev/vx/rdmp/c1t1d0s[n] oseek=31 bs=512 count=1
[n] is the slice number.
Monday, June 24, 2013
VxVM vxvol ERROR V-5-1-607 Diskgroup oracledg not found
Last night a customer had a blackout in his small datacenter. Luckily all machines came up again without any problem. The only problem he figured was his veritas environment. Volumes seemed to be mounted without content, disk groups could not be found etc.
The first thing I deceided to do was to unmount all volumes. First I listed all volumes in the Oracle disk group:
The first thing I deceided to do was to unmount all volumes. First I listed all volumes in the Oracle disk group:
Saturday, June 1, 2013
Convert bin/cue into iso
If you ever need to convert a cue/bin image into an iso image then bchunk might be the right software to use. First get the source by running wget:
# cd /usr/src
# wget -c "http://he.fi/bchunk/bchunk-1.2.0.tar.gz"
Then extract the source package and change into the source directory:
# cd /usr/src
# wget -c "http://he.fi/bchunk/bchunk-1.2.0.tar.gz"
Then extract the source package and change into the source directory:
Monday, May 27, 2013
VxVM vxvol ERROR V-5-1-10128 Configuration daemon error 441
When you get the following error while trying to stop a Veritas volume:
# vxvol -g testdg stop testvol01
VxVM vxvol ERROR V-5-1-10128 Configuration daemon error 441
Then run a flush on the disk group that contains the volume:
# vxvol -g testdg stop testvol01
VxVM vxvol ERROR V-5-1-10128 Configuration daemon error 441
Then run a flush on the disk group that contains the volume:
Monday, April 29, 2013
Display HBA and WWN in Solaris
First display the available HBA's installed in your system:
# fcinfo hba-port
HBA Port WWN: 2100001b4377092a
OS Device Name: /dev/cfg/c1
Manufacturer: QLogic Corp.
Model: 375-3355-02
Firmware Version: 05.04.03
FCode/BIOS Version: BIOS: 2.02; fcode: 2.01; EFI: 2.00;
Serial Number: 0402R00-0851658438
Driver Name: qlc
Driver Version: 20110321-3.05
Type: N-port
State: online
Supported Speeds: 1Gb 2Gb 4Gb
Current Speed: 4Gb
Node WWN: 2000001b4377092a
...
# fcinfo hba-port
HBA Port WWN: 2100001b4377092a
OS Device Name: /dev/cfg/c1
Manufacturer: QLogic Corp.
Model: 375-3355-02
Firmware Version: 05.04.03
FCode/BIOS Version: BIOS: 2.02; fcode: 2.01; EFI: 2.00;
Serial Number: 0402R00-0851658438
Driver Name: qlc
Driver Version: 20110321-3.05
Type: N-port
State: online
Supported Speeds: 1Gb 2Gb 4Gb
Current Speed: 4Gb
Node WWN: 2000001b4377092a
...
Wednesday, April 10, 2013
VxHA: set a new monitor timeout
Today I had a customer with a cluster and a Orcale database. The customer called in because his database always shutsdown once a day. At first I took a look at the alert log for the database (SID DB):
# less alert_DB.log
...
Instance terminated by USER, pid = 15764
...
# less alert_DB.log
...
Instance terminated by USER, pid = 15764
...
Saturday, April 6, 2013
Adding Nagiosgraph to Nagios
This article is an update to my prior released article about installing Nagios in Slackware.
Nagiosgraph allows you to add very nice graphs to your Nagios which is extremely helpful. With these graphs you'll be able to look into the past a little and probably do some trending for the future. You can act before it is too late.
Before you can begin to install Nagiosgraph you need an additional package rrdtool. First create a directory where you can store the sources and change into it:
Nagiosgraph allows you to add very nice graphs to your Nagios which is extremely helpful. With these graphs you'll be able to look into the past a little and probably do some trending for the future. You can act before it is too late.
Before you can begin to install Nagiosgraph you need an additional package rrdtool. First create a directory where you can store the sources and change into it:
Friday, April 5, 2013
ORA-02082: a loopback database link must have a connection qualifier
I have two Oracle databases, one 9.2.0.8 (SID test9) and another 10.2.0.4 (SID test10). I needed to create a database link from test9 to test10 but I always got the following error:
$ sqlplus "sys/password@test9"
SQL> create database link test connect to sys identified by password using 'test10';
create database link test connect to sys identified by password using 'test10'
*
ERROR at line 1:
ORA-02082: a loopback database link must have a connection qualifier
$ sqlplus "sys/password@test9"
SQL> create database link test connect to sys identified by password using 'test10';
create database link test connect to sys identified by password using 'test10'
*
ERROR at line 1:
ORA-02082: a loopback database link must have a connection qualifier
Monday, April 1, 2013
Basic Nagios installation
This article is about basic Nagios installation in Slackware. It is not about configure Nagios completely, adding hosts etc. It is just a basic tutorial howto install Nagios from sources.
Before you begin create a directory where you can store the Nagios sources:
# mkdir -p /usr/src/nagios && cd /usr/src/nagios
Before you begin create a directory where you can store the Nagios sources:
# mkdir -p /usr/src/nagios && cd /usr/src/nagios
Sunday, March 24, 2013
Converting mpc to wav
Today I was confronted with some mpc files which I needed to convert into wav files. There is a tool called mpcdec but it has to be compiled first. I have tested the following instruction successfully on my Slackware 14 machine (64bit).
To start create a directory where you can store the sources and change into it:
To start create a directory where you can store the sources and change into it:
Tuesday, March 12, 2013
su: cannot set user id: Resource temporarily unavailable
Today I had a customer complaining about his DB that nobody can login anymore. The number of max sessions (in the DB) was set to 4096 and there were about 2048 current seesion on the DB. So, what was wrong?
I decided to login as root into the DB server which worked wihtout any issue. The system it self was OK, enough memory free, no filled volumes etc. Then I tried to switch to the oracle user:
I decided to login as root into the DB server which worked wihtout any issue. The system it self was OK, enough memory free, no filled volumes etc. Then I tried to switch to the oracle user:
Monday, March 11, 2013
hpacucli
Just some quick command examples for checking the status of a HP controller, drives etc. Start with finding the binary:
# find /opt -name "hpacucli" -type f
/opt/compaq/hpacucli/bld/hpacucli
# find /opt -name "hpacucli" -type f
/opt/compaq/hpacucli/bld/hpacucli
Thursday, February 21, 2013
Extend a AIX LVM Volume
Today I had a customer who asked me to extend a database volume (if possible). The customer couldn't tell me if there is space available for extending the volume. So I had to check by my self again. After logging into the customers machine the first I ran was df to get the current size and usage of the volume:
# df -k /oradata
Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
/dev/oravol01 47185920 5880024 88% 50 1% /oradata
# df -k /oradata
Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
/dev/oravol01 47185920 5880024 88% 50 1% /oradata
Wednesday, February 13, 2013
Upgrade VxFS
First get the current version:
# fstyp -v /dev/vx/dsk/testdg/testvol
vxfs
magic a501fcf5 version 7 ctime Mon Sep 10 03:06:00 2012
...
# fstyp -v /dev/vx/dsk/testdg/testvol
vxfs
magic a501fcf5 version 7 ctime Mon Sep 10 03:06:00 2012
...
Resize ZFS Swap
To resize your ZFS based Swap you need to know on which pool your Swap resides:
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 9,70G 5,92G 32,5K /rpool
rpool/ROOT 8,42G 5,92G 21K legacy
rpool/ROOT/s10x_u9wos_14a 8,42G 5,92G 8,42G /
rpool/dump 768M 5,92G 768M -
rpool/export 763K 5,92G 23K /export
rpool/export/home 740K 5,92G 740K /export/home
rpool/swap 544M 5,95G 516M -
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 9,70G 5,92G 32,5K /rpool
rpool/ROOT 8,42G 5,92G 21K legacy
rpool/ROOT/s10x_u9wos_14a 8,42G 5,92G 8,42G /
rpool/dump 768M 5,92G 768M -
rpool/export 763K 5,92G 23K /export
rpool/export/home 740K 5,92G 740K /export/home
rpool/swap 544M 5,95G 516M -
Saturday, February 9, 2013
Installing Slackware ARM in Qemu
ARM, ARM and ARM. Everybody is using it - knowing or not knowing. So I decided to write a small tutorial about installing Slackware ARM in Qemu. For this tutorial I expect a few things:
- you should be able to install Slackware
- you should have worked with Qemu
- you should know how Linux boots
- you should be able to install Slackware
- you should have worked with Qemu
- you should know how Linux boots
Thursday, January 31, 2013
Change the IP of a Solaris Zone
To change the IP of a Solaris Zone start zonecfg with the configured zone first:
# zonecfg -z bck01
The name of the zone is bck01. Within zonecfg run info to view the current configuration of the zone:
# zonecfg -z bck01
The name of the zone is bck01. Within zonecfg run info to view the current configuration of the zone:
Scan for new Lun(s) in AIX
After creating a Lun in a storage and mapping the new Lun to a AIX server you should list the current disks:
# vxdisk -e list
...
# vxdisk -e list
...
Thursday, January 24, 2013
Get installation date
If you need to determine the installation date of your server then you have a couple of options like look into your network documentation, check for install logs on the server etc. In most cases you don't have these kind of options and with all the different Linux distributions around it can get difficult to get a proper installation date. The next few hints are really just hints to give you a small clue when the installation date was.
Tuesday, January 22, 2013
Disable automountd in HP-UX
To disable automountd in HP-UX configure the file /etc/rc.config.d/nfsconf and change the value for the AUTOFS parameter from 1 to 0 first:
# vi /etc/rc.config.d/nfsconf
...
#AUTOFS=1
AUTOFS=0
...
# vi /etc/rc.config.d/nfsconf
...
#AUTOFS=1
AUTOFS=0
...
Sunday, January 20, 2013
Setting up a SAN
I have some FC hardware and I thought I try to setup a small SAN. Here is my hardware list:
Server (hq01): Slackware64
FC Adapter: QLogic 2300 (1 FC Port)
San Switch (ssw01): Compaq StorageWorks San Switch 8 (Brocade)
Storage (stor01): Sun StorEdge 6120 (14x33GB)
Server (hq01): Slackware64
FC Adapter: QLogic 2300 (1 FC Port)
San Switch (ssw01): Compaq StorageWorks San Switch 8 (Brocade)
Storage (stor01): Sun StorEdge 6120 (14x33GB)
Saturday, January 12, 2013
sccli command examples
Yesterday I finally managed to reinstall a V480 with Solaris and a attached StorEdge 3310. Beneath a few example how to install the required software and how to use the command line tool sccli on Solaris Sparc.
Tuesday, January 8, 2013
Solaris NIC speed
When you need to check the NIC speed in Solaris then you can use ndd:
# ndd -get /dev/nge2 link_speed
100
The NIC nge2 is connected to a 100MB port only. Patching it to a 1GB port shows the following log:
# ndd -get /dev/nge2 link_speed
100
The NIC nge2 is connected to a 100MB port only. Patching it to a 1GB port shows the following log:
Monday, January 7, 2013
Create a new LILO boot image
Creating a new LILO boot image is more than easy. Just pickup your favorite image and resize it to 640x480 px. You can use Gimp for resizing images. I like to use the command line what I'll show here. The point is that you get a image with a size of 640x480 and max. 256 colors (8 bit). The only intention to change my LILO screen is my HTPC (running XBMC) because I have found a really nice image for it.
What ever, just take a look at your image with file:
What ever, just take a look at your image with file:
Adding goom audio visualisation to XBMC
This article is based on my prior released XBMC article which can be found here.
Goom is a very nice audio visualisation which you can use with XBMC. This article will describe how to setup goom and howto setup XBMC with goom support. First download the goom sources:
# mkdir /usr/src/xbmc
# cd /usr/src/xbmc
# wget -c "http://downloads.sourceforge.net/project/goom/goom2k4/0/goom-2k4-0-src.tar.gz"
# tar xf goom-2k4-0-src.tar.gz
# cd goom2k4-0/
Goom is a very nice audio visualisation which you can use with XBMC. This article will describe how to setup goom and howto setup XBMC with goom support. First download the goom sources:
# mkdir /usr/src/xbmc
# cd /usr/src/xbmc
# wget -c "http://downloads.sourceforge.net/project/goom/goom2k4/0/goom-2k4-0-src.tar.gz"
# tar xf goom-2k4-0-src.tar.gz
# cd goom2k4-0/
ORA-28002: the password will expire within 7 days
When you try to connect to Oracle and you're getting the following error:
$ sqlplus "sys/password"
...
ERROR:
ORA-28002: the password will expire within 7 days
...
$ sqlplus "sys/password"
...
ERROR:
ORA-28002: the password will expire within 7 days
...
Sunday, January 6, 2013
Selfmade HTPC with Slackware and XBMC
I have found some time to reinstall my HTPC with the current Slackware64 14.0 release and the current XBMC 11.0 release. As usual I installed everything from scratch and this article is a simple tutorial to install XBMC on Slackware. I like to use Slackware as base OS for XBMC because it is very slick and simple by default. In this tutorial I assume that you have a basic Slackware installation running with at least a small window environment (eg. Fluxbox). Before you can install XBMC you need a few more packages. All dependent packages are installed more or less the same way. The next lines will show you which package to install and how to install it.
Subscribe to:
Posts (Atom)