Monthly Archives: March 2012

Update / Install Spotify 0.8.2.637 on RHEL6 x64

Previous post:

http://www.guldmyr.com/blog/how-to-update-spotify-on-rhel6-x64-native-client/

Installed spotify-client-0.8.2.637.g252b980.486-2.x86_64.rpm – this is converted from the .deb package that is downloaded from: http://repository.spotify.com/pool/non-free/s/spotify/

you convert with ‘alien’ and this command:

alien --to-rpm spotify-client_0.8.2.637.g252b980.486-1_amd64.deb

To install you need to uninstall first:

rpm -ev spotify-client
rpm -ivh Downloads/Spotify/spotify-client-0.8.2.637.g252b980.486-2.x86_64.rpm
error: Failed dependencies:
libcef.so()(64bit) is needed by spotify-client-0.8.2.637.g252b980.486-2.x86_64
libcrypto.so.0.9.8()(64bit) is needed by spotify-client-0.8.2.637.g252b980.486-2.x86_64
libcrypto.so.0.9.8(OPENSSL_0.9.8)(64bit) is needed by spotify-client-0.8.2.637.g252b980.486-2.x86_
libssl.so.0.9.8()(64bit) is needed by spotify-client-0.8.2.637.g252b980.486-2.x86_64
libssl.so.0.9.8(OPENSSL_0.9.8)(64bit) is needed by spotify-client-0.8.2.637.g252b980.486-2.x86_64

OK, that didn’t work so well.

Install:

# rpm -ivh --nodeps Downloads/Spotify/spotify-client-0.8.2.637.g252b980.486-2.x
Preparing...                ########################################### [100%]
   1:spotify-client         ########################################### [100%]

You’ll get errors while trying to start spotify:

spotify 
spotify: error while loading shared libraries: libnss3.so.1d: cannot open shared object file: No such file

What you need to do is create symlinks:

ln -s /usr/lib64/libnss3.so /usr/lib64/libnss3.so.1d
ln -s /usr/lib64/libnssutil3.so /usr/lib64/libnssutil3.so.1d
ln -s /usr/lib64/libsmime3.so /usr/lib64/libsmime3.so.1d
yum -y install nspr nspr-devel
ln -s /usr/lib64/libplc4.so /usr/lib64/libplc4.so.0d
ln -s /usr/lib64/libnspr4.so /usr/lib64/libnspr4.so.0d

However, it still crashes when I try to right-click on an app – but now it has apps :)

owncloud in a box!

owncloud

http://susestudio.com/a/TadMax/owncloud-in-a-box

Based on opensuse 12.1, I tested this out in vmware workstation by downloading the vm version (has a .vmdk file) inside the .tar inside the .tar.gz.

“Run the appliance, go to http://[yourservername]/owncloud and login as admin with the password owncloud42. Change the password in the admin interface and use the URL, which is shown there to access ownCloud via WebDAV.”

files, music, bookmarks, calendar, e-mail client, ldap and unix pam integration.

All in all, it looks like it could be quite cool. And it appears to be updated quite often too with a quite active community. But this takes a bit of commitment. First you want to move your existing stuff into this one (so you want to have backups of it etc) and you want to host it somewhere reliable (in case you access it through your phone etc). But I can see the potential, is quite nice to not have to depend on google or your other_random_”cloud”_vendor for these kind of services.

openstack testing day

Only one day late!

I actually started installing this on the 8th but I forgot to install it to hdd so the ‘yum update’ failed and broke the machine with I/O errors :)

Installing it in a VMWare Workstation (fedora 64-bit type, 2, cores, 4G RAM, 20G disk).

http://fedoraproject.org/wiki/Test_Day:2012-03-08_OpenStack_Test_Day

Basic Setup

1

http://fedoraproject.org/wiki/QA:Testcase_install_OpenStack_packages – No problem.

2

http://fedoraproject.org/wiki/QA:Testcase_setup_OpenStack_Nova –

Says that if you are doing this in a VM you need to “configure nova to use qemu without KVM and hardware virtualization:”. This is not true, as VMWare Workstation 8 has virtualization pass-through.

[root@localhost mart]# vgcreate nova-volumes $(sudo losetup --show -f /var/lib/nova/nova-volumes.img)
  No physical volume label read from /dev/loop0
  Writing physical volume data to disk "/dev/loop0"
  Physical volume "/dev/loop0" successfully created
  Volume group "nova-volumes" successfully created
openstack-nova-db-setup

Gives this error, which already is reported:

