Yesterday I took my girlfriend home after a relaxing dinner with some of our friends. She lives in a town between Madrid and Segovia and we usually drive through the Guadarrama mountain pass, from which you can admire both the lights of Madrid and the woods and the darkness which open the way to Segovia.
When I was back on the road, returning to Madrid, as soon as I passed by the Alto del León, I was captured by the beauty of the night: the lights of Madrid were far away, the snake of lampposts of the A6 was creeping into the woods below a dark sky filled with stars and an already small but brilliant decrescing moon. I don't know why, but it all were so clear that I thought about the famous 2001: A space Odessy scene of Paul Bowman entering the gate in his pod and exclaiming: "Oh my God, it's full of stars."
I stopped the car and smoked a cigarette, while Leonids started dancing in the sky.
AdSense Mobile Ad
Thursday, November 20, 2008
Wednesday, November 19, 2008
Don't use Solaris Express Community Edition build 102
I already wrote about this on my precedent post but I think this deserves a better exposure. Long story short: don't use Solaris Express Community Edition build 102, if you already downloaded it. As you can check on the official announcement thread for build 102, it's affected by a bug which may seriously compromise your root ZFS filesystem:
Due to the following bug, I have removed build 102 from the Download page.
6771840 zpool online on ZFS root can panic system
It apparently may cause data corruption and may have been implicated in damage to one or more systems that have upgraded to build 102 or beyond.
We will remove it from the SDLC on Monday. I will notify about the schedule for a repsin.
Derek
Wondering where's your CDROM gone in your HVM domain?
That's what I've been wondering since a couple of weeks ago...
I have a couple of Microsoft Windows Server 2003 Enterprise HVM domains running on Sun xVM shipped with Solaris Express Community Edition (build 101). Yes, I know... but it's not my fault! ;) When I installed the machine I had that "bad feeling" you perceive, because I had to manually trick the virtual machine definition, dumped by a
Indeed, when I had to configure an Active Directory instance in one of these machines, at the end of the DNS configuration I was asked for Windows Server 2003 CD 2. No problem, thought I, just do a
Nevertheless the device seemed to be created because the cdrom was appearing in the block-list output. The system couldn't see anything, nor the empty CDROM, indeed. The worst thing, I didn't want to stop the machine just in the middle of the Active Directory installation.
At the end I desperately gave up and stopped the machine, checked the dumpxml output and restarted the machine. The block-attach call now succeeded. What was happening to my HVM domain? I didn't know and probably still do not, but the changelog for Solaris Express Community Edition build 102 makes me think that I hit the following bug:
If you are experiencing a similar error and you're running Solaris Express Community Edition up to build 101, I suggest you to give up and restart the domain. At least, you'll spare some time banging your head against the wall.
Another bad thing after the initial happiness (I was indeed eager to update my system) was the following post on the Solaris Express announcement forum:
I have a couple of Microsoft Windows Server 2003 Enterprise HVM domains running on Sun xVM shipped with Solaris Express Community Edition (build 101). Yes, I know... but it's not my fault! ;) When I installed the machine I had that "bad feeling" you perceive, because I had to manually trick the virtual machine definition, dumped by a
# virsh dumpxml [hvm-domain]command as suggested by many documents I found googling. One of them was an official Sun Microsystems technical brief titled Install Sun xVM hypervisor & use it to configure domains found on the excellent BigAdmin portal. Page 8 of this brief states:
There is a bug 6648448 with respect to the Windows 2003 guest and the CD. The install will halt with a Windows error message with regard to access to the CDROM.By using the suggested workaround I happily resolved the problem. That problem.
Indeed, when I had to configure an Active Directory instance in one of these machines, at the end of the DNS configuration I was asked for Windows Server 2003 CD 2. No problem, thought I, just do a
# virsh block-attach [hvm-domain] file:/your/iso/file hdb:cdrom rbut it was impossible for me to succeed in mounting the cdrom. The following error was raised:
Error: Device [put your number here] (vbd) could not be connected. Backend device not found.
Nevertheless the device seemed to be created because the cdrom was appearing in the block-list output. The system couldn't see anything, nor the empty CDROM, indeed. The worst thing, I didn't want to stop the machine just in the middle of the Active Directory installation.
At the end I desperately gave up and stopped the machine, checked the dumpxml output and restarted the machine. The block-attach call now succeeded. What was happening to my HVM domain? I didn't know and probably still do not, but the changelog for Solaris Express Community Edition build 102 makes me think that I hit the following bug:
Empty CD-ROM disappears from HVM domainsSo, where was my cdrom? It had simply disappeared.
If you are experiencing a similar error and you're running Solaris Express Community Edition up to build 101, I suggest you to give up and restart the domain. At least, you'll spare some time banging your head against the wall.
Another bad thing after the initial happiness (I was indeed eager to update my system) was the following post on the Solaris Express announcement forum:
Due to the following bug, I have removed build 102 from the Download page.I'll have to wait some more time to be able to insert a CDROM on an already running HVM domain but I want to put in a word for xVM: except for these... minor glitches ;) I'm very pleased with it and I'm looking forward to trying Sun xVM Server as soon as Sun will ship it.
6771840 zpool online on ZFS root can panic system
It apparently may cause data corruption and may have been implicated in damage to one or more systems that have upgraded to build 102 or beyond.
We will remove it from the SDLC on Monday. I will notify about the schedule for a repsin.
Derek
Sunday, November 16, 2008
Back to CLIs: it's really funny running btdownload* on Solaris 10 (with a screen multiplexer)
After having used I don't even know how many bittorrent GUI clients (such as Azureus, KTorrent, etc.), I recently fell back to bittorrent CLIs. Why? Because I've got a server with a pretty good DSL connection (more than 10 time faster than what I've got at my home...) and I usually ssh-to it. Problems where two: remotely opening a GUI (my home connection is not so slow, but clearly insufficient for remote graphical sessions) and not having killed the process when disconnecting. Both problems are easily solved, many bittorrent clients I've seen so far support some kind of daemon mode. But using a screen multiplexer was simpler.
I already told you about GNU Screen multiplexer, and this is the typical use case GNU Screen fits perfectly in.
Installing bittorrent (the original)
As usual, from Blastwave. Here's the package and here's the command line to install it:
Running bittorrent in a multiplexed terminal
Now that we have your copy of the bittorrent client installed it, it's time to use it. The reason why I want to use a terminal multiplexer is because I'll be running bittorrent on another machine. I could nohup the process, but once done that and disconnected, I couldn't reattach to it and see output in the console, the only thing I could do would be reading the files where standard output was redirected (by nohup). It's not a good way to go, with such program as bittorrent.
First, launch bittorrent in a screen session: I prefer this way, as stated in another blog post:
You can now safely log out from the machine and leave bittorrent working. From time to time, you can log in and reattach the screen to check for progress and just hit q to exit bittorrent when it's done.
Enjoy!
I already told you about GNU Screen multiplexer, and this is the typical use case GNU Screen fits perfectly in.
Installing bittorrent (the original)
As usual, from Blastwave. Here's the package and here's the command line to install it:
# /opt/csw/bin/pkg-get -Uand follow on as usual.
# /opt/csw/bin/pkg-get -i bittorrent
Running bittorrent in a multiplexed terminal
Now that we have your copy of the bittorrent client installed it, it's time to use it. The reason why I want to use a terminal multiplexer is because I'll be running bittorrent on another machine. I could nohup the process, but once done that and disconnected, I couldn't reattach to it and see output in the console, the only thing I could do would be reading the files where standard output was redirected (by nohup). It's not a good way to go, with such program as bittorrent.
First, launch bittorrent in a screen session: I prefer this way, as stated in another blog post:
$ /opt/csw/bin/screen -m -d /opt/csw/bin/btdownloadcurses [your-torrent-file]If you feel like checking what's going on before leaving it there to download, you could check bittorrent status reattaching to it
$ screen -r PIDand then using CTRL+A,D to detach another time.
You can now safely log out from the machine and leave bittorrent working. From time to time, you can log in and reattach the screen to check for progress and just hit q to exit bittorrent when it's done.
Enjoy!
Back to CLIs: using a physical terminal multiplexer on Solaris 10
How many times did a remote terminal session unexpectedly close and you lost some work? How many times did you fell that a nohup was insufficient but it was the only option left to you? In many situations GNU Screen was very useful to me.
What GNU Screen is not.
It's not a full fledged solution to open, detach and reattach graphical session. It's not VNC or similar software.
What GNU Screen is.
Technically it's a screen multiplexer. This means that with screen you can literally multiplex physical terminals, launch processes inside them, detach from sessions and reattach from whichever machine. Screen is pretty powerful and I suggest you to read the official documentation. Nevertheless, a quick crash course may be useful.
Installing GNU's screen (a screen multiplexer).
This applies only to Solaris 10. Screen is also included in some Solaris Express and OpenSolaris versions. As usual, I'll install it from Blastwave, which will take care of all dependencies (which in this case it's just CSWcommon which will be installed if you'd already configured Blastwave on your machine). Here's the package and here are commands. First, let's refresh the software catalog from out preferred mirror:
It's easy, just typing screen:
Exiting a session
This is easy too. Just exit screen as you'll exit your favorite shell:
If you want to detach from the current session and leave programs running, you can just hit CTRL+A,D and you'll detach the screen you're using:
Sessions are maintained on a per-user base. Just log in with your user and type:
Launching a command on a new screen session and detach it immediately
This is one of those I use most. If you need to launch a program and you want to launch it inside a new screen session without even attaching to it, you can use the following syntax:
What GNU Screen is not.
It's not a full fledged solution to open, detach and reattach graphical session. It's not VNC or similar software.
What GNU Screen is.
Technically it's a screen multiplexer. This means that with screen you can literally multiplex physical terminals, launch processes inside them, detach from sessions and reattach from whichever machine. Screen is pretty powerful and I suggest you to read the official documentation. Nevertheless, a quick crash course may be useful.
Installing GNU's screen (a screen multiplexer).
This applies only to Solaris 10. Screen is also included in some Solaris Express and OpenSolaris versions. As usual, I'll install it from Blastwave, which will take care of all dependencies (which in this case it's just CSWcommon which will be installed if you'd already configured Blastwave on your machine). Here's the package and here are commands. First, let's refresh the software catalog from out preferred mirror:
# /opt/csw/bin/pkg-get -UThen, let's install screen:
# /opt/csw/bin/pkg-get -i screenHow to start a screen session
It's easy, just typing screen:
$ screenScreen will present you a welcome screen and hitting space or enter will bring you to your new screen session. Since now on, every process will be running inside screen's multiplexed physical terminal.
Exiting a session
This is easy too. Just exit screen as you'll exit your favorite shell:
$ exitDetaching from a session
[screen is terminating]
If you want to detach from the current session and leave programs running, you can just hit CTRL+A,D and you'll detach the screen you're using:
$ [hit CTRL+A,D]Listing the open sessions
[detaching]
Sessions are maintained on a per-user base. Just log in with your user and type:
$ screen -lsScreen's telling you that you have 3 open sessions: one is a detached screen (4544.console.PCS30575) and another two which are probably dead session you couldn't wake up any more. If you want to wipe them, just use the wipe option (note that the using the PID is sufficient because we're connecting from and to the same machines we detached screens from):
There are screens on:
3492.console.PCS30575 (Dead ???)
4544.console.PCS30575 (Detached)
6028.console.PCS30575 (Dead ???)
Remove dead screens with 'screen -wipe'.
3 Sockets in /tmp/uscreens/S-A144286.
$ screen -wipe 3492You can know wipe the other one. To reattach to the 4544 session:
There is a screen on:
3492.console.PCS30575 (Removed)
1 socket wiped out.
No Sockets found in /tmp/uscreens/S-A144286.
$ screen -r 4544If you check screen documentation you'll see plenty of options which allow you to detach and reattach with a single command (if you're connecting from another client and you left a session open on another machine), etc.
Launching a command on a new screen session and detach it immediately
This is one of those I use most. If you need to launch a program and you want to launch it inside a new screen session without even attaching to it, you can use the following syntax:
$ screen -m -d [your-command]This will create a new session, launch your-command inside it and leave it detached.
Subscribe to:
Posts (Atom)