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.

/etc/rc.local

dmraid -ay
mount /home
mount /data

/etc/fstab

/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 http://www.sudarsun.in/downloads/mccs.pdf

Tamilnadu State MLA EMAIL IDs

July 27th, 2014 No comments

Tamilnadu MLAs have individual email ids now !

1 Acharapakkam – mlaacharapakkam@tn.gov.in
2 Alandur – mlaalandur@tn.gov.in
3 Alangudi – mlaalangudi@tn.gov.in
4 Alangulam – mlaalangulam@tn.gov.in
5 Ambasamudram — mlaambasamudram@tn.gov.in
6 Anaicut — mlaanaicut@tn.gov.in
7 Andhiyur –mlaandhiyur@tn.gov.in
8 Andimadam — mlaandimadam@tn.gov.in
9 Andipatti—-mlaandipatti@tn.gov.in
10 AnnaNagar— mlaannanagar@tn.gov.in
11 Arakkonam —-mlaarakkonam@tn.gov.in
12 Arantangi– mlaarantangi@tn.gov.in
13 Aravakurichi — mlaaravakurichi@tn.gov.in
14 Arcot — mlaarcot@tn.gov.in
15 Ariyalur –mlaariyalur@tn.gov.in
16 Arni — mlaarni@tn.gov.in
17 Aruppukottai —mlaaruppukottai@tn.gov.in
18 Athoor— mlaathoor@tn.gov.in
19 Attur —mlaattur@tn.gov.in
20 Avanashi —mlaavanashi@tn.gov.in
21 Bargur —mlabargur@tn.gov.in
22 Bhavani—mlabhavani@tn.gov.in
23 Bhavanisagar—mlabhavanisagar@tn.gov.in
24 Bhuvanagiri—–mlabhuvanagiri@tn.gov.in
25 Bodinayakkanur—-mlabodinayakkanur@tn.gov.in
26 Chengalpattu—–mlachengalpattu@tn.gov.in
27 Chengam—mlachengam@tn.gov.in
28 Chepauk—mlachepauk@tn.gov.in
29 Cheranmahadevi—mlacheranmahadevi@tn.gov.in
30 Cheyyar—mlacheyyar@tn.gov.in
31 Chidambaram—mlachidambaram@tn.gov.in
32 Chinnasalem—mlachinnasalem@tn.gov.in
33 CoimbatoreEast—-mlacoimbatoreeast@tn.gov.in
34 CoimbatoreWest—-mlacoimbatorewest@tn.gov.in
35 Colachel—mlacolachel@tn.gov.in
36 Coonoor—-mlacoonoor@tn.gov.in
37 Cuddalore—mlacuddalore@tn.gov.in
38 Cumbum—mlacumbum@tn.gov.in
39 Dharapuram—mladharapuram@tn.gov.in
40 Dharmapuri—mladharmapuri@tn.gov.in
41 Dindigul—mladindigul@tn.gov.in
42 Edapadi—mlaedapadi@tn.gov.in
43 Egmore—mlaegmore@tn.gov.in
44 Erode—-mlaerode@tn.gov.in
45 Gingee—mlagingee@tn.gov.in
46 Gobichettipalayam—mlagobichettipalayam@tn.gov.in
47 Gudalur—-mlagudalur@tn.gov.in
48 Gudiyatham—-mlagudiyatham@tn.gov.in
49 Gummidipundi—-mlagummidipundi@tn.gov.in
50 Harbour—–mlaharbour@tn.gov.in
51 Harur—-mlaharur@tn.gov.in
52 Hosur—mlahosur@tn.gov.in
53 Ilayangudi—mlailayangudi@tn.gov.in
54 Jayankondam—mlajayankondam@tn.gov.in
55 Kadaladi—mlakadaladi@tn.gov.in
56 Kadayanallur—mlakadayanallur@tn.gov.in
57 Kalasapakkam—-mlakalasapakkam@tn.gov.in
58 Kancheepuram—mlakancheepuram@tn.gov.in
59 Kandamangalam—-mlakandamangalam@tn.gov.in
60 Kangayam—mlakangayam@tn.gov.in
61 Kanniyakumari—-mlakanniyakumari@tn.gov.in
62 Kapilamalai—-mlakapilamalai@tn.gov.in
63 Karaikudi—-mlakaraikudi@tn.gov.in
64 Karur—-mlakarur@tn.gov.in
65 Katpadi—-mlakatpadi@tn.gov.in
66 Kattumannarkoil—mlakattumannarkoil@tn.gov.in
67 Kaveripattinam—mlakaveripattinam@tn.gov.in
68 Killiyoor—-mlakilliyoor@tn.gov.in
69 Kinathukadavu—mlakinathukadavu@tn.gov.in
70 Kolathur—mlakolathur@tn.gov.in
71 Kovilpatti—mlakovilpatti@tn.gov.in
72 Krishnagiri—-mlakrishnagiri@tn.gov.in
73 Krishnarayapuram—mlakrishnarayapuram@tn.gov.in
74 Kulithalai—-mlakulithalai@tn.gov.in
75 Kumbakonam—mlakumbakonam@tn.gov.in
76 Kurinjipadi—mlakurinjipadi@tn.gov.in
77 Kuttalam—mlakuttalam@tn.gov.in
78 Lalgudi—mlalalgudi@tn.gov.in
79 MaduraiCentral—mlamaduraicentral@tn.gov.in
80 MaduraiEast—mlamaduraieast@tn.gov.in
81 MaduraiWest—-mlamaduraiwest@tn.gov.in
82 Maduranthakam—-mlamaduranthakam@tn.gov.in
83 Manamadurai—-mlamanamadurai@tn.gov.in
84 Mangalore—-mlamangalore@tn.gov.in
85 Mannargudi—-mlamannargudi@tn.gov.in
86 Marungapuri—–mlamarungapuri@tn.gov.in
87 Mayiladuturai—-mlamayiladuturai@tn.gov.in
88 Melmalaiyanur—mlamelmalaiyanur@tn.gov.in
89 Melur—mlamelur@tn.gov.in
90 Mettupalayam—mlamettupalayam@tn.gov.in
91 Mettur—mlamettur@tn.gov.in
92 Modakkurichi—mlamodakkurichi@tn.gov.in
93 Morappur—mlamorappur@tn.gov.in
94 Mudukulathur—mlamudukulathur@tn.gov.in
95 Mugaiyur—-mlamugaiyur@tn.gov.in
96 Musiri—mlamusiri@tn.gov.in
97 Mylapore—mlamylapore@tn.gov.in
98 Nagapattinam—-mlanagapattinam@tn.gov.in
99 Nagercoil—mlanagercoil@tn.gov.in
100 Namakkal—mlanamakkal@tn.gov.in
101 Nanguneri—mlananguneri@tn.gov.in
102 Nannilam—-mlanannilam@tn.gov.in
103 Natham—–mlanatham@tn.gov.in
104 Natrampalli—-mlanatrampalli@tn.gov.in
105 Nellikkuppam—-mlanellikkuppam@tn.gov.in
106 Nilakottai—mlanilakottai@tn.gov.in
107 Oddanchatram—mlaoddanchatram@tn.gov.in
108 Omalur—mlaomalur@tn.gov.in
109 Orathanad—mlaorathanad@tn.gov.in
110 Ottapidaram—mlaottapidaram@tn.gov.in
111 Padmanabhapuram—-mlapadmanabhapuram@tn.gov.in
112 Palacode—mlapalacode@tn.gov.in
113 Palani—-mlapalani@tn.gov.in
114 Palayamkottai—mlapalayamkottai@tn.gov.in
115 Palladam—mlapalladam@tn.gov.in
116 Pallipattu—mlapallipattu@tn.gov.in
117 Panamarathupatti—mlapanamarathupatti@tn.gov.in
118 Panruti—mlapanruti@tn.gov.in
119 Papanasam—mlapapanasam@tn.gov.in
120 Paramakudi—mlaparamakudi@tn.gov.in
121 ParkTown—-mlaparktown@tn.gov.in
122 Pattukkottai—-mlapattukkottai@tn.gov.in
123 Pennagaram—–mlapennagaram@tn.gov.in
124 Perambalur—-mlaperambalur@tn.gov.in
125 Perambur—mlaperambur@tn.gov.in
126 Peranamallur—mlaperanamallur@tn.gov.in
127 Peravurani—mlaperavurani@tn.gov.in
128 Periyakulam—mlaperiyakulam@tn.gov.in
129 Pernambut—mlapernambut@tn.gov.in
130 Perundurai—mlaperundurai@tn.gov.in
131 Perur—mlaperur@tn.gov.in
132 Pollachi—mlapollachi@tn.gov.in
133 Polur—mlapolur@tn.gov.in
134 Pongalur—mlapongalur@tn.gov.in
135 Ponneri—mlaponneri@tn.gov.in
136 Poompuhar—mlapoompuhar@tn.gov.in
137 Poonamallee—-mlapoonamallee@tn.gov.in
138 Pudukkottai—-mlapudukkottai@tn.gov.in
139 Purasawalkam—-mlapurasawalkam@tn.gov.in
140 Radhapuram—mlaradhapuram@tn.gov.in
141 Rajapalayam—mlarajapalayam@tn.gov.in
142 Ramanathapuram—mlaramanathapuram@tn.gov.in
143 Ranipet—mlaranipet@tn.gov.in
144 Rasipuram—-mlarasipuram@tn.gov.in
145 Rishivandiyam—-mlarishivandiyam@tn.gov.in
146 Dr.RadhakrishnanNagar—-mlarknagar@tn.gov.in
147 Royapuram—mlaroyapuram@tn.gov.in
148 Saidapet—mlasaidapet@tn.gov.in
149 Salem -I—mlasalem1@tn.gov.in
150 Salem-II—mlasalem2@tn.gov.in
151 Samayanallur—mlasamayanallur@tn.gov.in
152 Sankaranayanarkoi—mlasankaranayanarkoil@tn.gov.in
153 Sankarapuram—mlasankarapuram@tn.gov.in
154 Sankari—mlasankari@tn.gov.in
155 Sathyamangalam—mlasathyamangalam@tn.gov.in
156 Sattangulam—-mlasattangulam@tn.gov.in
157 Sattur—mlasattur@tn.gov.in
158 Sedapatti—-mlasedapatti@tn.gov.in
159 Sendamangalam—-mlasendamangalam@tn.gov.in
160 Sholavandan—mlasholavandan@tn.gov.in
161 Sholinghur—-mlasholinghur@tn.gov.in
162 Singanallur—mlasinganallur@tn.gov.in
163 Sirkazhi—-mlasirkazhi@tn.gov.in
164 Sivaganga—-mlasivaganga@tn.gov.in
165 Sivakasi—mlasivakasi@tn.gov.in
166 Sriperumbudur—mlasriperumbudur@tn.gov.in
167 Srirangam—mlasrirangam@tn.gov.in [today’s CM]
168 Srivaikuntam—mlasrivaikuntam@tn.gov.in
169 Srivilliputhur—mlasrivilliputhur@tn.gov.in
170 Talavasal—mlatalavasal@tn.gov.in
171 Tambaram—mlatambaram@tn.gov.in
172 Taramangalam—mlataramangalam@tn.gov.in
173 Tenkasi—-mlatenkasi@tn.gov.in
174 Thalli—mlathalli@tn.gov.in
175 Thandarambattu—mlathandarambattu@tn.gov.in
176 Thanjavur—mlathanjavur@tn.gov.in
177 Theni—mlatheni@tn.gov.in
178 Thirumangalam—mlathirumangalam@tn.gov.in
179 Thirumayam—mlathirumayam@tn.gov.in
180 Thirupparankundram—mlathirupparankundram@tn.gov.in
181 Thiruvattar—mlathiruvattar@tn.gov.in
182 Thiruverambur—mlathiruverambur@tn.gov.in
183 Thiruvidamarudur—mlathiruvidamarudur@tn.gov.in
184 Thiruvonam—mlathiruvonam@tn.gov.in
185 Thiruvottiyur—mlathiruvottiyur@tn.gov.in
186 Thondamuthur—mlathondamuthur@tn.gov.in
187 Thottiam—mlathottiam@tn.gov.in
188 Tindivanam—mlatindivanam@tn.gov.in
189 Tiruchendur—mlatiruchendur@tn.gov.in
190 Tiruchengode—-mlatiruchengode@tn.gov.in
191 Tirunavalur—-mlatirunavalur@tn.gov.in
192 Tirunelveli—mlatirunelveli@tn.gov.in
193 Tiruppattur-194—-mlatiruppattur194@tn.gov.in
194 Tiruppattur-41—mlatiruppattur41@tn.gov.in
195 Tirupporur—-mlatirupporur@tn.gov.in
196 Tiruppur—-mlatiruppur@tn.gov.in
197 Tiruthuraipundi—-mlatiruthuraipundi@tn.gov.in
198 Tiruttani—-mlatiruttani@tn.gov.in
199 Tiruvadanai—mlatiruvadanai@tn.gov.in
200 Tiruvaiyaru—-mlatiruvaiyaru@tn.gov.in
201 Tiruvallur—mlatiruvallur@tn.gov.in
202 Tiruvannamalai—-mlatiruvannamalai@tn.gov.in
203 Tiruvarur—-mlatiruvarur@tn.gov.in
204 TheagarayaNagar—-mlatnagar@tn.gov.in
205 Tiruchirapalli-I—mlatrichy1@tn.gov.in
206 Tiruchirapalli-II—mlatrichy2@tn.gov.in
207 Triplicane—-mlatriplicane@tn.gov.in
208 Tuticorin—mlatuticorin@tn.gov.in
209 Udagamandalam—mlaudagamandalam@tn.gov.in
210 Udumalpet—mlaudumalpet@tn.gov.in
211 Ulundurpet—mlaulundurpet@tn.gov.in
212 Uppiliyapuram—mlauppiliyapuram@tn.gov.in
213 Usilampatti—mlausilampatti@tn.gov.in
214 Uthiramerur—mlauthiramerur@tn.gov.in
215 Valangiman—-mlavalangiman@tn.gov.in
216 Valparai—-mlavalparai@tn.gov.in
217 Vandavasi—-mlavandavasi@tn.gov.in
218 Vaniyambadi—-mlavaniyambadi@tn.gov.in
219 Vanur—-mlavanur@tn.gov.in
220 Varahur—–mlavarahur@tn.gov.in
221 Vasudevanallur—mlavasudevanallur@tn.gov.in
222 Vedaranyam—mlavedaranyam@tn.gov.in
223 Vedasandur—mlavedasandur@tn.gov.in
224 Veerapandi—mlaveerapandi@tn.gov.in
225 Vellakoil—mlavellakoil@tn.gov.in
226 Vellore—mlavellore@tn.gov.in
227 Vilathikulam—mlavilathikulam@tn.gov.in
228 Vilavancode—mlavilavancode@tn.gov.in
229 Villivakkam—mlavillivakkam@tn.gov.in
230 Villupuram—mlavillupuram@tn.gov.in
231 Virudhunagar—-mlavirudhunagar@tn.gov.in
232 Vridhachalam—mlavridhachalam@tn.gov.in
233 Yercaud—mlayercaud@tn.gov.in
234 ThousandLights—mlathousandlights@tn.gov.in

Tags:

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.

Tags:

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() {
jesus++;
self–;
}

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