Verified connectivity to MySQL.
Creating 'nova' database.
Asking openstack-nova to sync the databse.
2012-03-09 07:28:26 WARNING nova.utils [-] /usr/lib/python2.7/site-packages/nova/db/sqlalchemy/migrate_repo/versions/075_convert_bw_usage_to_store_network_id.py:49: SADeprecationWarning: useexisting is deprecated.  Use extend_existing.
  useexisting=True)

2012-03-09 07:28:28 WARNING nova.utils [-] /usr/lib/python2.7/site-packages/nova/db/sqlalchemy/migrate_repo/versions/081_drop_instance_id_bw_cache.py:40: SADeprecationWarning: useexisting is deprecated.  Use extend_existing.
  useexisting=True)

Complete!

3

[root@localhost nova]# ADMIN_PASSWORD=$OS_PASSWORD openstack-keystone-sample-data
The default service password has been detected.  Please consider
setting an actual password in environment variable SERVICE_PASSWORD

But after that it generates users.

4

No problems, should ‘glance index’ return anything at this stage?

5

No problems.

6 Add SSH keypair

No problems, just do exactly what the instructions say (don’t try to be smart and put them in .sh files for example :P).

7 Register Guest Images

At this point the wiki went down :/

[root@localhost ~]# glance add name=f16 is_public=true disk_format=qcow2 container_format=ovf copy_from=http://berrange.fedorapeople.org/images/2012-02-29/f16-x86_64-openstack-sda.qcow2
Failed to add image. Got error:
Unexpected response: 500
Note: Your image metadata may still be in the registry, but the image's status will likely be 'killed'.

Yes, this is where it fall short. Manpage for clance doesn’t even have the ‘copy_from’. Maybe it could be downloaded? ‘glance index’ doesn’t work either.

 

[root@localhost ~]# glance index
Failed to show index. Got error:
Internal Server error: Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/eventlet/wsgi.py", line 336, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 210, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/glance/common/wsgi.py", line 279, in __
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1086, in get_re
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1055, in call_a
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/site-packages/keystone/middleware/auth_token.py", lin
    valid = self._validate_claims(claims)
  File "/usr/lib/python2.7/site-packages/keystone/middleware/auth_token.py", lin
    return self._validate_claims(claims, False)
  File "/usr/lib/python2.7/site-packages/keystone/middleware/auth_token.py", lin
    self.admin_password)
  File "/usr/lib/python2.7/site-packages/keystone/middleware/auth_token.py", lin
    return json.loads(data)["access"]["token"]["id"]
  File "/usr/lib64/python2.7/json/__init__.py", line 326, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

[root@localhost ~]# cd images/
[root@localhost images]# ls
aki-tty  ami-tty  ari-tty
[root@localhost images]# http://berrange.fedorapeople.org/images/2012-02-29/f16-                                                                                        x86_64-openstack-sda.qcow2^C
[root@localhost images]# glance add name=aki-tty is_public=true container_format                                                                                        =aki disk_format=aki < aki-tty/image
=================================================[100%] 7.79M/s, ETA  0h  0m  0s
=[  2%]                                                 1.25M/s, ETA  0h  0m  3s                                                                                        Failed to add image. Got error:
You are not authorized to complete this action.
Details: 401 Unauthorized

This server could not verify that you are authorized to access the document you                                                                                         requested. Either you supplied the wrong credentials (e.g., bad password), or yo                                                                                        ur browser does not understand how to supply the credentials required.


Note: Your image metadata may still be in the registry, but the image's status w                                                                                        =================================================[100%] 20.9M/s, ETA  0h  0m  0s
[root@localhost images]#

Stuck!

To create a new user group in Windows 7

This post is created upon request by a reader.

May or may not be needed for the P6000 Simulator. It is however required when you install the real HP P6000 Command View.

First you need to get into ‘Computer Management’, do this by right-clicking on ‘My Computer’. Then click your way into ‘Local Users and Groups’, and then into the ‘Groups’ section. In there, right-click somewhere and create a new group called ‘HP Storage Admins’ (or HP Storage Users for read-only). While creating it you can add a user (the one you log in with probably), you can also add it later by right-clicking the group.

password when starting a linux server in single-user mode

http://www.cromwell-intl.com/unix/linux-break-in-howto.html

On RHEL 6.2-based systems (like Scientific Linux 6.2):
edit /etc/sysconfig/init

# Set to ‘/sbin/sulogin’ to prompt for password on single-user mode
# Set to ‘/sbin/sushell’ otherwise

