Wednesday, January 26, 2011

softraid on OpenBSD 4.9

Scenario: 1 Operating system hard drive and 2 hard drives to be configured as a RAID 1 mirror

checking the dmesg and /etc/fstab, wd0 is the boot drive and wd1 + wd2 are supposed to be the mirror drives

Below is slightly modified content of manpage of softraid

            # fdisk -iy wd1
            # fdisk -iy wd2

Now create RAID partitions on all disks:
            # printf "a\n\n\n\nRAID\nw\nq\n\n" | disklabel -E wd1
            # printf "a\n\n\n\nRAID\nw\nq\n\n" | disklabel -E wd2


Assemble the RAID volume:

            # bioctl -c 1 -l /dev/wd1a,/dev/wd2a softraid0

It is good practice to wipe the front of the disk before using it:

            # dd if=/dev/zero of=/dev/rsd0c bs=1m count=1

Initialize the partition table and create a filesystem on the new RAID volume:

           # fdisk -iy sd0
           # printf "a\n\n\n\n4.2BSD\nw\nq\n\n" | disklabel -E sd0
           # newfs /dev/rsd0a
------------------------------------------------------------------------------------------------------
Now the next part is missing from manpage, but its trivial.

           # mkdir /datamirror
           # mount /dev/sd0a /datamirror (OR mount -t ffs /dev/sd0a /datamirror)
           # chown  normal_openbsd_user /datamirror

if the mount works, then add the following line to the very end of /etc/fstab to make it work everytime after normal boot.

/dev/sd0a /datamirror ffs rw,softdep,nodev,nosuid 1 2

Thursday, September 16, 2010

gmirror on FreeBSD

gmirror label -v -b split -s 2048 data ad4 ad8

gmirror load

newfs /dev/mirror/data
--------------------------------------------------------------
Insert in /etc/fstab

/dev/mirror/data       /data       ufs            rw            2             2

--------------------------------------
on next boot, go into single user mode and transform /data to use softupdates.

My mirror got disturbed by Windows writing something on one drive.

gmirror remove  ad4

gmirror rebuild

after gmirror status says 100%, then reboot for a pristine restore.

Flash on FreeBSD

Just installed Gnash 0.8.8 on a FreeBSD 8.1 machine.

Configured with options --enable-gui=gtk --enable-media=ffmpeg

copy the .so file into ~/.mozilla/plugins for all users.

This allows you to watch flash content almost anywhere. For youtube, you have to block cookies.

Thursday, July 29, 2010

COMPUTING: Extremely low power x86 workstation

I am searching for a sub-50 Watt machine.

Must haves:

1) 8GB RAM, expandability is desired
2) 3 hard drives (1 boot + a mirror with software RAID 1)
3) Any power sipping x64 CPU (64 bits a must)
4) 256MB-1GB external GPU supporting dual LCDs (ATI preferred)

The CPU + motherboard + hard drives consumption should be less than 50 Watts. I love Atoms but I want more than 4GB memory. Budget is $500-800. Any Core 2 Duo, Core i5/i7, Phenom etc can go down to this level?

This machine has to be coming within 50 Watts period, the lower the better.

Thursday, July 22, 2010

ECONOMY: Derivatives gone crazy

NSE India has released a press circular (warning: PDF link) of disseminating VIX.

Nifty is a derivative of the 50 most capitalized companies in India.
VIX is a derivative of Nifty, volatility as measured by puts/calls ratio on Nifty.

And now you would have Futures & Options on VIX.

Welcome to bizarroland.

Derivatives on derivatives on derivatives.

Somebody should stop this nonsense.

Note that the Nifty components can be changed when companies under-perform to maintain the valuation.

Saturday, May 09, 2009

COMPUTING: Server market alignment

Sun Microsystems has a innovative product called SunRay. It runs remotely at our home over DSL/Cable and has no saved states, all the computing is done on a server. It is now history due to the proliferation of cheap power saving devices like 'nettops', which cost roughly the same and whose functionality is much higher.

