Home Home > Systems-management
Sign up | Login

Archive for the ‘Systems Management’ Category

Announcing the release of openSUSE Edu Li-f-e 12.2

September 14th, 2012 by

openSUSE Education team once again presents Li-f-e (Linux for Education) built on hot new openSUSE 12.2 including all the post release updates. As always this edition of Li-f-e comes bundled with a lot of softwares useful for students, teachers, as well as IT admins of educational institutions. Apart from stable versions of KDE and Gnome, Cinnamon is also available.Sugar desktop suite makes a comeback thanks to the work of Xin Wang packaging it. Li-f-e also give full multimedia experience right out of the box without having to install anything extra. The live installable DVD iso stands at 3.3G as an incredible array of softwares from open source world are available on it, we have not just bundled them in, but have tried to integrate it with the distribution to give everything a seamless feel.

(more…)

Testing LTSP on openSUSE 12.2

August 23rd, 2012 by

With openSUSE 12.2 almost here, we have been working hard to get LTSP experience on this release better than ever. Thanks to the power of KIWI and some great scripting by Alex Savin, KIWI-LTSP has a lot of new features and improvements.

Here is how to get started:

(more…)

Snapper and LVM thin-provisioned Snapshots

July 25th, 2012 by

SUSEs Hackweek 8 allowed me to implement support for LVM thin-provisioned snapshots in snapper. Since thin-provisioned snapshots themself are new I will shortly show their usage.

Unfortunately openSUSE 12.2 RC1 does not include LVM tools with thin-provisioning so you have to compile them on your own. First install the thin-provisioning-tools. Then install LVM with thin-provisioning enabled (configure option –with-thin=internal).

To setup LVM we first have to create a volume group either using the LVM tools or YaST. I assume it’s named test. Then we create a storage pool with 3GB space.

  # modprobe dm-thin-pool
  # lvcreate --thin test/pool --size 3G

Now we can create a thin-provisioned logical volume named thin with a size of 5GB. The size can be larger than the pool since data is only allocated from the pool when needed.

  # lvcreate --thin test/pool --virtualsize 5G --name thin

  # mkfs.ext4 /dev/test/thin
  # mkdir /thin
  # mount /dev/test/thin /thin

Finally we can create a snapshot from the logical volume.

  # lvcreate --snapshot --name thin-snap1 /dev/test/thin

  # mkdir /thin-snapshot
  # mount /dev/test/thin-snap1 /thin-snapshot

Space for the snapshot is also allocated from the pool when needed. The command lvs gives an overview of the allocated space.

  # lvs
  LV         VG   Attr     LSize Pool Origin Data%  Move Log Copy%  Convert
  pool       test twi-a-tz 3.00g               4.24
  thin       test Vwi-aotz 5.00g pool          2.54
  thin-snap1 test Vwi-a-tz 5.00g pool thin     2.54

After installing snapper version 0.0.12 or later we can create a config for the logical volume thin.

  # snapper -c thin create-config --fstype="lvm(ext4)" /thin

As a simple test we can create a new file and see that snapper detects its creation.

  # snapper -c thin create --command "touch /thin/lenny"

  # snapper -c thin list
  Type   | # | Pre # | Date                          | Cleanup | Description | Userdata
  -------+---+-------+-------------------------------+---------+-------------+---------
  single | 0 |       |                               |         | current     |
  pre    | 1 |       | Tue 24 Jul 2012 15:49:51 CEST |         |             |
  post   | 2 | 1     | Tue 24 Jul 2012 15:49:51 CEST |         |             |

  # snapper -c thin status 1..2
  +... /thin/lenny

So now you can use snapper even if you don’t trust btrfs. Feedback is welcomed.

YaST++: next step in system management

February 15th, 2012 by

All of you probably know YaST, the installation and system configuration tool for openSUSE.

With current YaST, plenty of tasks that system administrator could image are doable using understandable UI: creating users, bootloader configuration, network setup and even Apache configuration. However, it has its drabacks. While being do-it-all tool, it comes with large package dependency even for only simple tasks. It is largely written in an outdated language which has its roots in last century and only few people in the world know it. It lacks the testing abilities of modern languages. It is SUSE specific and lacks larger developer community.