Like this:

SINGLE=/sbin/sulogin

Then if you add an ‘s’ to the grub entry when the server boots it will ask you for a password , or hit ctrl-d. Ctrl-d makes the server enter normal boot (telinit *).

Should all linux machines be installed this way? To me this sounds like a definite deal, especially if you have the console physically or remotely accessible.

CentOS 5.8 Released

CentOS 5.8 was released today 8th of March.

http://wiki.centos.org/Manuals/ReleaseNotes/CentOS5.8

You can download it from many mirrors, for example from FUNET: http://ftp.funet.fi/pub/Linux/INSTALL/Centos/

It installs just fine on an HP DL360 G7 with P410 and P411 controller.

CentOS has as far as I understand been slower at releasing updates than Scientific Linux (for example 6.2 was out 5 days earlier on SLC than on CentOS), this was not the case today though, SLC 5.8 is not available yet. Why?

Compare release dates here:

http://en.wikipedia.org/wiki/CentOS#Release_history

http://en.wikipedia.org/wiki/Scientific_linux#Release_history

Storage FC HBA Transfer Size Tuning

HP just published an advisory describing how to tune some parameters for Emulex, Qlogic and Brocade Fibre Channel HBAs: c02518189. It sounds like these are new, but these changes have been around for at least 6 months in all three vendors’ HBAs.

Emulex

“Emulex driver version 2.42.002 or later, along with OneCommand Manager version 5.1.53.2 or later,”

Use HBAnywhere to change these.

Examples to tune the server or port level transfer size:

  • 128 kbytes, set the LimTransferSize = 2 and ExtTransferSize = 0 (default)
  • 512 kbytes, set the LimTransferSize = 0 (default) and ExtTransferSize = 0 (default)
  • 1 Mbytes, set the LimTransferSize = 0 (default) and ExtTransferSize = 1

Qlogic

This is part of the Qlogic SANSurfer utility.

  • c:\>qlfc -tsize /fc
  • c:\>qlfc -tsize /fc /set 128
  • c:\>qlfc -tsize /fc /set default

Brocade

  • bcu drvconf –key bfa_max_xfer_len –val 64
  • bcu drvconf –key bfa_max_xfer_len –val 128

My broken amazon kindle :(

During the weekend the screen on my amazon kindle 6″ decided to go partially broken.It happened while it was in my backpack inside a ‘leather cover’ that I also got from amazon at the time of purchase.

Usually with these electronic devices it’s that if the screen breaks you’re on your own / can try to get some help from home insurance. So my hopes were not so high when I sent an e-mail to amazon.

They however just asked me to start a chat or call them. I started a chat because I didn’t feel like calling a US number (although they had apparently some service that they’d call me back too), and got a very quick and efficient response. They just asked me to reboot the device (hold the release thing for 30 seconds).
They’re sending a new one and will let me send back the broken one in the same package and with a pre-paid shipment too!

Hope to get it soon, I feel nekkid without this e-book (or anything to read really), and of course it happened just when things were getting really excited in “A storm of Swords” (part of the “game of thrones” book series)!

Tiny Core Linux

http://distro.ibiblio.org/tinycorelinux/welcome.html

Micro Core Linux!

Like super small!

WOop woop…

http://distro.ibiblio.org/tinycorelinux/downloads.html

Three versions:

Core

Core (8MB) – CLI only

This literally boots in 3 seconds after pressing enter at the boot loader, nice!

To get root access hit: ‘sudo sh’.

Basically nothing is installed, but you can download whatever you need with ‘wget’. You’ll need to compile things from source as there’s no packet manager. Or, after trying out the other versions, there may be a packet manager hidden in there somewhere somehow.

Tiny Core

Tiny Core (12MB) – Good for new users and wired connections.

This one boots into a graphical interface with the mac-style bar at the bottom of the screen with icons that pop out. It also has an appbrowser.

Search for something (perhaps ‘seamonkey’) and press ‘go’. This starts to download things. Lots of things. But in the end it completes and it works.

The appbrowser is missing quite a lot, there’s no progress bar so you have no idea how much needs to be downloaded or how long an install might take. You can see in the ‘depends’ tab which the dependencies are and that might give you a clue.

openssl is not installed by default! This is quite a surprise, to me this is almost the basis of a linux-based distribution. But if you don’t need to connect to it remotely or connect from it to another host then I guess you don’t need it :)

irssi doesn’t work by default.

