RAID Mayhem in Linux Mint 17.1 and Kubuntu 14

March 11th, 2015 No comments

I have a Quad-core machine that has 2+2 1TB disks configured in RAID 1+0 mode (mirror + stripe).  I am having a 64Gb SSD, on which I have the operating systems installed.  Recently, I wanted to install Linux Mint 17.1 on the SSD.  The installation went fine, but after rebooting the RAID device was not visible at all.  To overcome this problem, I had to do “dmraid -ay” to activate the RAID device in my machine.

Ok, now my RAID device is visible.  Went ahead to create /home and /data partitions, followed by updating the same in /etc/fstab for auto-mounting during boot-up.

To my surprise, the reboot failed saying /home is not ready.  Checked into recovery mode by punching in the root password and found that the RAID device has gone missing now.   Ran “dmraid -ay” again to activate the device; following by running “mount -a” make /home and /data partitions come alive.  Exited the recovery mode to complete the full booting.

Did some internet search for how to activate the RAID device on booting automatically.  It was awful that there are no direct methods to do so.   Infact, some people have advised about not rebooting the machine at all..  Funny!

Later, found a workaround, where the /etc/fstab entries were made “noauto”.  And RAID activation happening in /etc/rc.local.


dmraid -ay
mount /home
mount /data


/dev/mapper/pdc_cjcdcdeide6    /home ext4    defaults,noauto     0   2
/dev/mapper/pdc_cjcdcdeide5    /data ext4    defaults,noauto     0   2

Moral: Never install the Operating System on a RAID device, as majority of the distributions don’t recognize them by default.  Interestingly, Fedora 21 recognized RAID during installation itself, but I ended up hating it, when I found “yum update” not working out of the box.


February 15th, 2015 No comments

நா-னென்ற இவ் வாணவமே வேண்டாம்.
ஓ… ஊணு-யிர் என உலறல் வேண்டாம்.
நா..ன்.. வீழ்ந்து எழுகவே.. வேள்வி(யும்) வேண்டாம்.
கேள்விகள் எதுவும் கேட்க-வில்லை;
கேட்டேன் கழல்கள் கையருகே..

அறியாமல் செய்த தவறால்,
அகங்காரம் கொண்டு பிறந்தேன்.
அகம்பாவ மென்ற பிணியால்,
அவமான மென்று குணிந்தேன்.

எண்ணங்கள் நிறைந்திருந்தால்,
பிண்ணங்கள் நீங்கிடுமே..
பிண்ணங்கள் நீங்கிட-வே..
எண்ணங்கள் நிறையணுமே..

அறியாமல் செய்த தவறால்,
அகங்காரம் கொண்டு பிறந்தேன்.
அகம்பாவ மென்ற பிணியால்,
அவமான மென்று குணிந்தேன்.

உன் பாதங்கள் போற்றிடவே, படிதாண்டி வந்தேனே..
பாதங்கள் காணலியே, விழிமூடி நின்றேனே..

மனநாசம் மெய்யென்று உன்வாசம் அறிவேனே..
பலவேசம் கொண்டாலும் உன்பாதம் பிறியேனே..

என்னோடு நீ இருந்தால்!

காணும் காட்சிகள் மெய்யென்றால், கண்டவன் யானும் மெய்யன்றோ,
கனவினில் காட்சிகள் பொய்யென்றால், கண்டவன் கண்டதும் பொய்யன்றோ!!
கனவே வாழ்வின் பொருளாக, வாழ்ந்தவ ருணரரும் காலம்வரும்,
காலம் கனிந்து கூடிடவே, வாழ்ந்ததின் வாய்மை விளங்கிவிடும்..


December 11th, 2014 No comments

நற்றுணையாயின் நன் நட்பு,
நோக்கம் நெறிபட நிமிர்ந்து நிற்குமாமே!
நீறூற்றாயின் நின் அன்பு,
லோகம் பொடிபட விரைந்து வெல்லுமாமே!


December 11th, 2014 No comments

பிந்தியாவின் தமிழ் வீட்டுபாடத்திற்காக எழுதியது:

தாயின் அன்பு பாசமானது,
தந்தையின் அன்பு அறிவானது,
குருவின் அன்பு கல்வியானது,
தெய்வத்தின் அன்பு வாழ்வானது,
அன்பு நிறைந்த மனிதம் இறைவனாவது திண்ணமே!!

How to make Kate remember last opened files

October 22nd, 2014 No comments

Kate allows document editing to be grouped under separate sessions.  Although there is no direct configuration setting to make Kate auto-open last opened files during startup, the Sessions features come handy.  The workaround is; given that Kate remembers last opened file paths in the File -> Open Recent menu item, you may select files one by one to continue editing.  But, this is so boring.

The procedure is the following:

  1. Open all the files that you want to be remembered by Kate for reopening during next restart of Kate.
  2. Click on Sessions->Save Session As->[give a session name here to save the session]
  3. Close your Kate application.
  4. Open it again, you would see no files reopened automatically, Don’t Panic!
  5. Click on Sessions->Quick Open Session->[session name].
  6. Aha… all the files that you had put into the session will reappear.

Comprehensive Exam on Mathematics

September 22nd, 2014 No comments

It has been an adventure preparing for the mathematics comprehensive exam.  I had studied from Discrete Mathematics by Stanat & McAllister; Discrete Mathematics by Kenneth Rosen and Theory of Computation by Hopcroft & Ullman.

The solutions to the question paper of Aug 2014 is made available at

Tamilnadu State MLA EMAIL IDs

July 27th, 2014 No comments

Tamilnadu MLAs have individual email ids now !