So last year, we (actually, Josef) came with the idea for YaST++: new configuration library that could be a common layer for configuration tools in SUSE (and beyond). Such library should provide simple and understandable API for all tools around. Written in up-to-date language many people know and like, so they can join the development (spoiler: we chose Ruby). Offering bindings  to various other languages, so different tools could benefit from it,

Now, this “YaST++” does not actually mean to be replacement of current YaST (with its Qt/GTK/ncurses UI), but it could replace the lower layer of YaST, which is doing the real system configuration. And it would be open for other library users as well: the obvious targets for now are WebYaST and SUSE Studio, but we’d like to see if other tools are interested: even from non-SUSE world.

From architecture point, YaST++ is itself divided into two layers, we call them YLib and config agents. YLib is the high-level library, providing the API (like ‘create user’, ‘set new time zone’ etc.). Config agents form the lower layer, that is actually touching the system. This low level consits of D-BUS services, which are running as a root (thus have the full access to the system) but are started only for users with proper permissions (we are using polkit for policies definition). So YaST++ offers role based access management, where specific users can be allowed to do specific sets of actions. For more, check our architecture document (still WIP).

We’ve started to work on several modules (none of them is finished, though). Let’s look at example in module for users configuration (packages yast++lib-users and config_agent-passwd). Look at example code in ‘users_read’ script of examples subdirectory. With simple ruby call of

YLib::Users::read({})

you get the list of current users. If the script gets additional parameters, it can list e.g. all data about selected user, or only specific information about all:

> ./users_read root
{“gid”=>”0″, “name”=>”root”, “uid”=>”0″, “shell”=>”/bin/bash”, “password”=>”x”, “home”=>”/root”}

> ./users_read only name
{“result”=>["Batch jobs daemon", "User for Avahi", "bin", "Daemon", "dnsmasq", "FTP account", "Games account", "User for haldaemon", "User for OpenLDAP", "LightDM daemon", "Printing daemon", "Mailer daemon", "Manual pages viewer", "User for D-Bus", "MySQL database admin", "News system", "user for nginx", "nobody", "NTP daemon", "User for build service backend", "openslp daemon", "PolicyKit", "Postfix Daemon", "PulseAudio daemon", "qemu user", "Router ADVertisement Daemon for", "root", "RealtimeKit", "Smart Card Reader", "user for smolt", "SSH daemon", "NFS statd daemon", "Novell Customer Center User", "TFTP account", "usbmuxd daemon", "Unix-to-Unix CoPy system", "WWW daemon apache", "User for YaST-Webservice", "LXDE Display Manager daemon"]}

YaST++ developement is in its early stage (even the name is not final), but we already have something to offer.

Check the code and documentation at github project. There’s already a simple tutorial for those who want to try writing new parts.

Download packages from Build Service project.

Comment/propose/oppose in public YaST mailing list.

fuk the kit you will love

January 19th, 2012 by

Dear fellows, in our moving free world, it’s not always bienvenue to talk about one of the *kit* software around.
Most of them have bad reputation, (with good or bad reasons) this is the debate of this post.