If the packet manager cannot handle installing irssi I call it a crappy distro.

Nuff is e’nuff.

Core Plus

Core Plus (64MB) – Extra nicestuff, good for beginners, wireless and non-US keyboards.

Wonder if irssi works here? – Not in the default terminal or Eterm no! Xchat works though it is full of shieeet.

core plus has a lot nicer boot manager, and it shows a lot more options, such as fluxbox.

Think about:

It takes a fair amount of time to install something (or, it feels longer because there’s no progress bar) if you run it off the livecd. So, if you decide to try another OS without installing apps on disk, be prepared to reinstall apps.

OpenIndiana + PostgreSQL + dCache

This is a test for installing openindiana and set up a working dCache test-vm.

dCache is a storage element of the Grid (scientific computing).

OI == OpenIndiana. Kind of like opensolaris with an Illumos kernel, not the sun/oracle kernel.

With http://www.guldmyr.com/blog/esxi-vmware-workstation/ as a base for how to set up ip settings etc in OI.

oi-dev-151a-text-x86.iso installed

pkg install package/pkg

pkg update

java -version

mkdir /var/postgres

useradd postgres

groupadd postgres

chown postgres:postgres /var/postgres

chmod 755 /var/postgres

The pkg update makes it into 151a2

If you do not create the ones above the install of service/postgres will fail and create a new BE.

pkg install pkg:/database/postgres-84
pkg install pkg:/service/database/postgres-84

vi /etc/passwd

change postgres to 90:90 and homedir to /export/home/postgres

mkdir /export/home/postgres

chown postgres.postgres /export/home/postgres
root@oi:~# vi /export/home/postgres/.profile
PATH=/usr/postgres/8.4/bin:${PATH}
PGDATA=/var/postgres/8.4/data
export PATH PGDATA

you probably also want to add these to the root user’s path

svcadm enable postgresql-84:32_bit

root@oi:/var/log# svcs -a|grep postg
disabled       17:29:37 svc:/application/database/postgresql_84:default_64bit
online         17:31:35 svc:/application/database/postgresql_84:default_32bit

su - postgres

psql

\l

I initially did this in an ESXi VM in VMWare Workstation, but that keept freezing so I went over to a ‘real vm’ instead. The VM is more responsive.

dCache stuff

wget it from www.dcache.org

pkgadd -d dcache-server-1.9.12-16.pkg

follow http://www.dcache.org/manuals/Book-1.9.12/start/in-install.shtml for the instructions of which postgresql-scripts and users and stuff to create

It’s however not enough :

root@oi:~# /opt/d-cache/bin/dcache start
/opt/d-cache/bin/dcache[127]: local: not found [No such file or directory]
/opt/d-cache/bin/dcache[128]: local: not found [No such file or directory]
/opt/d-cache/bin/dcache[129]: local: not found [No such file or directory]
/opt/d-cache/bin/dcache[130]: local: not found [No such file or directory]
/opt/d-cache/bin/dcache[131]: local: not found [No such file or directory]
/opt/d-cache/bin/dcache[132]: local: not found [No such file or directory]
/opt/d-cache/bin/dcache[317]: .[162]: local: not found [No such file or directory]

so, edit /opt/d-cache/bin/dcache and remove the if in the beginning that will make it use /usr/xpg4/bin/sh – so that it uses /bin/bash instead.

Like this:

if [ "$1" = "%" ]; then
    shift
elif [ "`uname`" = "SunOS" ]; then
    if [ -x /bin/bash ]; then
        exec /bin/bash $0 % "$@"
    else
        echo "Cannot find POSIX compliant shell. This script will"
        echo "probably break, but we attempt to execute it anyway."
    fi
fi

after I changed this, I noticed in the console that it said:

rpcbind: non-local attempt to set

bad?

anyway, then start dCache

root@oi:/opt/d-cache/bin# /opt/d-cache/bin/dcache start
Starting dCacheDomain done

in /var/log/dCacheDomain.log you’ll find why it’s not working:

touch /etc/exports

and it appears to be stable, except for some errors about (NFSv3-oi), however, we disregard those for now, we just want to get it running!

vi /opt/d-cache/etc/dcache.conf
dcache.layout=single
mkdir /pool1

and

vi /opt/d-cache/etc/layouts/single.conf

uncomment the pool1 section, set a maxDiskSize=2G to specify max disk space allowed.
Specifics are in the installation part on dcache.org in the book.

Then point your webbrowser to – see any blue buttons?! yay, it’s up!

