पक्षिणः जननम् (Birth of Bulbuls)

June 29, 2014
मम गृहस्य परिसरे विद्यमानानां पक्षिणः विषये अत्र, अत्रअत्र पूर्व्ं मया लिखितमस्ति | गृहसस्याणि खगान् आकर्षयन्ति इति विचारे मम गृहमेव प्रमाणमित्यहं मन्ये| एकदा पाकशालायाः नालिकायामेव नीडनिर्माणं कृतं पक्षिणा| अद्यत्वे द्वौ पक्षिणौ अस्माकमुद्याने निवेशनं कृत्वा शिशू प्राप्तवन्तौ । अस्य वृत्तन्तस्य विवरणं करोमि अत्र|
Bulbul's nest

Bulbul’s nest

उद्यानस्य एकस्मिन् भागे मल्लिका लता अस्ति। तत्र वयं अनेकवारं न गच्छामः । एकदा तस्यां लतायां नीडमेकं दृष्टवान् । सामान्यतः पक्षी सुरक्षितस्थले नीडस्य रचनं करोति, किन्तु एतत् नीडं भूम्याः निकटे एव आसीत्। अपि च नीडे अल्पाकारयुक्तौ पिङ्गलवर्णबिन्दुयुक्तौ द्वौ अण्डौ आस्तां!

Bulbul's eggs

Bulbul’s eggs

अण्डं तु दृष्टवान् किन्तु कस्य खगस्य अण्डमिति ज्ञातुं पार्श्वे स्थित्वा पक्षिणः निरीक्षणं कृतवान्|  किञ्चित्कालानन्तरं नीडस्योपरि उपविशन्तं मस्तके किरीटसदृश पक्षयुक्तं पक्षिणं दृष्टवान्| एषः पक्षी बेङ्गलूरु-नगरे सामान्यतः दृश्यते| अस्य नाम आङ्गलभाषायां Red-whiskered Bulbul इति अस्ति| K N Dave महोदयेन लिखितं “Birds in Sanskrit Literature” पुस्तके अस्य नाम गोवत्सकः इति दत्तमस्ति|

Red-whiskered bulbul

Red-whiskered bulbul

पश्चात् नितराम् नीडे एव उपविशन्तं पक्षिणं दृष्टवन्त:। दिनद्वयानन्तरम् अण्डाभ्यां द्वौ अरोमयुक्तौ शिशू बहिरागतवन्तौ। जन्मस्य तत्क्षणं तौ पक्षिणः शिशवः इव न दृश्येते स्म ।

Bulbul chicks - right after birth

Bulbul chicks – right after birth

यदा द्वित्राणि दिनानि अतीतानि, रोमं पक्षं च प्रप्तवन्तौ। शिशोः प्रथम-उड्डयनं द्रष्टुम् अस्माकम् आशा आसीत् किन्तु कदा पक्षिण: सर्वे नीडं त्यक्तवन्तः इति न अवगतमेव अस्माभिः!

4 days old bulbul chicks

4 days old bulbul chicks

Disclaimer:
संस्कृतं न जानामि न जानामि पाणिनिम्।
पदार्थमपि  न जानामि क्षमस्व वागीश्वरि॥


Trek from Jenukallu Gudda to Shivaganga falls

April 13, 2014

Any day I would prefer bone-chilling cold or even rain to scorching sun during my treks. Apart from Ombattu Gudda trek and beach treks, I haven’t done treks post December in any trek season. So I was a bit weary when Pradeep Hegde invited me to join his group which was attempting to trek from Magod Falls to Shivaganga Falls during 1st weekend of April. I have visited both of these falls but the challenge in this trek was to follow and walk beside the river between these two falls. But the invitation was hard to resist as I would be venturing into Karnataka Western Ghats region in Uttara Kannada District for the first time. Moreover, I was just a participant in this trek as opposed to being an organizer in most of my treks which sometimes is easy.

Though I had booked the bus ticket till Yellapura, I got down at Sonda for a quick visit to my in-laws place, had a good breakfast and got myself dropped at Magod falls (around 35km from Sonda) in bike by my brother-in-law. While I waited at Magod for rest of the group to arrive, Pradeep asked to me instead come over to Jenukallu Gudda, a view point overlooking a valley and which is around 4km from Magod. Apparently a local had advised Pradeep to attempt the initial descent from Jenukallu Gudda since descending down the Magod falls will be difficult and will need ropes. Though our group was equipped with ropes, we decided to start with an easy descent. The group had 12 members: Pradeep, his neighbor Satheesh, Avinash, Venkataraghavan, Vinayak, Nagarjun, Bharath, Ravi, Naveen, Sriharsha, Abhishek and I. The original plan was to reach Bedti river at Magod, follow it downstream till it joins Shalmala River and continue following Shalmala river upstream until it reaches Shivaganga falls.

View from Jenukallu Gudda

View from Jenukallu Gudda

