Friday August 22, 2008 | Constantin's Blooog |
|
Useful stuff for your blog-reading pleasure.
All
|
General
POFACS Podcast: Home Servers are quickly becoming Commonplace
Now, the entertainment industry gives us many home server alternatives to choose from: Add 50-100 EUR to a USB disk's price, and you'll get a built in server that offers the space to your local network through SMB, NFS or other protocols. Microsoft has discovered this, too and they're busily debugging their Windows Home Server products. UPnP has emerged as a standard for driving audio/video components over the network from servers, be they beefed up USB disks or some machine running some OS with some server component or a real dedicated home server machine. If you use iTunes and enable the "sharing" piece, you're already running a home server. Of course, this is all driven by clients. First, people imported their music from CDs into their computers so they could listen on the go and fill their MP3 players. Then, they discovered that running a PC or even a laptop in your living room to listen to your music isn't really cool and lacks that WAF that makes or breaks most living room decisions. Soon, specialized living room clients started to pop up, such as the Roku Soundbridge or the Logitech SqueezeBox. Digital TV set-top-boxes and PVRs like the DreamBox were also early adopters of the home network by either offering TV streams on the network or using network attached storage for storing recorded TV shows. And the current generation of game consoles comes with Wifi and/or wired networking as a central part of their strategy, and they make good network media players as well. Even the traditional vendors of home entertainment equipment such as TVs, Hifi systems etc. have started to adopt some way of accepting digital audio and/or video from the network for A/V Receivers, DVD-Players, TVs etc. My current favourite, for example is the Linn Sneaky Music DS. And I applaud them for boldy migrating their records business to the digital world, in full studio master quality. You can even buy their full music catalog pre-installed on a 2TB NAS storage appliance, including UPnP server! The current edition of the POFACS Podcast (sorry, it's in German) talks about the various ways a home server can add value to your living room experience, from serving files to your family's laptops, being a backup repository to the more interesting topics of serving music for dinner in a WAF-friendly way or handling your TV recordings over the net so you don't have to worry about noisy PCs and harddisks sitting in your living room. Enjoy!
"POFACS Podcast: Home Servers are quickly becoming Commonplace" has been brought to you by Constantin's Blooog.
This entry was created on 2008-08-22 04:14:36.0 PST and is associated with the following tags:
home
it
podcast
podcasting
pofacs
server
solaris
ZFS Replicator Script, New Edition
Meanwhile, the fine guys at the ZFS developer team introduced recursive send/receive into the ZFS command, which makes most of what the script does a simple -F flag to the zfs(1M). Unfortunately, this new version of the ZFS command has not (yet?) been ported back to Solaris 10, so my ZFS snapshot replication script is still useful for Solaris 10 users, such as Mike Hallock from the School of Chemical Sciences at the University of Illinois at Urbana-Champaign (UIUC). He wrote: Your script came very close to exactly what I needed, so I took it upon myself to make changes, and thought in the spirit of it all, to share those changes with you. The first change he in introduced was the ability to supply a pattern (via -p) that selects some of the potentially many snapshots that one wants to replicate. He's a user of Tim Foster's excellent automatic ZFS snapshot service like myself and wanted to base his migration solely on the daily snapshots, not any other ones. Then, Mike wanted to migrate across two different hosts on a network, so he introduced the -r option that allows the user to specify a target host. This option simply pipes the replication data stream through ssh at the right places, making ZFS filesystem migration across any distance very easy. The updated version including both of the new features is available as zfs-replicate_v0.7.tar.bz2. I didn't test this new version but the changes look very good to me. Still: Use at your own risk. Thanks a lot, Mike!
"ZFS Replicator Script, New Edition" has been brought to you by Constantin's Blooog.
This entry was created on 2008-08-13 13:25:49.0 PST and is associated with the following tags:
open
opensolaris
opensource
remote
replication
script
snapshot
solaris
source
zfs
zpool
ZFS saved my data. Right now.
For storage, I use Western Digital's MyBook Essential Edition USB drives because they are the cheapest ones I could find from a well-known brand. The packaging says "Put your life on it!". How fitting. Last week, I had a team meeting and a colleague introduced us to some performance tuning techiques. When we started playing with iostat(1M), I logged into my server to do some stress tests. That was when my server said something like this: constant@condorito:~$ zpool status (data from other pools omitted) pool: santiago state: DEGRADED status: One or more devices has experienced an unrecoverable error. An attempt was made to correct the error. Applications are unaffected. action: Determine if the device needs to be replaced, and clear the errors using 'zpool clear' or replace the device with 'zpool replace'. see: http://www.sun.com/msg/ZFS-8000-9P scrub: scrub completed after 16h28m with 0 errors on Fri Aug 8 11:19:37 2008 config: NAME STATE READ WRITE CKSUM santiago DEGRADED 0 0 0 mirror DEGRADED 0 0 0 c10t0d0 DEGRADED 0 0 135 too many errors c9t0d0 DEGRADED 0 0 20 too many errors mirror ONLINE 0 0 0 c8t0d0 ONLINE 0 0 0 c7t0d0 ONLINE 0 0 0 errors: No known data errors This tells us 3 important things:
Over the weekend, I ordered myself a new disk (sheesh, they dropped EUR 5 in price already after just 5 days...) and after a " constant@condorito:~$ zpool status
(data from other pools omitted)
pool: santiago
state: DEGRADED
status: One or more devices has experienced an unrecoverable error. An
attempt was made to correct the error. Applications are unaffected.
action: Determine if the device needs to be replaced, and clear the errors
using 'zpool clear' or replace the device with 'zpool replace'.
see: http://www.sun.com/msg/ZFS-8000-9P
scrub: resilver in progress for 1h13m, 6.23% done, 18h23m to go
config:
NAME STATE READ WRITE CKSUM
santiago DEGRADED 0 0 0
mirror DEGRADED 0 0 0
replacing DEGRADED 0 0 0
c10t0d0 DEGRADED 0 0 135 too many errors
c11t0d0 ONLINE 0 0 0
c9t0d0 DEGRADED 0 0 20 too many errors
mirror ONLINE 0 0 0
c8t0d0 ONLINE 0 0 0
c7t0d0 ONLINE 0 0 0
errors: No known data errors
The next step for me is to send the c10t0d0 drive back and ask for a replacement under warranty (it's only a couple of months old). After receiving c10's replacement, I'll consider sending in c9 for replacement (depending on how the next scrub goes). Which makes me wonder: How will drive manufacturers react to a new wave of warranty cases based on drive errors that were not easily detectable before? [1] To the guys at Drobo: Of course you're invited to implement ZFS into the next revision of your products. It's open source. In fact, Drobo and ZFS would make a perfect team!
"ZFS saved my data. Right now." has been brought to you by Constantin's Blooog.
This entry was created on 2008-08-12 06:44:22.0 PST and is associated with the following tags:
corruption
data
drobo
integrity
opensolaris
solaris
storage
zfs
Welcome to the year 2038!
The Year 2038 ProblemTo understand the Year 2038 Problem, check out the definition of typedef long time_t; /* time of day in seconds */ To represent a date/time combination, most Unix OSes store the number of seconds since January 1st, 1970, 00:00:00 (UTC) in such a time_t variable. On 32-Bit systems, "long" is a signed integer between -2147483648 and 2147483647 (see types.h). This covers the range between December 13th, 1901, 20:45:52 (UTC) and January 19th, 2038, 03:14:07, which the fathers of C and Unix thought to be sufficient back then in the seventies. On 64-Bit systems, time_t can be much bigger (or smaller), covering a range of several hundred thousands of years, but if you're 32-Bit in 2038 you'll be in trouble: A second after January 19th, 2038, 03:14:07 you'll travel back in time and immediately find yourself in the middle of December 13th, 1901, 20:45:52 with a major headache called "overflow". More details about this problem can be found on its Wikipedia page. 2038 could be today...Well, you might say, I'll most probably be retired in 2038 anyway and of course, there won't be any 32-Bit systems that far in the future, so who cares? A customer of mine cared. They run a very big file server infrastructure, based on Solaris, ZFS and a number of Sun Fire X4500 machines. A big infrastructure like this also has a large number of clients in many variations. And some of their clients have a huge problem with time: They create files with a date after 2040. Now, the NFS standard will happily accept dates outside the 32-Bit time_t range and so will ZFS. But any program compiled in 32-Bit mode (and there are many) will run into an overflow error as soon as it wants to handle such a file. Incidentally, most of the Solaris file utilities (you know, rm, cp, find, etc.) are still shipped in 32-Bit, so having files 30+ years in the future is a big problem if you can't administer them. The 64-Bit solutionOne simple solution is to recompile your favourite file utilities, say, from GNU coreutils in 64-Bit mode, then put them into your path and hello future! You can do this by saying something like: CC=/opt/SUNWspro/bin/cc CFLAGS=-m64 ./configure --prefix=/opt/local; make (Use /opt/SunStudioExpress if you're using Sun Studio Express). Now, while trying to reproduce the problem and sending some of my own files into the future, I found out thanks to Chris and his short "what happes if I try" DTrace script, that OpenSolaris already has a way to deal with these problems: ufs and ZFS just won't accept any dates outside the 32-Bit range any more (check out lines 2416-2428 in zfs_vnops.c). Tmpfs will, so at least I could test there on my OpenSolaris 2008.05 laptop. That's one way to deal with it, but shutting the doors doesn't help our poor disoriented client of the future. And it's also only available in OpenSolaris, not Solaris 10 (yet). The DTrace solutionSo, I followed Ulrich's helpful suggestions and Chris' example and started to hack together a DTrace script of my own that would print out who is trying to assign a date outside of 32-Bit-time_t to what file, and another one that would fix those dates so files can still be accepted and dealt with the way sysadmins expect. The first script is called "showbigtimes" and it does just that: constant@foeni:~/file/projects/futurefile$ pfexec ./showbigtimes_v1.1.d dtrace: script './showbigtimes_v1.1.d' matched 7 probes CPU ID FUNCTION:NAME 0 18406 futimesat:entry UID: 101, PID: 2826, program: touch, file: blah atime: 2071 Jun 23 12:00:00, mtime: 2071 Jun 23 12:00:00 ^C constant@foeni:~/file/projects/futurefile$ /usr/bin/amd64/ls -al /tmp/blah -rw-r--r-- 1 constant staff 0 Jun 23 2071 /tmp/blah constant@foeni:~/file/projects/futurefile$ Of course, I ran " A couple of non-obvious hoops needed to be dealt with:
I hope the comments inside the script are helpful. Be sure to check out the DTrace Documentation, which was very useful to me. The second script is called correctbigtimes.d and it not only alerts us of files being sent into the future, it automatically corrects the dates to the current date/time in order to prevent any time-travel outside the bounds of 32-Bit time_t at all: constant@foeni:~/file/projects/futurefile$ pfexec ./correctbigtimes_v1.1.d dtrace: script './correctbigtimes_v1.1.d' matched 2 probes dtrace: allowing destructive actions CPU ID FUNCTION:NAME 0 18406 futimesat:entry UID: 101, PID: 2844, program: touch, fd: 0, file: atime: 2071 Jun 23 12:00:00, mtime: 2071 Jun 23 12:00:00 Corrected atime and mtime to: 2008 Jul 3 16:23:25 ^C constant@foeni:~/file/projects/futurefile$ ls -al /tmp/blah -rw-r--r-- 1 constant staff 0 2008-07-03 16:23 /tmp/blah constant@foeni:~/file/projects/futurefile$ As you can see, we enabled DTrace's destructive mode (of course only for constructive purposes) which allows us to change the time values on the fly and ensure a stable time continuum. This time, I left out the code that created the file descriptor-to-filename table, because this script may potentially be running for a long time and I didn't want to consume preciuous memory for just a convenience feature (Otherwise we'd kept an extra table of all open files for all running threads in the syste,!). If we get a filename string, we print it, otherwise a file descriptor needs to suffice, we can always look it up through pfiles(1). The actual time modification takes place inside our local variables, which then get copied back into the system call through copyout(). I hope you liked this little excursion into the year 2038, which can happen sooner than we think for some. To me, this was a great opportunity to dig a little deeper into DTrace, a powerful tool that shows us what's going on while enabling us to fix stuff on the fly. Update: Ulrich had some suggestions and found a bug, so I updated both scripts to version 1.2:
The new versions are already linked from above or available here: showbigtimes_v1.2.d, correctbigtimes_v1.2.d.
"Welcome to the year 2038!" has been brought to you by Constantin's Blooog.
This entry was created on 2008-07-03 08:18:35.0 PST and is associated with the following tags:
2038
bug
dtrace
problem
script
solaris
ZFS and Mac OS X Time Machine: The Perfect TeamA few months ago, I wrote about "X4500 + Solaris ZFS + iSCSI = Perfect Video Editing Storage". And thanks to you, my readers, it became one of my most popular blog entries. Then I wrote about "VirtualBox and ZFS: The Perfect Team", which turned out to be another very popular blog article. Well, I'm glad to introduce you to another perfect team now: Solaris ZFS and Mac OS X Time Machine. Actually, it began a long time ago: In December '06, Ben Rockwood wrote about the beauty of ZFS and iSCSI integration, and immediatley I thought "That's the perfect solution to back up my Mac OS X PowerBook!" No more strings attached, just back up over WLAN to a really good storage device that lives on Solaris ZFS, while still using the Mac OS X native file system peculiarities. But Apple didn't have an iSCSI initiator yet (they still don't have one now) and the only free iSCSI initiator I could find was buggy, unstable and didn't like Solaris targets at all. Then, Apple announced their Time Machine technology. Many people thought that this was related to them supporting ZFS and in fact, it's easy to believe that Time Machine's travels back in time are supported by ZFS snapshots. But they aren't. In reality, it's just a clever use of hardlinks. And not a very efficient one, too: Whenever a file changes, the whole file gets backed up again, even if you just changed a little bit of it. Last week, a colleague of mine told me that Studio Networks Solutions had updated their globalSAN iSCSI Initiator software for Mac OS X and that it now works well with Solaris iSCSI targets. I decided to give it another try. So, here are two ZFS ZVOLs sitting on my OpenSolaris 2008.05 home server: Sun Microsystems Inc. SunOS 5.11 snv_86 January 2008 -bash-3.2$ zfs list -rt volume NAME USED AVAIL REFER MOUNTPOINT santiago/volumes/aperturevault 6.50G 631G 6.50G - santiago/volumes/mbptm 193G 631G 193G - -bash-3.2$ They have both been shared as iSCSI targets through a single -bash-3.2$ zfs get shareiscsi santiago/volumes NAME PROPERTY VALUE SOURCE santiago/volumes shareiscsi on local -bash-3.2$ zfs get shareiscsi santiago/volumes/aperturevault NAME PROPERTY VALUE SOURCE santiago/volumes/aperturevault shareiscsi on inherited from santiago/volumes -bash-3.2$ zfs get shareiscsi santiago/volumes/mbptm NAME PROPERTY VALUE SOURCE santiago/volumes/mbptm shareiscsi on inherited from santiago/volumes -bash-3.2$ On the Mac side, they show up in the globalSAN GUI just nicely:
And Disk Utility can format them perfectly as if they were real disks:
Time Machine happily accepted one of the iSCSI disks and synced more than 190GB to it just fine and as I type these lines, Aperture is busy syncing more than 40GB of photos to the other iSCSI disk (it wouldn't accept a network share). Sometimes, they're busy working simultaneously :). Of course, iSCSI performance heavily depends on network performance, so for larger transfers, a cable connection is mandatory. But the occasional Time Machine or Aperture sync in the background runs just fine over WLAN. So finally, Solaris and Mac fans can have a Time Machine based on ZFS, with real data integrity, redundancy, robustness, two different ways of travelling through time (ZVOLs can be snapshotted just like regular ZFS file systems) and much more. Many thanks to Christiano for letting me know and to the guys at Studio Network Solutions for making this possible. And of course to the ZFS team for a wonderful piece of open storage software!
"ZFS and Mac OS X Time Machine: The Perfect Team" has been brought to you by Constantin's Blooog.
This entry was created on 2008-06-26 14:40:55.0 PST and is associated with the following tags:
backup
globalsan
iscsi
mac
machine
os
storage
time
x
zfs
OpenSolaris Home Server: ZFS and USB Disks
This is the first in a small series of articles about using OpenSolaris for home server use. I did a similar series some time ago and got a lot of good and encouraging feedback, so this is an update, or a remake, or home server 2.0, if you will. I'm not much of a PC builder, but Simon has posted his experience with selecting hardware for his home server. I'm sure you'll find good tips there. In my case, I'm still using my trusty old Sun Java W1100z workstation, running in my basement. And for storing data, I like to use USB disks. USB disk advantages This is the moment where people start giving me that "Yeah, right" or "Are you serious?" looks. But USB disk storage has some cool advantages:
ZFS and USB: A Great Team But this is not enough. The beauty of USB disk storage lies in its combination with ZFS. When adding some ZFS magic to the above, you also get:
Together, USB disks and ZFS make a great team. Not enterprise class, but certainly an interesting option for a home server. ZFS & USB Tips & TricksSo here's a list of tips, tricks and hints you may want to consider when daring to use USB disks with OpenSolaris as a home server:
So, USB disks aren't bad. In fact, thanks to ZFS, USB disks can be very useful building blocks for your own little cost-effective but reliable and integrity-checked data center. Let me know what experiences you made while using USB storage at home, or with ZFS and what tips and tricks you have found to work well for you. Just enter a comment below or send me email!
"OpenSolaris Home Server: ZFS and USB Disks" has been brought to you by Constantin's Blooog.
This entry was created on 2008-05-27 13:40:54.0 PST and is associated with the following tags:
disks
howto
opensolaris
server
solaris
usb
zfs
HELDENFunk Podcast featured in "Blick über den Tellerrand"Our HELDENFunk podcast, part of the german Systemhelden.com sysadmin portal (If you don't understand German, you may prefer systemheroes.co.uk) has been featured in episode #166 of Alex Wunschel's "Blick über den Tellerrand". Watch out after minute 21:50.
The hot topic discussed in this and the preceding episodes is about Germany's public broadcasting agencies. On one hand, they get money from everybody who owns a radio, TV or a computer (read: Everyone, like a tax) and they're supposed to use it to create high-quality programming. On the other hand, the current draft of their "Rundfunkstaatsvertrag" (broadcasting state contract) forbids them to use more than 5% of the budget for online media. Their stance in this dilemma is published in the form of a controversial documentary called "Quoten, Klicks und Kohle" which can be loosely translated to "Vieweing Figures, Clicks and Dough". You and I, but not enough people apparently, know that all media is significantly moving towards online ways of distribution. In fact, according to a study made by Bonn University and IBM, classic TV is losing importance, in particular among the younger generations and may become less siginificant than online media quite soon. As part of this discussion, Alex is receiving quite a lot of feedback via email, phone and as MP3 files, which is where the HELDENFunk podcast is being mentioned in the current episode. But who is this "Kontainer Kalle" guy?
"HELDENFunk Podcast featured in "Blick über den Tellerrand"" has been brought to you by Constantin's Blooog.
This entry was created on 2008-05-26 01:49:23.0 PST and is associated with the following tags:
germany
heldenfunk
podcast
podcasting
podpimp
systemhelden
systemhelden.com
tellerrand
Geek Marketing
Steve Rubel is a PR expert and author of one of the most read blogs called "Micropersuasion". In one of his articles, published through his employer Edelman Digital, he lists nine digital trends for the future. One of the trends that caught my attention is "Geek Marketing". In a blog post, he further explains the concept: Technology is moving so fast, that marketing divisions are increasingly hiring geeks to help them understand developments in IT better. A geek marketer therefore is a link between technology and marketing people. Cool. That's what I've been doing over the last year or so. I just didn't know there was a name for it! At Sun, we have a lot of geeks (they're mostly called "SEs" or "System Engineers") and we don't have much marketing (we'd rather spend the money on creating cool technology such as ZFS, UltraSPARC T2 or project Blackbox to name a few). But those few marketers we have, are really at the edge of the digital age. Starting from our long history of employee blogs, through our presence on Second Life to the Systemhelden.com portal (with the HELDENFunk podcast) - Our marketing people know what's hot and cool in the digital world, and how to engage the Sun geek communities to help them make cool stuff happen. This fits very well with the book I'm currently reading: Dan Pink "A Whole New Mind". In this book, Pink argues that the virtues of the left half of the brain (typically associated with logical thinking) are not enough for today's global and networked world, in which left-brain work is increasingly outsourced to Asia and other emerging countries. In other words: If you want to keep your job, you better start thinking about your right half of your brain. Right-brain work is quite interesting. Pink introduces six new aptitudes: Design, Story, Symphony, Empathy, Play, Meaning are senses that complement the Information Age worker's logical skills and help him be successful in the new "Conceptual Age". So, without knowing, by participating in all this video, podcasting, blogging and Web 2.0 stuff, studying better ways of doing presentations and gaming on a Wii, DS or a Playstation, we're actually training the right half of our brains. Who knew work could actually be that much fun? Edit: Added a link to the actual Tellerrand episode. Bummer! P.S.: The photo shows me in front of a lot of technology. I find this quite fitting the geek theme. The technology is actually a nuclear fusion reactor in Garching. Yes, the kind of stuff you see in superhero movies right before someone gets a new superpower. Didn't seem to work on me, though.
"Geek Marketing" has been brought to you by Constantin's Blooog.
This entry was created on 2008-05-20 14:10:28.0 PST and is associated with the following tags:
geek
marketing
podcasting
web2.0
Detlef Drewanz on Virtualization in the POFACS Podcast
POFACS, the podcast for alternative computer systems is a german podcast that coveres everything non-mainstream in computing. From people running their business on a Commodore 64 to the state of the art Amiga OS to office packages that fit on a floppy disk or one of the many Linux variants. There have been a few episodes covering Solaris related technologies, such as ZFS and Project Indiana. Today adds an interview with my colleague Detlef from Berlin about virtualization. Actually, whenever I listen to one of the POFACS episodes about some crazy new operating system that's being developed somewhere, I've always liked to try it out and see how it is. The perfect way to do that of course is to use virtualization, so you don't have to re-install your machine again. Well, that's where Sun's VirtualBox comes in: It comes with a great range of supported operating systems so there's a good chance it will run even the strangest alternative OS just fine. But now, let me download Detlef's interview myself and listen to is. Enjoy!
"Detlef Drewanz on Virtualization in the POFACS Podcast" has been brought to you by Constantin's Blooog.
This entry was created on 2008-05-16 07:52:28.0 PST and is associated with the following tags:
german
podcast
pofacs
solaris
virtualization
Favourite Free Fun Geek Cartoons to Cheer you up!World economy bad? Financial results lower than expected? Stock price down the toilet? Or just bad weather? No need to worry, last time I checked, after rain, always came the Sun, and it was stronger than ever! Meanwhile, let me cheer you up with some favourite geek cartoons of mine: User Friendly
XKCD |
|