Vivek Joshi's Weblog

Thursday Feb 26, 2009

Open Source Mela @IEC

I have been bit lazy in jotting down my thoughts on this charter. Today in IEC, Blogging contest was launched as part of "IEC Open Source Mela" event. I believe that'll act as a catalyst for more blog writeup :-)

BTW, "mela" means festival and during this event, different teams at IEC will be showcasing the open source projects they are involved/interested in. Last year, I talked about CIFS. I think this year we can give an effective demo by showcasing Solaris NAS features like CIFS server and client, NDMP, ZFS, NFS v4 ACL, iSCSI etc. Virtual Box will be helpful in setting up everything on one box. More details follow.

As part of first entry, I would like to provide a link for Open Storage summit videos that's  here(Courtesy : http://www.cuddletech.com/blog/ )

Tuesday Nov 25, 2008

Making NAS out of Solaris (Part 2)



[Read More]

Monday Mar 10, 2008

Making NAS out of Solaris (Part 1)

It's quite simple to create a NAS box from Open Solaris (Build 79+) ...

I tried following test on my laptop where I have a few GBs available i.e. no partition on it. I created a Solaris2 partition on it using 'fdisk' ... It was marked at partition 4 (p4). I run following commands to create CIFS share,

(a) Create a zpool
bash-3.2# zpool create tank /dev/dsk/c2t0d0p4
bash-3.2# zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
tank 2.28G 111K 2.28G 0% ONLINE -

(b) Create zfs shares ...
bash-3.2# zfs create tank/music
bash-3.2# zfs create tank/movies
bash-3.2# zfs create tank/pics
bash-3.2# zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
tank 2.28G 220K 2.28G 0% ONLINE -
bash-3.2# zfs list
NAME USED AVAIL REFER MOUNTPOINT
tank 184K 2.25G 22K /tank
tank/movies 18K 2.25G 18K /tank/movies
tank/music 18K 2.25G 18K /tank/music
tank/pics 18K 2.25G 18K /tank/pics

(c) Create CIFS shares ...
bash-3.2# sharemgr create -P smb vbj
bash-3.2# sharemgr add-share -r music-for-win -s /tank/music vbj
bash-3.2# sharemgr show vbj
vbj
/tank/music
bash-3.2#

From Windows, you can connect to \\Solaris-host\music-for-win ...

But what to do next? Create a mapping policy before you connect from Windows box. That'll be in next blog entry. Look at idmap (1M) manual page for details about the mapping.

Monday Dec 17, 2007

Couple of pointers including DTrace/NAS OS

(a) While working on some NDMP issue, I found following SCSI analyzer written using D script (DTrace) ...
http://blogs.sun.com/chrisg/resource/scsi_d/scsi.d-1.12

BTW, DTrace documentation is available on Wiki as well,
http://wikis.sun.com/display/DTrace/Documentation

(b) Recently, I am also looking into OpenSolaris Distro Constructor .

Saturday Nov 03, 2007

CIFS integration in Solaris

Recently CIFS support was integrated into Solaris. Great work! No doubt it's a huge task. Read more about the same at http://blogs.sun.com/amw/entry/cifs_in_solaris .

I'll be quite regular now in updating my blog. As promised in my earlier blogs, I'll start writing about NAS, its components and references ...

Here's a good pointer to start with,
http://snia.org/education/tutorials

Friday Jul 13, 2007

No cost resources

There are lots of resources available on OpenSolaris at
http://opensolaris.org/os/community/edu/nocost_resources

Regarding NAS, I'll keep on updating on following topics,
- Volumes, RAID, Backend storage
- iSCSI
- NFS/CIFS

and more.

Thursday May 10, 2007

Network Attached Storage (NAS)

I have joined the NAS group in Sun recently. To be specific, I am in NAS sustaining for StorageTek 5000 NAS OS. The setup time for these NAS boxes are just 15 minutes and you are all set for the file sharing. There are cool features with the NAS OS including,
- 64 bit journaling file system
- NFS/CIFS support
- iSCSI support
- WebAdmin GUI
- RAID support
- File Replication (Mirroring)
- Clustering (for high avaiability)
and much more ... These are really cool for customer's file sharing needs.

In next update, I'll brief about the iSCSI setup on a Solaris 10 server (initiator) with a SCSI device (target) on NAS box that I configured a few days back.

Tuesday Jan 09, 2007

Who sent me the signal ?

I was going through certain DTrace exercises and found one which displays some interesting things. It displays the signal sender. I have experimented this with three terminals windows as followings,

--------------------xxxxxxxxxx--------------------
Window 1 :
[solaris-devx] / > ps
PID TTY TIME CMD
1887 pts/4 0:00 bash
1872 pts/4 0:00 sh
1896 pts/4 0:00 ps
[solaris-devx] / > kill -9 1892
[solaris-devx] / >

Window 2 :
[solaris-devx] / > ps
PID TTY TIME CMD
1892 pts/5 0:00 bash
1891 pts/5 0:00 sh
1893 pts/5 0:00 ps
[solaris-devx] / > Killed
#

Window 3:
#./sig.d
1892 9 1887 bash
--------------------xxxxxxxxxx--------------------

Let us examine what's going on ... I have two terminal windows open, both run sh and then, bash. From one of the terminal (from bash:process 1887), I kill another bash process 1892. And, it's captured by dtrace script sig.d thats running in some another terminal window.

Look at this output from sig.d script,
1892 9 1887 bash

It means 1892 was killed as it was sent a kill signal (9) by process 1887 which is a process bash. Here's the sig.d script,