We started the descent from Jenukallu Gudda (470m) at 10.45AM. The descent was mostly steep with dry leaves on the forest floor making the descent a bit more challenging.  We lost altitude quickly and hit a jeep tack (80m) at 11.30AM. We took right deviation into the jeep track and started walking with the hope that we will reach the confluence of Bedti and Shalmala rivers along the way. After a few hundred meters into the track we could see a dried up river bed towards our left and we continued the walk for an hour or so under direct sun before reaching a Siddimane (A house belonging to Siddi tribe) at a village called Kelase. To our surprise, we learnt from Siddis that we are way ahead of the confluence point and are in fact walking in the opposite direction! At Siddimane, we took a break to prepare lemon juice since fresh water was available here.

Dried up river bed near Kelase village

Dried up river bed near Kelase village

At around 1.15PM, we reversed our direction, continued to make progress on the jeep track and reached another Siddimane at 2PM. We had a good lunch that included “Avalakki oggarane” from Pradeep’s house and “Masala Majjige” (butter milk) mixed with lemon grass. Post lunch, a Siddi boy briefly accompanied us till the river and after which we were on our own walking upstream along Shalmala river (after the confluence with Bedti) which had a good amount of water in it considering that it was summer. We were now on the right bank of the river and the path mostly consisted of boulders. The heat was a bit too much for me and the walk was made further difficult by the blisters I had all over the feet.

IMG_4763

We went past a few Siddis who were fishing and finally reached the confluence (125m) of Bedti and Shalmala at 4.45PM. While the confluence point had a bit of depth and hence calm waters, the Shalmala side had gushing water and was rocky.

The confluence of Bedti and Shalmala rivers

The confluence of Bedti and Shalmala rivers

Many of us spent some time cooling ourselves in Shalmala while most of the group had an extended river time at the confluence point. Swimming and breath-holding skills were at display: while Satheesh excelled in swimming and managed to crossover to the other bank, Vinayak could hold breath under water for more than 2min!

IMG_4774

Our camping site was on the river bed at the confluence point which already had arrangements for stove (made of stones), all we needed was to get some dry wood which was available in plenty. Boiled rice Ganji with pickle, curd and butter milk was on the menu. Ganji was so very filling and was a bit unusual for me since we usually stick to ready-to-eat stuff to keep the logistics simple in our treks. The night was cloudy and warm and sleeping inside the sleeping bag wasn’t an option for many.  There was even a light drizzle past midnight.

On Sunday morning, we got up fairly early and wanted to end the trek before noon to avoid the harsh summer sun. The combination of pickle and freshly obtained honey (given to us in the morning by Siddis from their night’s catch) gave a distinct flavour to yesterday’s Ganji and I could see Ganji was more in demand than the freshly prepared maggi noodles! We started upstream alongside Shalmala river at 8AM after a round of lemon tea with honey.

Shalmala river side was very rocky and we were mostly walking over huge boulders. We had to cross over to the opposite bank multiple times whenever forward progress on one bank was difficult or impossible. With the amount of water in the river in April, we mostly could negotiate the river without much difficulty and I am sure the challenges on this trail will be totally different if the water level was high. But we were facing a different challenge and that was the dry heat. The rate at which I was loosing water via sweat seemed to be more than the intake rate. Given that we were walking beside a river, there was never shortage of water fortunately.

River Shalmala

River Shalmala

At 10.30AM when I was feeling a bit down, we had a lemon juice break. I must have taken close to a litre and it really helped to get my energy levels back. Next we climbed over to a small hill only to realize that it was more difficult than a small jump over the rock that we were planning to originally avoid. Thus we had to backtrack and make progress over the boulders itself. The quest for the end (Shivaganga falls) continued and we kept making progress in the hot sun. I even reached a stage where I felt just drinking loads of water wasn’t helping me and had to resort to Glucose which Pradeep was carrying. I can’t remember when I had taken Glucose on a trek, must have been in the last decade, but such was the harshness of this trek for me.

Shivaganga falls

Shivaganga falls

Finally we reached the base of Shivaganga falls (270m) at 1PM where we consumed chapattis for lunch with Chatni pudi, jam and honey. Next it was a steep climb to reach the view point of the waterfalls (465m) from where we had hired a jeep. Thus ended one of the most difficult treks I have done in recent times. Though the trail distance and the terrain was manageable, the summer sun brought out a whole new challenge to the trek. I have done treks earlier in other extreme conditions like winter trek at -20°C in thigh deep snow, altitudes upwards of 5000m etc, but this summer trek in seemingly easy terrain turned to be a trek to remember as far as endurance is concerned.

Map of the route we took is here, courtesy Vinayak.


मेघाक्षेपः

January 10, 2014
When I was in Himalayas last year during the Animal Pass and Sara Umga Pass trek,  I was forced to spend an idle day at Shamshi Thach, thanks to the bad weather. There was nothing else to do on that day and it was a bit depressing to look at clouds engulfing the peaks all around.
A peak seen from Shamshi Thach camp

A peak seen from Shamshi Thach camp

The same peak masked by clouds

The same peak masked by clouds

Now that depression has come out in the form of a poem in Sanskrit. The poet (who is also the trekker here) isn’t amused by the clouds covering all the beautiful peaks and gives a piece of his mind to the Clouds and also gives a bit of free advice!