1 Acharapakkam –
2 Alandur –
3 Alangudi –
4 Alangulam –
5 Ambasamudram —
6 Anaicut —
7 Andhiyur –
8 Andimadam —
9 Andipatti—
10 AnnaNagar—
11 Arakkonam —
12 Arantangi–
13 Aravakurichi —
14 Arcot —
15 Ariyalur –
16 Arni —
17 Aruppukottai —
18 Athoor—
19 Attur —
20 Avanashi —
21 Bargur —
22 Bhavani—
23 Bhavanisagar—
24 Bhuvanagiri—–
25 Bodinayakkanur—
26 Chengalpattu—–
27 Chengam—
28 Chepauk—
29 Cheranmahadevi—
30 Cheyyar—
31 Chidambaram—
32 Chinnasalem—
33 CoimbatoreEast—
34 CoimbatoreWest—
35 Colachel—
36 Coonoor—
37 Cuddalore—
38 Cumbum—
39 Dharapuram—
40 Dharmapuri—
41 Dindigul—
42 Edapadi—
43 Egmore—
44 Erode—
45 Gingee—
46 Gobichettipalayam—
47 Gudalur—
48 Gudiyatham—
49 Gummidipundi—
50 Harbour—–
51 Harur—
52 Hosur—
53 Ilayangudi—
54 Jayankondam—
55 Kadaladi—
56 Kadayanallur—
57 Kalasapakkam—
58 Kancheepuram—
59 Kandamangalam—
60 Kangayam—
61 Kanniyakumari—
62 Kapilamalai—
63 Karaikudi—
64 Karur—
65 Katpadi—
66 Kattumannarkoil—
67 Kaveripattinam—
68 Killiyoor—
69 Kinathukadavu—
70 Kolathur—
71 Kovilpatti—
72 Krishnagiri—
73 Krishnarayapuram—
74 Kulithalai—
75 Kumbakonam—
76 Kurinjipadi—
77 Kuttalam—
78 Lalgudi—
79 MaduraiCentral—
80 MaduraiEast—
81 MaduraiWest—
82 Maduranthakam—
83 Manamadurai—
84 Mangalore—
85 Mannargudi—
86 Marungapuri—–
87 Mayiladuturai—
88 Melmalaiyanur—
89 Melur—
90 Mettupalayam—
91 Mettur—
92 Modakkurichi—
93 Morappur—
94 Mudukulathur—
95 Mugaiyur—
96 Musiri—
97 Mylapore—
98 Nagapattinam—
99 Nagercoil—
100 Namakkal—
101 Nanguneri—
102 Nannilam—
103 Natham—–
104 Natrampalli—
105 Nellikkuppam—
106 Nilakottai—
107 Oddanchatram—
108 Omalur—
109 Orathanad—
110 Ottapidaram—
111 Padmanabhapuram—
112 Palacode—
113 Palani—
114 Palayamkottai—
115 Palladam—
116 Pallipattu—
117 Panamarathupatti—
118 Panruti—
119 Papanasam—
120 Paramakudi—
121 ParkTown—
122 Pattukkottai—
123 Pennagaram—–
124 Perambalur—
125 Perambur—
126 Peranamallur—
127 Peravurani—
128 Periyakulam—
129 Pernambut—
130 Perundurai—
131 Perur—
132 Pollachi—
133 Polur—
134 Pongalur—
135 Ponneri—
136 Poompuhar—
137 Poonamallee—
138 Pudukkottai—
139 Purasawalkam—
140 Radhapuram—
141 Rajapalayam—
142 Ramanathapuram—
143 Ranipet—
144 Rasipuram—
145 Rishivandiyam—
146 Dr.RadhakrishnanNagar—
147 Royapuram—
148 Saidapet—
149 Salem -I—
150 Salem-II—
151 Samayanallur—
152 Sankaranayanarkoi—
153 Sankarapuram—
154 Sankari—
155 Sathyamangalam—
156 Sattangulam—
157 Sattur—
158 Sedapatti—
159 Sendamangalam—
160 Sholavandan—
161 Sholinghur—
162 Singanallur—
163 Sirkazhi—
164 Sivaganga—
165 Sivakasi—
166 Sriperumbudur—
167 Srirangam— [today’s CM]
168 Srivaikuntam—
169 Srivilliputhur—
170 Talavasal—
171 Tambaram—
172 Taramangalam—
173 Tenkasi—
174 Thalli—
175 Thandarambattu—
176 Thanjavur—
177 Theni—
178 Thirumangalam—
179 Thirumayam—
180 Thirupparankundram—
181 Thiruvattar—
182 Thiruverambur—
183 Thiruvidamarudur—
184 Thiruvonam—
185 Thiruvottiyur—
186 Thondamuthur—
187 Thottiam—
188 Tindivanam—
189 Tiruchendur—
190 Tiruchengode—
191 Tirunavalur—
192 Tirunelveli—
193 Tiruppattur-194—
194 Tiruppattur-41—
195 Tirupporur—
196 Tiruppur—
197 Tiruthuraipundi—
198 Tiruttani—
199 Tiruvadanai—
200 Tiruvaiyaru—
201 Tiruvallur—
202 Tiruvannamalai—
203 Tiruvarur—
204 TheagarayaNagar—
205 Tiruchirapalli-I—
206 Tiruchirapalli-II—
207 Triplicane—
208 Tuticorin—
209 Udagamandalam—
210 Udumalpet—
211 Ulundurpet—
212 Uppiliyapuram—
213 Usilampatti—
214 Uthiramerur—
215 Valangiman—
216 Valparai—
217 Vandavasi—
218 Vaniyambadi—
219 Vanur—
220 Varahur—–
221 Vasudevanallur—
222 Vedaranyam—
223 Vedasandur—
224 Veerapandi—
225 Vellakoil—
226 Vellore—
227 Vilathikulam—
228 Vilavancode—
229 Villivakkam—
230 Villupuram—
231 Virudhunagar—
232 Vridhachalam—
233 Yercaud—
234 ThousandLights—


Cormen Dynamic Programming Problem 15-6

October 19th, 2013 No comments

15-6: Professor Stewart is consulting for the president of a corporation that is planning a company party. The company has a hierarchical structure; that is supervisor relation forms a tree rooted at the president. The personnel office has ranked each employee with a conviviality rating, which is a real number. In order to make the party fun for all attendees, the president does not want both an employee and his or her immediate supervisor to attend. Professor Stewart is given the tree that describes the structure of the corporation, using the left-child, right-sibling representation method. Each node of the tree holds, in addition to the pointers, the name of an employee and that employee’s conviviality ranking. Describe an algorithm to make up a guest list that maximizes the sun of the conviviality ratings of the guests. Analyze the running time of the algorithm.

