Skip to content

LVM and Large Disks

I don’t do this often enough, and I have a terrible memory, so I’m going to commit this here.

Today, I needed to create an xfs file system on a linux server. The disk was attached over iscsi, and was presented as multiple raid arrays, each array greater than 2TB. So, the way to deal with this is to use GNU’s parted tool, and create a GPT label. The built in fdisk can only do EFI and that’s not going to cut it here.

For each raided disk :

# parted /dev/sda
GNU Parted 2.1
Using /dev/sda
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) mklabel gpt
Warning: The existing disk label on /dev/sda will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? YEs
(parted) print
Model: NEXSAN SATABeast2 (scsi)
Disk /dev/sdg: 16.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags

(parted) unit TB
(parted) mkpart primary 0.00TB 16.00TB
(parted) print
Model: NEXSAN SATABeast2 (scsi)
Disk /dev/sdg: 16.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 0.00TB 16.0TB 16.0TB primary

(parted) quit
Information: You may need to update /etc/fstab.

Ok, that’s done then. Now, to work on the LVM. There’s an excellent howto in the references section below, but here’s the basic commands I use :

# pvcreate /dev/sda1 /dev/sdb1 /dev/sdc1
# vgcreate vg_photographs /dev/sda1 /dev/sdb1 /dev/sdc1 <--- vg_photographs being the volume group name
# lvcreate --name lv_photodisk --size 40T vg_photographs <--- lv_photodisk being the logical volume name. Also, 40TB is the size of all raid disks combined

Now, we create an xfs file system :

# mkfs.xfs /dev/vg_photographs/lv_photodisk

# mount /dev/vg_photographs/lv_photodisk /mnt/photos

Anddddd, done.

Now, to extend the file system because 40TB just isn't enough for your photos. Do the parted thing again for the new disk :

# parted /dev/sdd

And the LVM pieces too :

# pvcreate /dev/sdd1
# vgextend vg_photographs /dev/sdd1

Now, run :

# vgdisplay --verbose

And from the output, add up all the X and Y pieces :

...snip...
Total PE / Free PE X / 0
...snip...
Total PE / Free PE Y / Y
...snip...

The total space of the disk is going to be X+Y

# lvextend -l 40060959 /dev/vg_photographs/lv_photodisk

And finally, grow the file system :

# xfs_growfs /mnt/photos

You can do a df to check but it should be pretty good at this point.

H.

Ref :

1) Linux LVM Howto
2) Growing XFS in LVM
3) GNU Parted

Picking Up Women, Dutch Style

YouTube Preview Image

First I thought it was Rums. But Pritham won’t even ride a bike like this, so it can’t be her.

H.

Chicken Fry

Ingredients

1 ) Chicken – 2 kg
2 ) Garlic – 4 cloves
3 ) Ginger – small piece
4 ) Dry Red Chilli – 4
5 ) Shallots – 10
6 ) Turmeric – 1 tsp
7 ) Chilli Powder – 2 tsp
8 ) Pepper – 1 tsp
9 ) Vegetable Oil – 3 cups
10) Curry Leaves – 15 leaves

Method

1 ) Cut the chicken and rub it with fresh lemon juice.
2 ) Grind the shallots, ginger, garlic and red chilli into a paste, and rub it on the chicken.
3 ) Add salt, pepper, turmeric and chilli powder.
4 ) Marinate for 30 minutes.
5 ) Fry in vegetable oil.
6 ) Take the chicken out.
7 ) Take 4 Tbsp of the that oil and fry 2 cloves garlic, and three medium onions, a little ginger, and some green chillies.
8 ) Once the onions are fried, add the chicken back along with some curry leaves, and roast it again.

From a recipe shown on TV.

H.

Tuthukudi Meen (Anchovy Curry) Kozhambu

Saw this on TV today. Thought I’d jot it down because I want to try this soon. It has to be made in a clay pot (Cheena chatti – Chinese vessel)

Ingredients :

1) Tamarind pulp – 1 lime size
2) Coconut shreds – 1 cup
3) Chilli powder – 1.5 Tbsp
4) Corriander powder – 2 Tbsp
5) Cumin powder – 1 Tbsp
6) Shallots – 6
7) Turmeric powder – 1 Tbsp
8 ) Mustard seeds – 1 Tbsp
9) Anchovies – 0.75 kg/1.5 lb
10) Tomatoes – 1, diced
11) Chillies – 3, cut length wise
12) Mango – 1 small, cut julianne
13) Garlic – 6 pods
14) Sesame oil – 2 Tbsp
15) Curry leaves – 1 handful
16) Fenugreek seeds – 1 pinch
17) Salt – 1.5 tsp

Method :

1) Take a lime sized tamarind pulp and put it in about a cup and a half of warm water. After about 5 minutes, take the pulp out and pour the water into the clay pot and put it on the fire, medium heat.

2) Put the coconut shreds, corriander powder, chilli powder, cumin powder, 3 shallots and the turmeric powder in a blender and make it a paste. Put that paste into the tamarind water. Stir for a minute or so, and taste the mix. It should taste a little sweet. If not, something’s off because the sour and the spicy components should combine to make the mix a little sweet.

3) Let the mix boil. When it’s boiling for about 5 minutes, add the fish, and then add salt. Don’t put the salt on the fish because this fish absorbs salt, so it’s better to add it to the curry.

4) Keep on the fire for another 10 minutes.

