Monday, October 17, 2016

Me and "My" GameDoora

So finally I got sometime to write about "my" journey with my Gamedoora. It's been a long time I have written something and yeah I wanted to write something about Gamedoora since long time but "lots of excuses" came as a blocker. 

Let's start about GameDoora or like we call it GD in short form. Well if you want to read some marketing related thing or platform functionality related thing then please stop and go back to whatever you are doing because I am not going to talk about that at all, for that we have master and also Guru Gulab Khatri (don't know when he will have time for GD).

How GD was born?

GD "actually" (not mera boyfriend hai wala actually) came out of few crazy people's mind who thought that GameDoora the company or platform would be opening doors to the industry which is closed. ( definitely creative industry, and yeah it is closed. I don't see any kind of collaboration in that otherwise I would have thought about making an awesome game from my favourite movie Mohenjo-Daro). Also we all believed that each and every individual has some kind of creative idea in his/her mind but somehow it is not coming out, sometimes because of lack of resources or fear of acceptance of that idea and lots of other reasons and we wanted to provide them a platform where they can come and find the resources, find the collaboration from like minded people and boom give life to their ideas.

Why I am inclined more towards Gamedoora?

What should I say, since childhood all I wanted to do is business ( in Gujarati Dhandho). When I was working as a Medical Representative I wanted to start my own company, same idea came to me when I was system admin. But everytime I was denied due to lack of resources and sessions on the topic "job is safe".    ( Safezone is the more dangerous than friendzone, because it makes you handicap from your mind.) .Then one fine day I met a master yoda kind figure who is also my master Mr. Devang Parikh and he just threw the idea of GD to me and I remember I was like I will work after hours ( as I was insomniac at that time) and I would do anything to be a part of this venture and I was in. Because he and I have same motto, there is always a place for the family. As my previous manager, mentor and master I listens to him very carefully because he has mastered an art of "how to tackle people with different mindsets". (In my case I would just say GTFO to the people I don't like.) 

Along with above typical Gujarati business desire one more thing which is keeping me attached to GD is lots of stories I read/heard till date. Well I believe when it comes to story or theme of a game/animation project we have lots and lots of characters and well written novels/books. As an example as a kid I was always thinking about making animation based on "Cheeku" from champak comics and definitely first love was panchtantra stories. 

And the most important reason I am loving GameDoora is that I am getting unlimited supply of free beers. ;)

What I have done in GameDoora and what I do at GameDoora?

Honestly nothing yet. I am just a guy checks that server is running fine and site is up and running that's it. In designing and marketing aspects I am Jon Snow ( I know nothing.), so I just keep myself out of that areas. I just like to sit in front of my beast (name of my home pc) checking some code ( again I am Jon Snow in coding too) and try to understand wtf it is going to do and how the hell it consuming this much amount of resources. 

What is the future of GameDoora? or what are your hopes about GameDoora?

I don't hope, I work and As per alchemist “And, when you want something, all the universe conspires in helping you to achieve it.” So I just want lots and lots of success for GameDoora. GameDoora definitely has a potential and it just requires more marketing or in today's words "outreach".

How GameDoora changed your life or in other words how it affected your life?

GameDoora affected my life a lot, my both girlfriends left me alone to suffer in this cruel world and now I am single and blah blah blah. Jokes apart, because of GameDoora I am feeling bit responsible in every aspect of my life. Like take an example I am working on a customer case in my current job and I can really feel his pain when he says my production is down and my users are affected. Also when it comes to wasting money I think twice and think about utilizing same amount somewhere. GD helped me to change my self from always abusing (cursing loudly specifically when angry) to a polite guy who just doesn't give shit about other's shit. 

The main thing GameDoora gave me is feeling responsible for my behaviour in public as well for the people who are attached to me or atleast get affected by actions.

What about family support for GameDoora?

My sister's opinion matters a lot to me and when I told her about GD she was like go for it, at one moment I was hesitant and had doubts in inital stage but she told "If you love GD then you need to stop overthinking and give your best." Dad is still skeptical about GD because as an accountant he only see profit /loss. But to my surprise mom came as rock solid support and said "Do whatever you want to do, so that you don't regret it not doing it.".

Ahh, it's too hectic to write all these things. So now Ravi questioning Dave session is over, it's time for Manchester United v/s Liverpool and GGMU. Will be back someday with other stories related to GameDoora or Sidrav (I am definitely serious about it) or if I have any food business.

Tuesday, September 11, 2012

Fdisk and parted

>>  Why Fdisk is unable to create more than 2 TB partition and how GNU parted works for it?