Next step is to try it out, this might prove a little bit more difficult (to find dcap/root/srm client for opensolaris/oi).

PostgreSQL problem

so maybe next time you restart the vm it gives some errors and puts the postgresql-server in maintenance mode. Look in /var/adm/messages for some tips, it should point you to

svcs -xv svc:/application/database/postgresql_84:default_32bit

/var/svc/log/application-database-postgresql_84\:default_32bit.log

which will tell you more about what’s going on and how to fix it

svcadm restart
svcadm clear

Use dCache with webdav

We’ll start with trying to use Webdav (doesn’t require anything fancy on the client side, except maybe a browser plugin for uploading).

go to the layout file and uncomment the webdav part, add

webdavAnonymousAccess=FULL
webdavRootPath=/data/world-writable

The script /opt/d-cache/bin/chimera-cli.sh sadly assumes that you need bash or a special version of bash somehow.
So running

bash /opt/d-cache/bin/chimera-cli.sh mkdir /data

works, but

/opt/d-cache/bin/chimera-cli.sh mkdir /data

does not.

See http://www.dcache.org/manuals/Book-1.9.12/start/intouch-client.shtml for the rest.

If you keep the webdav in the same domain you’ll need to restart the whole dcache.

In Windows 7 you can then mount a new network folder and click “Connect to a web site that you can use to store your documents and pictures” and in there type:

Now you get another folder in your computer where you can create folders. These will also show up if you surf to , sadly however, you cannot write files. gridpp.ac.uk says it’s because pool is full. But it’s 2048MiB and all free?

https://twiki.grid.iu.edu/bin/view/Storage/MeetingMinutes2009Sep02

suggests minimum pool size might be 4G, changed pool maxdiskspace to 8G.

tada, now the copy starts, or the file creation starts, but I cannot actually write anything to it. So if I create a .txt file, I can give it a name and save it, unless I try to write anything inside it!

some errors to accompany this:

 (WebDAV-oi) [door:WebDAV-oi@dCacheDomain:13295xxx] Your resource factory returned a resource with a different name to that requested!!! Requested: null returned: world-writable - resource factory: class org.dcache.webdav.DcacheResourceFactory
 (WebDAV-oi) [door:WebDAV-oi@dCacheDomain:13295xxx] resource is being locked with a null user. This won't really be locked at all...
 (WebDAV-oi) [door:WebDAV-oi@dCacheDomain:13295xxx] resource is being locked with a null user. This won't really be locked at all...
 (WebDAV-oi) [door:WebDAV-oi@dCacheDomain:13295xxx] Your resource factory returned a resource with a different name to that requested!!! Requested: null returned: world-writable - resource factory: class org.dcache.webdav.DcacheResourceFactory
 (pool1) [00002CBCC971ABC14BDC9E496A0AEAA31FC3] A task was added to queue 'store', however the queue is not configured to execute any tasks.

trying dccp

[root] # cd /etc/yum.repos.d/
[root] # wget http://grid-deployment.web.cern.ch/grid-deployment/glite/repos/3.2/glite-UI.repo
or 
[root] # yum install dcap dccp -d 63 -H /bin/bash dcap://ip.to.server/data/world-writable/2nd/4 creates another empty file, while it adds an entry to the 'store' queue and then not so much happens. stuck on this: Sending control message: 2 0 client open "dcap://IP.to.server/data/world-writable/2nd/4" w -mode=0755 -truncate sl1 40619 -timeout=-1 -onerror=default  -alloc-size=938672  -uid=0 (len=153) 

NFSv41

uncomment the nfsv3 and add nfsv41
then on a system you should be able to ‘apt-get install nfs-common’; modprobe nfs; mkdir /nfsv4 mount -t nfs4 ip.to.server:/ /nfsv4′. But for me this stops working with an “cp: closing `./bash’: Input/output error”. Possibly because I could not specify -o minorversion=1 on this ubuntu install (3.0.0-16).

 

NFSv41 with dCacheToGo

Download dCache2Go from here:

To convert it into VMware format:

VBoxManage clonehd source.vdi target.vmdk --format VMDK

Then create new vm and set the new vmdk file as the disk.

When this VM is up (and the dCache server of course), hit:

mount -t nfs4 -o minorversion ip.to.dcache.host:/ /mnt

then

cd /mnt/data/world-writable
mkdir another
cd another
cp /bin/bash .
cp bash /tmp/bash
diff /tmp/bash /bin/bash

SCORE! We have a working dCache setup in a VM running openindiana!