But in the uni-kit-verse there’s one you must known, especially if you are the proud owner of a laptop or one of this computer the manufacter deliver its firmware only in DOS exe format.
FirmwareUpdateKit (was introduced in 2008 in openSUSE by Steffen Winterfeldt

How that works?

As the title of the post give you the right command, open a console, then use the cnf (command-not-found) tool to learn what to do

Install the package

cnf fuk

The program 'fuk' can be found in the following package:
  * FirmwareUpdateKit [ path: /usr/bin/fuk, repository: zypp (repo-oss) ]

Try installing with:
    zypper install FirmwareUpdateKit

Pretty clear and cool, let’s install that stuff!

sudo zypper install FirmwareUpdateKit
root's password:
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW packages are going to be installed:
  FirmwareUpdateKit syslinux 

2 new packages to install.
Overall download size: 758.0 KiB. After the operation, additional 2.1 MiB will be used.
Continue? [y/n/?] (y): y
Retrieving package syslinux-4.04-12.1.3.x86_64 (1/2), 642.0 KiB (1.9 MiB unpacked)
Retrieving: syslinux-4.04-12.1.3.x86_64.rpm [done]
Retrieving package FirmwareUpdateKit-1.1-14.1.1.x86_64 (2/2), 116.0 KiB (178.0 KiB unpacked)
Retrieving: FirmwareUpdateKit-1.1-14.1.1.x86_64.rpm [done]
Installing: syslinux-4.04-12.1.3 [done]
Installing: FirmwareUpdateKit-1.1-14.1.1 [done]

Firmware Update

Get your bios

Nothing easy for that, you will have to surf on boring mfg website, and find an appropriate bios for your computer.

Be serious during that selection, you can screw up totally your computer

Time to fuk

As always before running a program, it’s always good to check if there’s the fine manual (not the case here) or try a -h –help

fuk --help
Usage: fuk [OPTIONS] FILES
FirmwareUpdateKit version 1.1.

Create bootable DOS system and add FILES to it.
The main purpose is to assist with DOS-based firmware updates.

Options:
  --grub                        Add boot entry to /boot/grub/menu.lst.
  --lilo                        Add boot entry to /etc/lilo.conf.
  --title TITLE                 Use TITLE as label for boot menu entry.
  --iso FILE                    Create bootable CD.
  --floppy FILE                 Create bootable (1440 kB) floppy disk.
  --image FILE                  Create bootable harddisk.
  --run COMMAND                 Run COMMAND after booting DOS.
  --verbose                     Be more verbose.

Nothing complicated as a nuclear plan here, everything seems to be self explicit.
Let try it, and install a new grub entry for the new A8 version for my lappy.

fuk --verbose --grub --run M4600A08.exe /home/bruno/src_tmp/HARDWARE/DELL_M4600/M4600A08.exe 
/tmp/fuk.lSVIgS0cMt/fwupdate.img: chs = 186/4/16, size = 11904 blocks
- writing mbr
- writing fat12 boot block
- copying:
    /usr/share/FirmwareUpdateKit/kernel.sys
    /usr/share/FirmwareUpdateKit/command.com
    /tmp/fuk.lSVIgS0cMt/config.sys
    /tmp/fuk.lSVIgS0cMt/autoexec.bat
    /home/bruno/src_tmp/HARDWARE/DELL_M4600/M4600_A08.exe
c-3po:~ # 

That’s all I’ve now a new entry in my grub list

title Firmware Update
    kernel /boot/memdisk
    initrd /boot/fwupdate.img

Apply

Now just reboot and use the grub entry, then upgrade your bios, like you will normally have done with you old complicated build iso, or diskette (I’m joking)

WebYaST 0.3 is out

November 7th, 2011 by

WebYaST 0.3 is out

“We have doubled the speed and have halved the memory usage”


The latest version of WebYaST has many improvements regarding speed, memory usage, usability and developing environment:

  • Speed
    Due a new caching mechanism the startup time of each module has been decreased to a maximum of 1-2 seconds. So the user is able now to click through WebYaST without any notable waiting time.
    We have made a video which shows the speed improvement: WebYaST Comparison VideoFor more technical information have a look to: WebYaST Caching Howto
  • Memory Usage
    Former versions of WebYaST were split into a service and into an UI part. Each part has run in a own HTTP server. We have decided to bring these parts together in order to save one HTTP server which halves the memory usage.
    One additional benefit is that the architecture of WebYaST has simplified a lot:
  • Simplifying WebYaST architecture
    Due the use of one HTTP WebYaST server only the development environment has been simplified very much:

    1. Setup an environment system is much more easier now. Even a setup based on the GIT repository is quite easy.
      For more information have a look to : WebYaST Installation
    2. Writing an own WebYaST plugin has been reduced to a minimum effort. Everyone who has read a Ruby on Rails tutorial is now able to write a plugin.
      You do not believe ? Then have a look to the Example plugin .

How to get:

  • All needed packages can be downloaded from OBS
  • The source code can be found in Github

Available for…

.Sadly it is too late for 12.1 but you can install the packages from the repository described above for 11.4 and 12.1

New Style for YaST2

October 24th, 2011 by

YaST2 got a lot of improvements which will be available in openSUSE 12.1. YaST doesn’t accidentally overwrite configuration files anymore (last bug fixed ;-) ) and snapper provides a rollback function for configuration options, just to mention a few. Therefore it’s time to give YaST2 a new and fresh style. As YaST Qt supports Stylesheets it’s simple to influence YaST’s style.

Screenshot of YaST's New Style

FACTORY contains the new style already. Packages for older releases are also available in my build service project: http://software.opensuse.org/download.html?project=home:tgoettlicher:Factory&package=branding-openSUSE.