The solution can be found here.

Update: The analysis part for Algorithm 1 is incorrect.  The complexity for Algorithm 1 is also O(n) as there are no redundant computation during the recursion.  So, Algorithm 2 is infact an overkill, but still linear.  Just by remembering the solutions of the sub-problems in the recurrence structure, it is possible to get the solution to the problem in linear time.


John 3:30 He must increase and I must decrease.

October 14th, 2013 1 comment
An interesting conversation that I’d lately picked with my beloved student and friend Gnana Sundar over facebook on John 3:30’s interpretation through a computer program snippet.

John 3:30 He must become greater and I must become lesser.

void john_3_30() {

Sudarsun Santhiappan: syntax error, unless instance variables “jesus” and “self” are globally defined (by who is a question you should answer). in some sense, you can also connect this relationship to holy trinity.

Gnana Sundar: Sir, did you check your class”path”? What “compiler” are you using?

Sudarsun Santhiappan: compiler” is analogous to the “religion”, which defines the book of rules for a good living (lifetime of the application). class”path” is analogous to the “help” that you get from other “runnable” wisdom in the “RunTime” called “life”.

Ulagammal Paramasivam: It shud be int john_3_30 as the return of this can’t be void.

Sudarsun Santhiappan: i would argue that the return type can only be a boolean (if at all), whether you attained sanity & solace or not. It cannot be a discrete or continuous evaluation as there is nothing to compare against. typically, add the line “return !self;”. does it make sense? The interpretation could be “have you given up yourself completely (to jesus, if you may add) ?”.

Gnana Sundar: Ulags: 🙂 …. I do not want to return from this method. I want this to run in an eternity loop 🙂

Sudarsun Santhiappan: Pragmatic Error: John 3:30 does not endorse one time ++ or –, it is an iterative process, if i may presume. Moreover, one time ++ or — is not a stable and a viable solution to minimization. Anything, that’s gradually minimized or maximized tend to be stable for better and longer. So, i would disagree to your point Gnana. 🙂

Gnana Sundar: Sir, I totally agree with you that John 3:30 does not endorse a one time ++ or –. It is a continuous process until eternity sets in. But I’m sure that the environment in which this is going to run is going to have infinite stack segment. If you say life is “RunTime”, the one who instantiated me would have to worry about stack overflow . When He can have the memory and a scalable enviroment to hold this universe and its contents, I’m pretty syre he can do better memory management and garbage collection

Just to give you some context. The Book of John is one of the four gospel books from the bible. It was written by John, one of the disciples of Christ.

In John 3:30, John the Baptist (he is not one of Jesus’ disciples, he is different from the author) says, “He must increase, but I must increase”. John the Baptist is considered to be a harbinger for Christ. He lived in the actual times when the Jews were “eagerly and for real” waiting for the Messiah. He had so many disciples and followers. He was considered to be a prophet. His calling in life was to prepare the way for Christ’ entry. When Christ started his ministry of healing people and teaching about the Kingdom of Righteousness, John had more followers than Christ. So pride and envy could have easily set in John. People, John’s disciples, John’s followers were eagerly waiting for John’s reaction. AT this point of time he uttered, its time… “He must increase and I must decrease” (thus the fulfilling the calling in his life).

In the same way when one accepts Christ in His heart, he/she should tune his/her heart and mind to say, “He must increase and I must decrease” and understand the actual calling and meaning of accepting Christ and their existence

By the way, I do not consider bible as a “religious” text. Religion limits the boundaries of this book and one’s life. It is open source . It is a set of God inspired writings, written by disciples for other disciples.

Sudarsun Santhiappan: Well said.

அண்ணத்துரையின் திருமண பத்திரிக்கை

September 15th, 2013 No comments


Annadurai's Wedding Invitation