5) Add the tomatoes, chillies and the mango.

6) In another vessel, fry the mustard, fenugreek seeds and 3 shallots in the sesame oil. When the oil is really hot, add the curry leaves.

7) Crush the pods of garlic and add it to the curry.

8 ) Add the fried items to the curry.

9) Keep in low heat for about 30-40 minutes, and then keep aside for a few hours. The curry tastes best after a few hours.

H.

What a Plan

I’m not much of a gamer, but you don’t need to be one to appreciate this.

YouTube Preview Image

H.

Bitchin New Song

Why this Kolaveri di?

YouTube Preview Image

H.

A Birthday and a Death

On Papa’s birthday, a dear friend’s dad passed away. Joe, Matt, Leo, Tykes and Okasan, I sorry for your loss. The cedar tree may have fallen, but it’s fragrance will endure.

H.

Bike Share Program in Bangalore

YouTube Preview Image

Just super. I really hope these guys succeed. I just talk the talk, but these guys are walking the walk.

More here

H.

Egregious

I wanted to get the definition of the word, so I looked in Apple’s in-built dictionary –

egregious |i?gr?j?s|
adjective
1 outstandingly bad; shocking : egregious abuses of copyright.
2 archaic remarkably good.

DERIVATIVES
egregiously adverb
egregiousness noun
ORIGIN mid 16th cent. (sense 2): from Latin egregius ‘illustrious,’ literally ‘standing out from the flock,’ from ex- ‘out’ + grex, greg- ‘flock.’ The derogatory sense (late 16th cent.) probably arose as an ironical use.

WTF. (1) and (2) are complete opposites of each other !

Can I get away by using it either way?

H.

Woot T-Shirt Creation

YouTube Preview Image

I do the same thing when I make t-shirts. Only it’s all hand done, so the quality is a little crappier.

H.

Pitt Artist Pen

I have this pen :

http://www.behance.net/gallery/Faber-Castell/2267302

But I’m not even going to attempt the art. It’s just amazing.

H.

Green Card

My quest for a green card in the US continues, with my wait for my priority date to become current. For the category that my green card has been applied for (EB3-India), the current processing date is 22/July/2002. My priority date is 20/Nov/2009. I found this priority date calculator that tells me approximately when I’ll be able to get my green card based on the current speed, and with no immigration reform. This is what came up –

GC

I knew it would be a long time, but frankly, this was quite disheartening. I’ll be 46 years old by that time, and on my 8th H1B. It’s not worth it.

Ironically, if USC were to apply for my green card under the EB2 category (which I am eligible for as I have a Master’s degree), my priority date would become current on 18/Jun/2012. Thanks USC. Really…

H.

Great Ad

I love this ad. Kind of reminds me of school. Not that there were parties or anything. I never got into the school team, although I was good enough. Maybe my “spin” wasn’t top class :)

H.

Why I ALWAYS Cut the Plastic

Unfortunately most people don’t.

H.

Tourism in US and Canada

I was in Vancouver for the weekend, and Rash and I went to Vancouver island with her folks. It was interesting because of the contrasting experience of any touristic venture in the US. In the US, when you go to any place, you see a lot of Indians (almost all of them reside in the US). So many that I start playing mental games like how many of them are from Infosys or Wipro etc (they have work-branded backpacks often, so it’s not that hard to make the leap). The number of Japanese tourists in the US is on the decline, but you still see them. The peak season to see them though is Jan through March. The number of Chinese tourists (like from mainland China) is almost negligible.

Now, in Canada, the Indians and the Chinese flip spots. Lots of Chinese from mainland China. They are loud, and sort of aggressive when it comes to hogging the best camera angles. I don’t hold it against them. Indians and Chinese come from lands where there are just way too many people, and if you are not a little bit aggressive, it’s hard to function in society. There are some Japanese tourist, and very very few Indians. Most Indian tourists there are either new immigrants to Canada, or are born Canadians.

If the US is bankrupt, maybe a good strategy is to open up the tourist visas for Chinese and Indians. Those lands are sitting on some money these days, and are looking for ways to spend it. As an Indian, I can confidently say that there are a LOT of Indian kids that want to visit disneyland, and a lot of parents that are willing to bring their kids to the US to show them Mickey Mouse. Just that Uncle Sam refuses to give them a visa to do so.

So True

Just Right

I wish I had drawn this.

H.

1928 Los Angeles Transit Map

1928 Transit Map of LA

The map is pretty cool. In 1928, there was a way to get to Santa Monica from USC by train. In 2011, they are still struggling to recreate that.

H.

Defcon

Just got back from Defcon. This year, they moved to the Rio. That was an improvement. But the badge situation was just the same. Same old long ass lines, and the badges finishing in 2 hours. It’s ridiculous. Also, not putting the whole map of the conference area was a big mistake.

That said, things dramatically improved after the initial hiccups. Once the talks started, Friday, Saturday and Sunday were near flawless (oh, just the part where you didn’t have the most popular speakers in the right room sucked). And the talks were the best I’ve seen in years.

Overall, best Defcon that I’ve attended. Now, I have to start working on some of the things I found out there. Some seriously scary stuff that needs to be taken care of.

H.

DSL Speed

Now that I have had this internet connection for a few days, I thought I’d do another test to see if the speed is consistent. Seems so…

H.

Promotion

Somebody got promoted today. And no, it wasn’t me.

H.