Archive for the ‘linux’ Category

a dirty new filesystem I like the name of: NILFS

Wednesday, June 3rd, 2009

sounds dirty, don’t it? here’s how dirty:

One of the most noticeable features of NILFS is that it can “continuously and automatically save instantaneous states of the file system without interrupting service”. NILFS refers to these as checkpoints. In contrast, other file systems such as ZFS, can provide snapshots but they have to suspend operation to perform the snapshot operation. NILFS doesn’t have to do this. The snapshots (checkpoints) are part of the file system design itself.

One of the really cool features of NILFS is that these checkpoints can actually be mounted along side the primary file system. This has many, many uses, one of which is to mount a checkpoint to recover files that were unintentionally erased.

In addition to being able to recover recently erased files and extremely fast crash recovery times, there are a number of other features of NILFS that are very attractive:

* The file size and inode numbers are stored as 64-bit fields

* File sizes of up to 8 EiB (Exbibyte - approximately an Exabyte)

* Block sizes that are smaller than a page size (i.e. 1KB-2KB). This can potentially make NILFS much faster for small files than other file systems.

* File and inode blocks use a B-tree (the use of B-trees in a log-structured file system stems from the implementation which use something called segments)

* NILFS uses 32-bit checksums (CRC32) on data and metadata for integrity assurance

* Correctly ordered data and meta-data writes

* Redundant superblock

* Read-ahead for meta data files as well as data files (helps read performance)

* Continuous check pointing which can be used for snapshots. These can be used for backups or they can even be used for recovering files.

1st music post - Dethroned

Monday, February 9th, 2009

Oldies: Dethroned, from the album, The Freak

Dethroned, the subject of my first post, is a song I wrote when I think I was 19. The lyrics were based on a poem I had written in high school, about a scenario wherein the position of “God” is filled by humans, and is something sought after until it is attained, at which point it loses its luster, the person falls from grace, and is thrown into a sea of fire with the rest of the previous applicants.

I recorded this song, I believe, with two different bands (could have been more, but alot of my studio dat tapes broke with age). Here is the first incarnation:

Dethroned, Version 1

This was recorded in, I believe, 1996 at Star Dog Studios, by the guitarist for a band that did lounge-style covers of songs like Smells Like Teen Spirit - the Austin Lounge Lizards. He was a pretty good producer, and the product would have turned out much better if we had had any money. But we didn’t, so we recorded the entire album live. That’s right, live. Which explains the mistakes everywhere and the extremely rushed feeling. Plus, you can only mix with the sounds you record, and, as such, this sounds pretty bad. But my backing band was sure well practiced.  Tim Trentham on guitar, Ted Vanscoy on bass, me on guitar and vocals.

and, the final version:

Dethroned, Version 2

Here, we were produced by the marvelous Lars Goransson in 1997, whom I continue to have the pleasure to record with to this day. As you can see, this is a much more professional sounding track. We had more money (bankrolled by the wonderful Tom Palmer on guitar), and thus more time. I added a backing track of piano to the mix, and generally, this is my favorite song off the album.

The music was recorded one day, with extra tracks recorded the next, including a good 6 hours for vocal tracks.  Lars was a very good producer, and pushed me to my limit on this recording (my limits weren’t all that hot a the time, but I did reach them, nonetheless).  Phil Hampsten on drums, Ted Vanscoy on bass, Tom Palmer on lead guitar, me on vocals, keys and guitar.

how to clean up a script file

Wednesday, January 21st, 2009

if you use linux or any *nix for that matter, and you use the program ’script’ to save everything you do at the console for later viewing, you might want to remove those crazy ^M ^G and ^H characters from your file so that you can actually read it.

before:

Script started on Tue Jan 20 16:40:26 2009
^[]0;root@lindt75:~^G[root@lindt75 ~]# drbd^Gadm create-md res^H ^H^H ^H^H ^H/dec^H ^Hv/xv^G^M
xvc0 xvda1 xvda2 xvda3 ^M
[root@lindt75 ~]# drbdadm create-md /dev/xvd^Ga3^M
‘/dev/xvda3′ not defined in your config.^M
^[]0;root@lindt75:~^G[root@lindt75 ~]# cat /etc/drbd.conf ^M
#^M
# please have a a look at the example configuration file in^M
# /usr/share/doc/drbd82/drbd.conf^M
#^M

then the command:

tr -d '\015\010\007' < data.file > new.data.file

and now, after:

Script started on Tue Jan 20 16:40:26 2009
root@lindt75:~[root@lindt75 ~]# drbdadm create-md res /dec v/xv
xvc0 xvda1 xvda2 xvda3
[root@lindt75 ~]# drbdadm create-md /dev/xvda3
‘/dev/xvda3′ not defined in your config.
root@lindt75:~[root@lindt75 ~]# cat /etc/drbd.conf
#
# please have a a look at the example configuration file in
# /usr/share/doc/drbd82/drbd.conf
#

Linux!

Monday, December 22nd, 2008