* Fdisk will not allow you to craete a partition more than 2 TB and give you following errors. This is mostly because of old PCDOS disk label used on disks. The problem is not with fdisk but it it the limitations of PCDOS disk label. As fdisk does not work with drives that use GPT; thus, we need to use a different partitioning tool. The usual recommendation to Linux users is GNU parted.

[root@rockie ~]# fdisk /dev/sdb
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: The size of this disk is 5.9 TB (5908688535552 bytes).
DOS partition table format can not be used on drives for volumes
larger than (2199023255040 bytes) for 512-byte sectors. Use parted(1) and GUID
partition table format (GPT). Creating 2TB partition using Fdisk

The size of the disk in this example is roughly 6 TB. You can still create a partition in this disk for 2TB using fdisk as shown below.

[root@rockie ~]# fdisk /dev/sdb1
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): 1
First cylinder (1-718357, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-267349, default 267349):
Using default value 267349

As you can see above, even though there are 718357 cylinders available on this disk (this is for total of roughly 6TB), the last cylinder value it shows is only 267349 (which is roughly close to 2TB in this example).

So, fdisk has created a partition of 2 TB as shown below (even though the disk size is around 6 TB).

Command (m for help): p

Disk /dev/sdb: 5908.7 GB, 5908688535552 bytes
255 heads, 63 sectors/track, 718357 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x3dffd626

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      267349  2147480811   83  Linux
Set Partition Table to GPT using Parted mklabel

In our case, we need to create a partition >2TB. So, we should use parted command.

Before creating the partition command, we should set the disk label to GPT.

GPT stands for GUID partition table format (GPT).

* Use parted’s mklabel command to set disk label to GPT as shown below.

[root@rockie ~]# parted /dev/sdb
GNU Parted 2.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) print
Error: /dev/sdb: unrecognised disk label

(parted) mklabel gpt

(parted) print
Model: Unknown (unknown)
Disk /dev/sdb: 5909GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Use parted’s mkpart command as shown below to create partition that is greater than 2TB. In this example, we are creating a partition that is roughly of 6TB in size.

[root@rockie ~]# parted /dev/sdb

(parted) mkpart primary 0GB 5909GB

(parted) print
Model: Unknown (unknown)
Disk /dev/sdb: 5909GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      1049kB  5909GB  5909GB               primary
To understand how to use parted command effectively, refer to: man parted

Just for curiosity, let us see how this >2TB partition is displayed in fdisk. As you see below, it still shows the size as roughly 2TB (under the Blocks columns). However there is a + at the end indicating that this is greater than 2TB. The System column displays “GPT”.

[root@rockie ~]# fdisk /dev/sdb

Command (m for help): print

Disk /dev/sdb: 5908.7 GB, 5908688535552 bytes
255 heads, 63 sectors/track, 718357 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      267350  2147483647+  ee  GPT

Use mkfs to format the partition. This will take some time depending the size of the partition. You’ll see that it is “Writing inode tables” and the counter will keep increasing. In this example, it roughly took around 15 minutes to complete the mkfs.

[root@rockie ~]# mkfs /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
360644608 inodes, 1442550528 blocks
72127526 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
44024 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
        102400000, 214990848, 512000000, 550731776, 644972544

Writing inode tables:  3955/44024
Writing inode tables:  5022/44024
Writing inode tables:  7218/44024
Writing inode tables: done
Writing superblocks and filesystem accounting information: done

Monday, September 10, 2012

What is Parity in RAID?

>>  A parity bit is a bit that is added to ensure that the number of bits with the value one in a set of bits is even or odd. Parity bits are used as the simplest form of error detecting code.

>>  Parity data is used by some RAID levels to achieve redundancy. If a drive in the array fails, remaining data on the other drives can be combined with the parity data (using the Boolean XOR function) to reconstruct the missing data.

For example, suppose two drives in a three-drive RAID 5 array contained the following data:

Drive 1: 01101101
Drive 2: 11010100
To calculate parity data for the two drives, an XOR is performed on their data:
XOR 11010100

The resulting parity data, 10111001, is then stored on Drive 3.

Should any of the three drives fail, the contents of the failed drive can be reconstructed on a replacement drive by subjecting the data from the remaining drives to the same XOR operation. If Drive 2 were to fail, its data could be rebuilt using the XOR results of the contents of the two remaining drives, Drive 1 and Drive 3:

Drive 1: 01101101
Drive 3: 10111001
as follows:
XOR 01101101

The result of that XOR calculation yields Drive 2's contents. 11010100 is then stored on Drive 2, fully repairing the array. This same XOR concept applies similarly to larger arrays, using any number of disks. In the case of a RAID 3 array of 12 drives, 11 drives participate in the XOR calculation shown above and yield a value that is then stored on the dedicated parity drive.