The poem is set in Anushtup chandas. This being my 1st attempt in Sanskrit poetry, I am sure, will have mistakes, but I thank my brother-in-law Krishnamoorthy Bhat for suggesting some corrections and improvements.

मेघाक्षेपः

रचितं कालिदासेन खण्डकाव्यं तवोपरि |

प्रेमयुक्तं मनोहासं मेघ ते मधुरान्वितम् || १ ||
[O cloud, Kalidasa wrote a lyrical poem on you which had love, sweetness and that was enjoyable]

रचयाम्य्ल्पकाव्यन्तु एतत्त्वं श्रोतुमर्हसि |

उद्दिश्य त्वामहं सत्यं आकाशचलनप्रिय || २ ||
[One who likes to move in the sky (aka Cloud), (Now) I am writing a small poem addressing you that you should listen to]
मेघदूते गुणी भूत्वा अकरोत् कर्म वै सुखम् |
मत्काव्ये किन्तु आक्षेपं  निश्चयेन करोम्यहम् || ३ ||
[In (Kalidasa's poem) Meghadoota, you did a nice job being a good person. But in my poem, I am blaming you for sure]

शिखराणि अनेकानि शोभन्ते तु हिमालये |
हिमावृतानि सर्वाणि श्रेष्ठानि धवलानि च || ४ ||
[A number of snow-covered, white, high peaks adorn the Himalaya]

भ्रमसि त्वमहोरात्रं नित्यं मेघ हिमालये |
त्वमावृणोसि शैलानि यथा राहुः दिवाकरम् || ५ ||
[O cloud, you roam around the Himalaya day and right regularly, and cover/mask the peaks like how Rahu masks the Sun]

कान्तिहीनं प्रभाहीनं पर्वतं च करिष्यसि |
अविवेकं कठोरञ्च कार्यं तव न रोचते || ६ ||
[You take the shine out of the mountain and this thoughtless and cruel act of yours isn't liked by me]

मित्रमस्ति गिरेर्मित्रः दुर्दशां न सहिष्यति |
क्षणमात्रेण ते गर्वः द्रविष्यति न संशयः || ७ ||
[Sun, who is mountain's friend will not like his (mountain's) bad situation. No doubt that your arrogance will melt in a jiffy (thanks to Sun)]

त्वामेव हि निरीक्षन्ते जनाः मीनं बकः यथा |
जलधर भवान् गत्वा वर्षधारां तथा कुरु || ८ ||
[People wait for you like crane waits (patiently, eagerly) for a fish. O cloud who holds the water, you go there and cause rain]

भवान्तु कुत आयातः यत्रकुत्रापि गच्छति |

तेन तुष्टो भविष्यामि मावृणोतु हिमश्रियम् || ९ ||

[Where do you come from ? You roam around aimlessly. Don't mask the mountain and I will be happy]

Disclaimer:
संस्कृतं न जानामि न जानामि पाणिनिम्।
पदार्थमपि  न जानामि क्षमस्व वागीश्वरि॥


2013 in review

December 31, 2013

The WordPress.com stats helper monkeys prepared a 2013 annual report for this blog.

Here’s an excerpt:

The concert hall at the Sydney Opera House holds 2,700 people. This blog was viewed about 22,000 times in 2013. If it were a concert at Sydney Opera House, it would take about 8 sold-out performances for that many people to see it.

Click here to see the complete report.


Kudremukha Trek

December 25, 2013

My last tryst with Karnataka Western Ghats was in 2011 when we trekked to Deepadakallu and Jenukallu peaks from Maragunda. A couple of disturbing incidents involving trekkers getting lost/killed in the forests  dissuaded us from exploring any new routes. Having completed most of the exciting trails in Charmadi and Shiradi range, we were mostly content doing an yearly Himalayan trek. But after a partially successful Himalayan trek to Saraumga Pass, we were longing to get back to the forest trails of Western Ghats. There are only a few options if you want to trek in Karnataka Western Ghats with proper permission from Forest Department – Kudremukha and Kumara Parvatha come to my mind. Since I had done Kumara Parvatha already twice, we decided to do the famous Kudremukha peak.

Kudremukha peak seen on the left side of Gaumukha peak

Kudremukha peak seen on the left side of Gaumukha peak

Kudremukha has become synonymous to trekking in Karnataka and it is a favorite beginner’s destination. Though we knew it would be crowded during the weekends, we decided to go ahead since it was one of the few officially permitted trekking trails. The trek was planned for the last weekend of November. The group comprised of 7 trekkers: Naren, Austin and his friend Prashanth, Preeti, Pradeep and I. The group had two beginners: Preeti for whom this was her first Western Ghats trek though she had done Animal Pass Himalayan trek earlier this year and Pradeep who was an absolute fresher. I contacted Sathish from Mullodi village at Kudremukha base who provides lodging and guide services to the trek. Logistics-wise this is an easy trek since everything including permission, food, guide and accommodation was being arranged by Sathish.

IMG_4470

We boarded the Horanadu bus on Friday night from Bangalore. What to expect in next 2 days was evident when we got a a bunch of over-excited trekkers in the bus for company who hardly allowed us sleep. We reached Kalasa at 7AM where Austin and Prashanth joined us. Next it was again a short bus journey to reach Balagallu village. From there it was an uphill climb through the winding roads in a jeep and we reached Mullodi village at 9AM. Mullodi village (1180m) is situated at the base of Kudremukh mountain range. Our accommodation was arranged in Sathish’s house which would be hosting 15 other trekkers we were told earlier. But we were surprised to find out that there will be at least 50 more trekkers camping at this house for the night. Fortunately most of the people had already started the day’s hike, however there were still enough people to form a queue at the only one bathroom that was present at Sathish’s house. Since bath was out of question, we gulped down super-hard idlies with a beverage that tasted like anything but tea.

IMG_4481

Hirumarguppi peak

After paying the Kudremukha National Park entry fees and trekking fees (Rs 275/- per person per day) to a forest department official who was present at Sathish’s house, we hit the trail with a guide at 10AM. There are two main routes to the Kudremukha peak from Mullodi. First one is a longer one that touches Gaumukha peak. The second one is a more direct route to Kudremukha peak with the trail distance of 10km one way. We chose the direct route since longer route was out of question when we start the trek as late as 10AM.

IMG_4488

IMG_4490

The trail quickly leaves the village behind and enters the forest. We crossed a couple of streams in the forest and by 10.30PM, we could see Gaumukha, Durgadabbe and Kudremukha peaks clearly. Hirumarguppi (Thirumalaguppi – the corrupted form) was also visible towards our left. By around 11AM, the real ascent started and we met scores of other trekkers who had started before us. The groups had too many first timers and hardly followed any trail discipline by resorting to extreme shouting and whistling. Unwilling to spoil our trek, we increased our pace to maintain a considerable distance from this noisy crowd. The pace set by Preeti, Pradeep, Naren and I was a bit too high for rest of our folks to follow and we gradually left them as they settled into their own pace.

Kudremukha peak

Kudremukha peak

Kudremukha peak is at around 1800m, so this trek involves an scent of 800m from Mullodi village. While the ascent is mostly gradual, the final ascent to the ridge line which leads to the peak is challenging. The guide took us via the straight ascent path instead of the usual zig-zag winding route. We made good progress, thanks to the oranges we were carrying in plenty. At 1PM we reached a stream and were just 100m below the peak. We completed the packed lunch provided by Sathish. Unlike our other treks where we carry our own food stuff with us, in this trek we had completely outsourced food and stay to Sathish. I had to force the chittranna down my throat due to lack of other food options. Here we decided to wait for rest of our group and they joined us at 1.30PM.

IMG_4509

Views around Kudremukha peak

Views around Kudremukha peak

The final 100m assault to the peak turned out to be easier than anticipated and we reached the Kudremukha peak at 1.45PM. As we reached the peak, another group which had come via the Gaumukha route left giving us some silent moments on the peak. The weather was mostly cloudy and cleared up intermittently to give us glimpses of the mountain range around Kudremukha peak. Our guide offered to take us down via the longer Gaumukha route, but we declined since some of our folks were really tired and we wanted to reach the village before it turned dark. It does become dark very early in the forests in the winter.

Chundi peak

Chundi peak

As the noisy crowd of trekkers started to arrive at the peak, we made an exit at 2.30PM. The descent turned out to be longer and strenuous than anticipated. The trail which we had covered enthusiastically in the morning now appeared to be never ending and we dragged our feet along to reach Mullodi at 5.30PM. We had left Austin, Prashanth and Chinmay with the guide behind and they reached around an hour later.

IMG_4522
The sight at Sathish’s house wasn’t that pleasing as new bunch of trekkers for tomorrow’s trek had arrived. Tents were laid out all around the house to accommodate them and there was contention for all the resources in the house from food till bathroom. When resources are in short supply, people let go of courtesy and staying at such place is no longer enjoyable. We had come in the anticipation of washing ourselves with hot water. With one bathroom catering to 25 odd people, that wasn’t possible. Naren, Pradeep and I washed ourselves in the cold water of the running stream. Though it was extremely cold, it was simultaneously refreshing after a hard day’s trek.

IMG_4533
We were given a room inside the house and most of us were carrying our own sleeping bags. Already crowded house became even more crowded with the arrival of BMC crowd. In all there were more than 50 people staying in that house with two toilets and 1 bathroom!  Things were in such short supply that Sathish struggled to provide us the required floor mats. As the tired trekkers hit the bed, BMC folks started playing Anthakshari and the idiots refused to stop even after our objection. Finally Sathish had to intervene to settle the matter.

IMG_4534
Some of us got up as early as 5AM on Sunday to use the most precious resource, the toilet! We had asked to our guide to take us to a hill locally called Chundi that is located adjacent to Hirumarguppi peak. This route is not frequented by many and we hoped to get some real trekking experience since there wasn’t any well marked route to this peak. While Chinmay, Austin and Prashanth preferred to stay back, Pradeep, Preeti, Naren and I started on the 2nd day’s trek at 8AM.

The initial path is via hills covered by fern shrubs and it soon led to grassland where the head-high grass was seen at many stretches. The ascent was also very rapid and we felt like doing some real trekking. We started attacking the Chundi peak head on and were doing some serious ascent on its grassy slope. We reached 1235m at 8.50AM, 1500m at 9.45AM an with just one tiny break we reached Chundi peak (1630m) at 10.15AM.

IMG_4538
Unlike yesterday where we had reached Kudremukha peak in the afternoon, we were at Chundi peak well before noon. The cloud cover wasn’t there and we got good views of the peaks around. In fact Chundi offers a very good view of the Kudremukha peak and the abrupt fall in the rocky face of Kudremukha peak is nicely visible from Chundi. We started the descent at 11AM. To make the descent interesting, we choose a different route that consisted of multiple adjacent hills and we planned to take the ridge line to cover all those and then descend at the last hill. This part of the trek turned out to be very good with nice views of the charmadi range on the other side. The route involved multiple ascents and descents and the extra grass growth made it more challenging. At one point the descent was so steep that sliding down was an easier option that walking down. We also passed beside a cluster of rocks that had all the signs of an active bear den.

We hardly took any breaks and reached Mullodi at 1.30PM and had a nice bath in the river. By 4PM we reached Kalasa, visited Kalaseshwara temple and then proceeded to Horanadu where we joined rest of our folks. After a good dinner at the Annapoorneshwari temple, we started back to Bangalore.


GlusterFS Block Device Translator

November 27, 2013

Block device translator

Block device translator (BD xlator) is a new translator added to GlusterFS recently which provides block backend for GlusterFS. This replaces the existing bd_map translator in GlusterFS that provided similar but very limited functionality. GlusterFS expects the underlying brick to be formatted with a POSIX compatible file system. BD xlator changes that and allows for having bricks that are raw block devices like LVM which needn’t have any file systems on them. Hence with BD xlator, it becomes possible to build a GlusterFS volume comprising of bricks that are logical volumes (LV).

bd

BD xlator maps underlying LVs to files and hence the LVs appear as files to GlusterFS clients. Though BD volume externally appears very similar to the usual Posix volume, not all operations are supported or possible for the files on a BD volume. Only those operations that make sense for a block device are supported and the exact semantics are described in subsequent sections.

While Posix volume takes a file system directory as brick, BD volume needs a volume group (VG) as brick. In the usual use case of BD volume, a file created on BD volume will result in an LV being created in the brick VG. In addition to a VG, BD volume also needs a file system directory that should be specified at the volume creation time. This directory is necessary for supporting the notion of directories and directory hierarchy for the BD volume. Metadata about LVs (size, mapping info) is stored in this directory.

BD xlator was mainly developed to use block devices directly as VM images when GlusterFS is used as storage for KVM virtualization. Some of the salient points of BD xlator are

  • Since BD supports file level snapshots and clones by leveraging the snapshot and clone capabilities of LVM, it can be used to fully off-load snapshot and cloning operations from QEMU to the storage (GlusterFS) itself.
  • BD understands dm-thin LVs and hence can support files that are backed by thinly provisioned LVs. This capability of BD xlator translates to having thinly provisioned raw VM images.
  • BD enables thin LVs from a thin pool to be used from multiple nodes that have visibility to GlusterFS BD volume. Thus thin pool can be used as a VM image repository allowing access/visibility to it from multiple nodes.
  • BD supports true zerofill by using BLKZEROOUT ioctl on underlying block devices. Thus BD allows SCSI WRITESAME to be used on underlying block device if the device supports it.

Though BD xlator is primarily intended to be used with block devices, it does provide full Posix xlator compatibility for files that are created on BD volume but are not backed by or mapped to a block device. Such files which don’t have a block device mapping exist on the Posix directory that is specified during BD volume creation.

Availability

BD xlator developed by M. Mohan Kumar was committed into GlusterFS git in November 2013 and is expected to be part of upcoming GlusterFS-3.5 release.

Compiling BD translator

BD xlator needs lvm2 development library. –enable-bd-xlator option can be used with ./configure script to explicitly enable BD translator. The following snippet from the output of configure script shows that BD xlator is enabled for compilation.

GlusterFS configure summary
===================

Block Device xlator  : yes

Creating a BD volume

BD supports hosting of both linear LV and thin LV within the same volume. However I will be showing them separately in the following instructions. As noted above, the prerequisite for a BD volume is VG which I am creating here from a loop device, but it can be any other device too.

1. Creating BD volume with linear LV backend

- Create a loop device

[root@bharata ~]# dd if=/dev/zero of=bd-loop count=1024 bs=1M
[root@bharata ~]# losetup /dev/loop0 bd-loop

- Prepare a brick by creating a VG

[root@bharata ~]# pvcreate /dev/loop0
[root@bharata ~]# vgcreate bd-vg /dev/loop0

- Create the BD volume

Create a POSIX directory first
[root@bharata ~]# mkdir /bd-meta

It is recommended that this directory is created on an LV in the brick VG itself so that both data and metadata live together on the same device.

Create and mount the volume
[root@bharata ~]# gluster volume create bd bharata:/bd-meta?bd-vg force

The general syntax for specifying the brick is host:/posix-dir?volume-group-name where “?” is the separator.

[root@bharata ~]# gluster volume start bd
[root@bharata ~]# gluster volume info bd

Volume Name: bd
Type: Distribute
Volume ID: cb042d2a-f435-4669-b886-55f5927a4d7f
Status: Started
Xlator 1: BD
Capability 1: offload_copy
Capability 2: offload_snapshot
Number of Bricks: 1
Transport-type: tcp
Bricks:
Brick1: bharata:/bd-meta
Brick1 VG: bd-vg

[root@bharata ~]# mount -t glusterfs bharata:/bd /mnt

- Create a file that is backed by an LV

[root@bharata ~]# ls /mnt
[root@bharata ~]#

Since the volume is empty now, so is the underlying VG.
[root@bharata ~]# lvdisplay bd-vg
[root@bharata ~]#

Creating a file that is mapped to an LV is a 2 step operation. First the file should be created on the mount point and a specific extended attribute should be set to map the file to LV.

[root@bharata ~]# touch /mnt/lv
[root@bharata ~]# setfattr -n “user.glusterfs.bd” -v “lv” /mnt/lv

Now an LV got created in the VG brick and the file /mnt/lv maps to this LV. Any read/write to this file ends up as read/write to the underlying LV.
[root@bharata ~]# lvdisplay bd-vg
— Logical volume —
LV Path                          /dev/bd-vg/6ff0f25f-2776-4d19-adfb-df1a3cab8287
LV Name                        6ff0f25f-2776-4d19-adfb-df1a3cab8287
VG Name                       bd-vg
LV UUID                         PjMPcc-RkD5-RADz-6ixG-UYsk-oclz-vL0nv6
LV Write Access            read/write
LV Creation host, time bharata, 2013-11-26 16:15:45 +0530
LV Status                      available
# open                          0
LV Size                    4.00 MiB
Current LE                   1
Segments                     1
Allocation                     inherit
Read ahead sectors    0
Block device                253:6

The file gets created with default LV size which is 1 LE which is 4MB in this case.
[root@bharata ~]# ls -lh /mnt/lv
-rw-r–r–. 1 root root 4.0M Nov 26 16:15 /mnt/lv

truncate can be used to set the required file size.
[root@bharata ~]# truncate /mnt/lv -s 256M
[root@bharata ~]# lvdisplay bd-vg
— Logical volume —
LV Path                          /dev/bd-vg/6ff0f25f-2776-4d19-adfb-df1a3cab8287
LV Name                        6ff0f25f-2776-4d19-adfb-df1a3cab8287
VG Name                       bd-vg
LV UUID                         PjMPcc-RkD5-RADz-6ixG-UYsk-oclz-vL0nv6
LV Write Access            read/write
LV Creation host, time bharata, 2013-11-26 16:15:45 +0530
LV Status                       available
# open                           0
LV Size                     256.00 MiB
Current LE                   64
Segments                      1
Allocation                      inherit
Read ahead sectors     0
Block device                 253:6

[root@bharata ~]# ls -lh /mnt/lv
-rw-r–r–. 1 root root 256M Nov 26 16:15 /mnt/lv

The size of the file/LV can be specified during creation/mapping time itself like this:
setfattr -n “user.glusterfs.bd” -v “lv:256MB” /mnt/lv

2. Creating BD volume with thin LV backend

- Create a loop device

[root@bharata ~]# dd if=/dev/zero of=bd-loop-thin count=1024 bs=1M
[root@bharata ~]# losetup /dev/loop0 bd-loop-thin

- Prepare a brick by creating a VG and thin pool

[root@bharata ~]# pvcreate /dev/loop0
[root@bharata ~]# vgcreate bd-vg-thin /dev/loop0

Create a thin pool
[root@bharata ~]# lvcreate –thin bd-vg-thin -L 1000M
Rounding up size to full physical extent 4.00 MiB
Logical volume “lvol0″ created

lvdisplay shows the thin pool
[root@bharata ~]# lvdisplay bd-vg-thin
— Logical volume —
LV Name                       lvol0
VG Name                      bd-vg-thin
LV UUID                        HVa3EM-IVMS-QG2g-oqU6-1UxC-RgqS-g8zhVn
LV Write Access            read/write
LV Creation host, time bharata, 2013-11-26 16:39:06 +0530
LV Pool transaction ID  0
LV Pool metadata          lvol0_tmeta
LV Pool data                  lvol0_tdata
LV Pool chunk size       64.00 KiB
LV Zero new blocks     yes
LV Status                      available
# open                          0
LV Size                          1000.00 MiB
Allocated pool data     0.00%
Allocated metadata     0.88%
Current LE                   250
Segments                     1
Allocation                     inherit
Read ahead sectors     auto
– currently set to         256
Block device                253:9

- Create the BD volume

Create a POSIX directory first
[root@bharata ~]# mkdir /bd-meta-thin

Create and mount the volume
[root@bharata ~]# gluster volume create bd-thin bharata:/bd-meta-thin?bd-vg-thin force
[root@bharata ~]# gluster volume start bd-thin
[root@bharata ~]# gluster volume info bd-thin

Volume Name: bd-thin
Type: Distribute
Volume ID: 27aa7eb0-4ffa-497e-b639-7cbda0128793
Status: Started
Xlator 1: BD
Capability 1: thin
Capability 2: offload_copy
Capability 3: offload_snapshot
Number of Bricks: 1
Transport-type: tcp
Bricks:
Brick1: bharata:/bd-meta-thin
Brick1 VG: bd-vg-thin
[root@bharata ~]# mount -t glusterfs bharata:/bd-thin /mnt

- Create a file that is backed by a thin LV

[root@bharata ~]# ls /mnt
[root@bharata ~]#

Creating a file that is mapped to a thin LV is a 2 step operation. First the file should be created on the mount point and a specific extended attribute should be set to map the file to a thin LV.

[root@bharata ~]# touch /mnt/thin-lv
[root@bharata ~]# setfattr -n “user.glusterfs.bd” -v “thin:256MB” /mnt/thin-lv

Now /mnt/thin-lv is a thin provisioned file that is backed by a thin LV.
[root@bharata ~]# lvdisplay bd-vg-thin
— Logical volume —
LV Name                        lvol0
VG Name                       bd-vg-thin
LV UUID                         HVa3EM-IVMS-QG2g-oqU6-1UxC-RgqS-g8zhVn
LV Write Access            read/write
LV Creation host, time bharata, 2013-11-26 16:39:06 +0530
LV Pool transaction ID 1
LV Pool metadata         lvol0_tmeta
LV Pool data                 lvol0_tdata
LV Pool chunk size       64.00 KiB
LV Zero new blocks     yes
LV Status                      available
# open                         0
LV Size                         1000.00 MiB
Allocated pool data    0.00%
Allocated metadata    0.98%
Current LE                  250
Segments                    1
Allocation                    inherit
Read ahead sectors   auto
– currently set to        256
Block device               253:9

— Logical volume —
  LV Path                     /dev/bd-vg-thin/081b01d1-1436-4306-9baf-41c7bf5a2c73
LV Name                        081b01d1-1436-4306-9baf-41c7bf5a2c73
VG Name                       bd-vg-thin
LV UUID                         coxpTY-2UZl-9293-8H2X-eAZn-wSp6-csZIeB
LV Write Access            read/write
LV Creation host, time bharata, 2013-11-26 16:43:19 +0530
LV Pool name                 lvol0
LV Status                       available
# open                           0
  LV Size                     256.00 MiB
Mapped size                  0.00%
Current LE                    64
Segments                      1
Allocation                      inherit
Read ahead sectors     auto
– currently set to          256
Block device                 253:10

As can be seen from above, creation of a file resulted in creation of a thin LV in the brick.

Snapshots and clones

BD xlator uses LVM snapshot and clone capabilities to provide file level snapshots and clones for files on GlusterFS volume. Snapshots and clones work only for those files that have been already mapped to an LV. In other words, snapshots and clones aren’t for Posix-only file that exist on BD volume.

Creating a snapshot

Say we are interested in taking snapshot of a file /mnt/file that already exists and has been mapped to an LV.

[root@bharata ~]# ls -l /mnt/file
-rw-r–r–. 1 root root 268435456 Nov 27 10:16 /mnt/file

[root@bharata ~]# lvdisplay bd-vg
— Logical volume —
LV Path                        /dev/bd-vg/abf93bbd-2c78-4612-8822-c4e0a40c4626
LV Name                      abf93bbd-2c78-4612-8822-c4e0a40c4626
VG Name                      bd-vg
LV UUID                        HwSRTL-UdPH-MMz7-rg7U-pU4a-yS4O-59bDfY
LV Write Access            read/write
LV Creation host, time bharata, 2013-11-27 10:16:54 +0530
LV Status                      available
# open                          0
LV Size                          256.00 MiB
Current LE                   64
Segments                     1
Allocation                     inherit
Read ahead sectors    0
Block device                253:6

Snapshot creation is a two step process.

- Create a snapshot destination file first
[root@bharata ~]# touch /mnt/file-snap

- Then take the actual snapshot
In order to create the actual snapshot, we need to know the GFID of the snapshot file.

[root@bharata ~]# getfattr -n glusterfs.gfid.string  /mnt/file-snap
getfattr: Removing leading ‘/’ from absolute path names
# file: mnt/file-snap
glusterfs.gfid.string=”bdf74e38-dc96-4b26-94e2-065fe3b8bcc3″

Use this GFID string to create the actual snapshot
[root@bharata ~]# setfattr -n snapshot -v bdf74e38-dc96-4b26-94e2-065fe3b8bcc3 /mnt/file
[root@bharata ~]# lvdisplay bd-vg
— Logical volume —
LV Path                         /dev/bd-vg/abf93bbd-2c78-4612-8822-c4e0a40c4626
LV Name                       abf93bbd-2c78-4612-8822-c4e0a40c4626
VG Name                      bd-vg
LV UUID                        HwSRTL-UdPH-MMz7-rg7U-pU4a-yS4O-59bDfY
LV Write Access            read/write
LV Creation host, time bharata, 2013-11-27 10:16:54 +0530
LV snapshot status   source of bdf74e38-dc96-4b26-94e2-065fe3b8bcc3 [active]
LV Status                       available
# open                           0
LV Size                           256.00 MiB
Current LE                   64
Segments                      1
Allocation                      inherit
Read ahead sectors     0
Block device                 253:6

— Logical volume —
LV Path                        /dev/bd-vg/bdf74e38-dc96-4b26-94e2-065fe3b8bcc3
LV Name                      bdf74e38-dc96-4b26-94e2-065fe3b8bcc3
VG Name                      bd-vg
LV UUID                        9XH6xX-Sl64-uNhk-7OiH-f91m-DaMo-6AWiBD
LV Write Access            read/write
LV Creation host, time bharata, 2013-11-27 10:20:35 +0530
LV snapshot status  active destination for abf93bbd-2c78-4612-8822-c4e0a40c4626
LV Status                      available
# open                          0
LV Size                          256.00 MiB
Current LE                   64
COW-table size             4.00 MiB
COW-table LE               1
Allocated to snapshot  0.00%
Snapshot chunk size    4.00 KiB
Segments                      1
Allocation                      inherit
Read ahead sectors     auto
– currently set to          256
Block device                 253:7

As can be seen from the lvdisplay output, /mnt/file-snap now is the snapshot of /mnt/file.

Creating a clone

Creating a clone is similar to creating a snapshot except that “clone” attribute name should be used instead of “snapshot”.

setfattr -n clone -v <gfid-of-clone-file> <path-to-source-file>

Clone in BD volume is essentially a server off-loaded full copy of the file.

Concerns

As you have seen, creation of block device backed file on BD volume, creation of snapshots and clones involve non-standard steps including setting of extended attributes. These steps could be cumbersome for an end user and there are plans to encapsulate all these into nice APIs that users could use easily.


पक्षिणः नीडम्

November 3, 2013
मम गृहस्य पाकशालायां chimney यन्त्रः अस्ति। तस्मात् यन्त्रात् एका नालिका गृहस्य बहिर्गच्छति | तया नालिकया पचनसमये उद्भवः वायुः बहिः प्रसरति | एकदा अहं गृहस्य बहिर्भागतः तां नालिकां प्रवेशं कुर्वन्तं पक्षिणं दृष्टवान् | तत्क्षणमेव मया अवगतं – यत् नालिकायां नीडस्य निर्माणं कर्तुं पक्षिणः इच्छा अस्ति इति | प्रतिदिनं पचनसमये नालिकया उष्णवायुः आगच्छति, अतः एतत् स्थलं नीडनिर्माणार्थम् उचितं नास्त्येव इति मम अभिमतमासीत् | पक्षिणः कार्यभङ्गं कर्तुं यदा यदा सः नालिकां प्रविशति, तदा तदा अहं यन्त्रचालनं कृतवान् | किन्तु पक्षिणः निश्चयमचलमासीत् | तेन नीडनिर्माणकार्यं न स्थगितमेव | अतः अहमेव पराजयं स्वीकृत्य पाकशालायां अनिर्दिष्टकालपर्यन्तं यन्त्रचालनं न करणीयमिति मात्रे पत्न्यै च सूचनां दत्तवान् |
IMG_4060
IMG_4063

अल्पाकारयुतस्य (४ अङ्गुलि) अस्य खगस्य नाम scaly breasted munia इति आसीत् | द्विवासरपर्यन्तं प्रतिदिनं प्रतिक्षणं तृणमानीय पक्षिणौ मातापितरौ नीडनिर्माणं कृतवन्तौ | नीडस्य मुखभागमेव नालिकायाः बहिः दृश्यते स्म | बालखगान् द्रष्टुमस्माकमाशा आसीत् किन्तु मासानन्तरं काञ्चिदपि खगान् वयं न दृष्टवन्तः | प्रायश: बालखगैः सह मातपितरौ नीडं त्यक्तवन्तौ इति वयं अचिन्तयन् |

IMG_4073

किञ्चित् कालानन्तरं यन्त्रस्य वार्षिकसेवासमये (yearly service time) यदा नालिकया नीडमाकृष्ट्ं तदा नीडस्य मात्रं दृष्ट्वा अत्याश्चर्यमभवत् | ४ अङ्गुलि लम्भस्य पक्षिणः नीडं ३२ अङ्गुलि आसीत् !

IMG_4396
Disclaimer:
संस्कृतं न जानामि न जानामि पाणिनिम्।
पदार्थमपि  न जानामि क्षमस्व वागीश्वरि॥


Follow

Get every new post delivered to your Inbox.