The server market will see an attack by nettops at the low end. Intel Atom is leading the way, but ARM is not far behind. I predict the days of 90W CPU's is slowly coming to an end. ARM CPU's will gain cores and speed, but keep the power advantage. If AMD and Intel don't watch out they will be broadsided...

Tuesday, July 22, 2008

FINANCE: The coming realingment in America

It has now been acknowledged by all and sundry that the coming financial crisis is huge and may rival the Great Depression of 1929-1932. The current US economy defined as GDP will probably take a hair cut of 50% and the world economy as a result can possibly halve from today till 2020. But this is a time when thrift and real old fashioned puritan American way of life will make a comeback in America and the rest of the world.

Here are my industrial predictions

1) Transportation as in railways and bicycles will benefit, cars are on the way out. Clean Mass transport is in. Oh, I would love to see the city of Pune, India explode with bicycles again.
2) Inner city malls will benefit. If you have a lease or own property in downtowns across the world, you will benefit. If you are outside the suburbs totally dependant on your cars, you are toast.
3) Skilled workers will be in demand. Yes, gardeners, metal workers, furniture workers, high rise specialty construction workers get ready for $15-40 per hour nirvana for a few decades at least.
4) Just in time is going to be proved to be a bunch of crock. Not when commodity supply to assemble it remotely is totally uncertain, and there is real risk of transport continuity.
5) Factories in America are going to enjoy a renaissance. Industrialists, if you are reading this, snap any old factories near ports and rail access points.
6) Speaking of ports, the rails and ports will enjoy a meteoric rise. I feel pity for Mack trucks and International and Volvo and other 18 wheeler manufacturers. Yeah, those rail stocks and port operations are going to rise.
7) Wind sails are going to make a massive comeback. The old time naval knowledge locked in the formerly great naval nations e.g. England, France, Netherlands, Spain, Portugal will be useful. Rig the mainmasts mates.
8) Solar is in, wind mills are in.
9) Best of all, consumerism is out, because you just can't get those metals cheaply anymore. No "new every two" free cellphones with two year contract.
10) I do not see a return to work animals, rather I see bicycle highways and bicycle driven local transport. Hey, you transport companies, do some M&A of the bicycle companies. It won't hurt to have a bicycle manufacturer in your group. Yes, Tata Motors, I am talking about you.

Long term short opportunities
1) Fertilizer companies are dead
2) Genetically modified food companies are toast
3) Plastics derived from oil
4) Pretty much every oil derived industry
5) Hydro-electric power companies (water needed for drinking and agriculture)
6) Meat related companies (meat packing, processing etc). Meat is out, veggie is in.

College graduates with non-marketable degrees, you know who you are, I feel pity for you guys. But no pity for the MBA's, if you guys didn't save any money, you will have to really learn to work.

Tuesday, March 27, 2007

CLIMATE: response to climate change

Atanu Dey has posted a few skeptical comments on Nitin Pai's blog about global warming. The choice bits is excerpted here

Almost nothing is known about the great heat engine of the upper atmosphere which sheds heat into space and which is affected by incoming cosmic radiation. All the discussion concentrates on the heat-blanketing effect of the lower atmosphere. Also, while the discussion is centred on the melting of Arctic sea-ice (and some Greenland glaciers), and also the melting sea-ice of the western Antarctic peninsula, the increasing amount of snow and ice of the eastern Antarctic is hardly ever mentioned. Equally ignored is the recent world-wide ocean survey by the US National Oceanic and Atmospheric Administration’s Pacific Marine Environmental Laboratory which shows that ocean remperatures have been cooling steeply in the last few years. The oceans contain far more heat than the atmosphere and it can only be a matter of time before the atmosphere starts cooling, too, if the ocean temperatures decline continues as they do now.

Ummm, here is another example of selective quotation.

True, there have been reports of cooling in Antarctica in journals. But this is logical.

Simply speaking, climate systems (a coupled atmosphere-ocean) are arranged in wide cells geographically over the world ('cells' for lack of a better word for laymen). Picture a globe and draw arbitrary cells from Arctic to Antarctic. These cells are irregular, and generally have similar climate. A cell would be an example of the Thar desert in India/Pakistan. Taklamakan in China. Deccan rain forest in India etc...