I hope you like it. You can use YaST’s Stylesheet Editor to play around the the stylesheet as described in my this blog post. Please send me improvements you want to share. Thanks.

fsck.ocfs2: I/O error on channel while performing pass 1

September 5th, 2011 by

When running fsck.ocfs2 if you get an error like below, turn off feature metaecc and run it again.

fsck -f -y /dev/drbd0
fsck from util-linux-ng 2.17.2
fsck.ocfs2 1.4.3
Checking OCFS2 filesystem in /dev/drbd0:
Label: vmimages
UUID: B5A45669962C4E40AE9FB2BF16184981
Number of blocks: 157281328
Block size: 4096
Number of clusters: 19660166
Cluster size: 32768
Number of slots: 4

/dev/drbd0 was run with -f, check forced.
Pass 0a: Checking cluster allocation chains
Pass 0b: Checking inode allocation chains
Pass 0c: Checking extent block allocation chains
Pass 1: Checking inodes and blocks.
extent.c: I/O error on channel reading extent block at 112162 in owner 516113 for verification
pass1: I/O error on channel while iterating over the blocks for inode 516113
fsck.ocfs2: I/O error on channel while performing pass 1

#disable metaecc (man tunefs.ocfs2 for more)
tunefs.ocfs2 --fs-features=nometaecc /dev/drbd0

#run fsck again
fsck -f -y /dev/drbd0

to re-enable it after completing fsck, run:
tunefs.ocfs2 --fs-features=metaecc /dev/drbd0

new package squidview available

July 17th, 2011 by

squidview

squidview is one of the software, I’ve always build and installed on each squid proxy server I build for me or customers. It’s small, stable, and usefull. So it was a clear real nice candidate to be use to improve my obs and packager skiil.
I would like to thanks T1loc, yaloki, mrdocs, coolo, alin, and all others great packagers around, for helping and teaching me during the process.

Introduction

Squidview is an interactive console program which monitors and displays squid logs in a nice fashion, and may then go deeper with searching and reporting functions.

(If you don’t know what squid is or does this program is probably not for you.)

To use squidview you must at least have read access to squid’s access.log file. You may need to see your administrator for this. Squidview uses this text log file for all operations. It does not generate its own database for tasks.

homepage www.rillion.net/squidview

Features

Squidview has a number of functions. Navigate the log file with the cursor pad keys, jump to a certain day or switch to a different log file. Search for text or large http/ftp requests.

Put squidview into monitor mode: see the latest activity updated every 3 seconds (this is light on cpu load).

Reports can be generated listing the heavist Internet users and the most popular visited sites. See how many cache hits squid makes to save network traffic.

Squidview is released under the GPL.

Examples / Usage

What the above would be if viewed with less.

A tally of all users against the bandwidth they used. Kept current in near real time.

A quick investigation into the recent history of one user.

Installation / Repositories

I’ve just made a submit request against openSUSE_Factory to get it included directly, but in the meantime, you could install it from the repository server:proxy as many other useful & related packages

For example adding the repository under openSUSE_Factory

zypper ar -c -f -n "server:proxy" http://download.opensuse.org/repositories/server:/proxy/openSUSE_Factory "server:proxy"
zypper in squidview

Builds available for :

The package is build successfully against : SLES10, SLES11, openSUSE 11.3 to Factory

Have Fun!

Mockup :: GNOME3 and YaST

April 30th, 2011 by

With the release of GNOME3 I would assume that people are interested in seeing how YaST2 (suggestion: rename it to YaST3 !!) is going to take form with GTK3. Of course this means eventually writing another application in GTK3, hopefully different from the old gnome-control-panel ‘style’ which was actually pretty confusion from the user point of view as it was far too close to gnome-control-center, thus confusing new comers.

My suggestion (unaware if it’s possible or not) was probably to explore GNOME3 features to serve YaST integrated already with GNOME3. This could be an interesting approach as it would offer integration and some advantages:

* Better integration with GNOME3 without having to write(/maintain another application;
* Take advantage of YaST2 modular structure;
* Present YaST in a prime space in GNOME3, thus offering a openSUSE differentiation point;
* No conflicts with possible KDE existing front-ends for YaST2;
* Improve users experience.

My proposal would be something like (maybe to be served as an extension for gnome-shell). Please neglect my ‘lame’ photo manipulation skills:

Mockup: YaST2 on GNOME3