[solaris-devx] dtrace > cat sig.d
#!/usr/sbin/dtrace -qs
syscall::kill:entry
{
trace(arg0);
printf("\t");
trace(arg1);
printf("\t");
trace(pid);
printf("\t");
trace(execname);
printf("\n");
}

Here, argument 0 and 1 are related to process that was killed whereas pid and execname are related to process that sent the signal.

It reminds me one older issue where 'ksh' used to dump core because of sigbus at certain time .... I tried to figure out the reason but didn't find any obvious thing in 'ksh' source code. I also wrote a C program to capture the sender ... Later, it came out as linker issue but it was very hard to debug.

DTrace provides such probes without affecting the performance ! I'll update more as I learn more interesting things about DTrace. I'd like to write a couple of blogs regarding Solaris IPC in upcoming entries.

Thursday Nov 23, 2006

Solaris Partitions (contd..)

During the exercise, I have come up with some of the utilities/features thath we can implement in Solaris indenpendently or as part of fdisk/format.

(a) Display all the parts with their part type
(b) Ability to create a new partition
(c) Ability to change the partition type
(d) Store backup of the vtoc of part entires in some file
(e) Print the vtoc ... check whether it's sane?
(f) Recover manager : In case of lost vtoc entries, the utility should be able to recover ufs parts

Thursday Nov 09, 2006

Solaris partitions issues (contd)

I did a little investigation about ufs layout. The file system is made of :-
- Boot block
- Super block
- Inode table
- Data blocks 

Super block contains info about the file system state, size of fs, number of free inode, magic number (0x11954 for ufs) etc. This is very important information and replicated across the cylinder groups. It's interesting to note that this magic number is at offset of 0x55c (in decimal 1372). We can think of rebuilding our lost vtoc based on this information. We can 'dd' on some starting blocks on a cylinder and then  start searching for a valid SB (as mentioned in identify_ufs). But the main question is, from where or which offset  we should check against the super block.

My vtoc entries are lost for that partiion. So, I am not sure how different slices were alligned ? All I know from fdisk are the start & end cylinder numbers for that partition.

 I'll continue investigating this in my spare time.

Monday Oct 30, 2006

Soalris partition issues

I have blown up Solaris partition on my laptop by mistake. I had
Solaris 10, Belenix, Mepis and Windows XP on my laptop. By mistake,
Solaris partition was deleted. When I tried to recover it with 'parted'
in Mepis, it searched a partiion of very small size and named it Linux
swap / Solaris poartition. It was never recovered. I tried to hack mbr
and partition tables with the help from Moinak, Pavan and Shesha but we
couldn't do much as all vtoc entries from deleted partitions were gone.

I googled and found a couple of software for Windows that can recover
the Solaris partitions. I could see Solaris partitions but that wasn't
of much use ... I didn't see much files to be recoverd. It was a hard
but good learning session about mbr and partition tables with multiple
Oses.

Monday Aug 14, 2006

Posting this from BeleniX

I have installed BeleniX as I written in my previous blog entry. I configured dataone service on BeleniX today. I am posting this blog entry from BeleniX :-)

Tuesday Aug 08, 2006

Multiple Solris on different 'partitions'

I had installed Solaris 10_74 on my laptop. I already had SuSE linux and WinXp on that. But I was missing the latest Solaris revision. I removed the linux partiion and installed BeleniX.
Ofcourse, I had to change the Solaris 10_74 partition id to 'unknown' sothat BeleniX doesn't find multiple Solaris partitions. So far so good. But I couldn't do a chainload from BeleniX to Solaris 10 and vice versa. I couldn't boot from either of the Solaris.
My colleagues Moinak Ghosh and Pavan Chandrashekar helped me to come out from this catch. Moinak built a new grub binary which he'll talk in his blog. Pavan helped in revocering boot blocks and issues related to pboot/mboot, disks and partitions. Thanks to the duo.

Now, I have WinXp, Solaris 10_74, BeleniX. I am also planning to configure Solaris 9 or linux (as I still have one partition free :-))

Wednesday Jun 14, 2006

WineLib build instructions

Instructions for WineLib build

[Read More]

Sunday May 28, 2006

WineLib on Solaris (x86 and sparc)

I built WineLib on Solaris (both x86 and sparc platforms) last week. Most of the build issues on x86 were resolved by patchkit available at blastwave.org .

There were certain issues specific to sparc platform related to opengl and assembler which were resolved later after searching Wine Headquarters and a9/google. I was able to run simple apps like notepad and wordpad.

I'll jot down the build steps needed for both x86 and sparc.

Wednesday May 17, 2006

opensolaris handouts for RVCE tech fest



opensolaris handouts are here that we have designed for RV College of Engg techfest. The handouts contain brief information about Solaris 10 features, Solaris utilities, opensolaris distributions and bosug user group. It contains cheatsheet as well.

opensolaris handouts for RVCE tech fest

opensolaris handouts are here that we have designed for RV College of Engg techfest. The handouts contain brief information about Solaris 10 features, Solaris utilities, opensolaris distributions and bosug user group.

Thursday Feb 09, 2006

Simple echo puzzle


I wasn't aware of echo magic until I was stuck in one of the script ...

#test="Hello     World"
#echo $test
Hello World

echo has removed extra white spaces above ... I get the desired output as follows :-)

#echo "$test"
Hello     World

Tuesday Aug 09, 2005

Cool link

http://jayadevkumbar.blogspot.com/

Tuesday May 24, 2005

My first posting ...

Hi, It's Vivek Joshi from IEC. I work for Sun Cluster sustaining team. My hobbies include watching movies, listening to oldies, playing caroms. I have an external blogs at, http://www.livejournal.com/~vivekjoshi

Calendar

Feeds

Search

Links

Navigation

Referrers