Whatever happens in one cell pushes out to another cell. So if you get something hotter in Arctic, the global climate system 'tries' to get something else cooler, so the cooling in certain cells. Why not the cooling in immediate cells right now? Adjacent cells will be affected, give it time. My guess is that cells which comprise mostly of countryside (where we grow our crops) will be affected. Why? Less daily temperature variation in rural areas. Also, temperature is not precise, because it is measured in a grid. A sample taken in a 5 km by 5 km grid is interpolated to cover all of it. When we know that a reading of 30C in a city block will change to 33C in a different city block, hardly 100 meters away. If you really want to confirm, ask farmers what changes they have had. Ask two farmers in different 'farmland' cell separated by a city cell. Seasons are changing slightly, either advancing or retarding by a few days/weeks. Best example is of our Monsoon.

Ok, why the cooling so far away in Antarctica? Why in southern hemisphere? Because the southern hemisphere is mostly water. My guess is any 'resultant natural cooling' will be compensated via water, because water can store heat better. Remember the rich get richer, the poor poorer? Western Siberia will accelerate melting, maybe Eastern Siberia will compensate. Adjacent eastern countries (to Vladivostok) like Korea, Japan may get colder. NZ, Tasmania, Southern Australia may get either hotter or cooler because of their proximity to Antarctica...

If compensatory cooling does not occur, we would be in a positive feedback loop, and completely go crazy. I hope this argument is put to rest for you guys.

Regarding NOAA PMEL's ocean cooling paper, actually by Lyman et al (2006)

It is only upper ocean cooling, less than 1000 m depth. The average depth of world's oceans is 3500-3800 m. The major volume is not upper ocean, but deep ocean. Sure the cooling occurs at 400 m and is strong at 750 m. But the deep water takes a while to cool.

There are problems of inadequate sampling intervals and sample grid size. I think that the average upper ocean would probably cool over the globe, because of the additional input of melt water. Snow which doesn't float but is sitting on a continental plate adds additional water, picture a hot cup of tea, add more water, what happens?

But if you read the paper 'Recent Cooling of the Upper Ocean' by Lyman et al. (2006) the globally averaged sea level is still rising. Logically speaking, you will have these regional anomalies.

Monday, March 26, 2007

SOLARIS: ZFS not ready for production yet

I was evaluating ZFS for possible use, just doing some testing. But I have seen too many posts on opensolaris-discuss which lead me to believe that Sun rushed ZFS far too quickly into production, with Solaris 10. IMO, Sun should have advised customers to refrain from using ZFS in production until Solaris 10 update 5. Right now, ZFS is probably in the final beta stage, as of the 11/06 release. By the middle of 2007, it would be in a RC1 stage, with update 4. I expect that by the end of 2007, with update 5 it should be in a RC3 stage. Middle of 2008 is when it will be prudent to move to production with Solaris 11 or Solaris 10 update 6. I didn't expect such Microsoft like behavior from Sun. (This release timeline reflects my opinion on ZFS only)

It is still good for many purposes, just not i-trust-zfs-with-my-life production. It is horrible to have a customer find out corner case bugs, and find out that their file system is not performing as advertised. This is costing you precious goodwill Sun!

It is especially worse in a NFS scenario (though the worst of it will be fixed in update 4). Just do your own due diligence before anything. Follow these threads for my reasoning, just in the last 2-3 months. There have been many serious bugs, which I have read in the past 3 months.

1) FAULTED ZFS volume even though it is mirrored

2) Why number of NFS threads jumps to the max value?

3) Re: ZFS performance with Oracle

4) Large ZFS-bug...

5) ZFS in a SAN environment

6) ZFS over NFS extra slow?

Saturday, December 02, 2006

FOOTBALL: Rose bowl prediction: LSU vs USC

The Trojans were beaten by UCLA, dashing their national title hopes. I hope LSU goes into the Rose Bowl, to finally settle once and for all, who is the better team.