Category Archives: Uncategorized

Building a RAID 5 Storage System using Linux

Posted on by .

RAID improves storage performance and storage is important, but what’s more important is the data that is being contained. So I’ve decided to build a proof of concept in a Visualized en environment before hitting the real thing.

so after “installing” your disk, check for your disks using this command

fdisk -l

You’ll see things like this

Disk /dev/sdb: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 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

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/sdc: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 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

Disk /dev/sdc doesn't contain a valid partition table

Disk /dev/sdd: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 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

Disk /dev/sdd doesn't contain a valid partition table

Make sure that these are the drives that you’re going to work on for the RAID.

Now create a new partition (in this case the partition is going to be on /dev/sdb)

fdisk /dev/sdb

Press ‘n’ for new partition

n

Press ‘p’ for primary partition and ‘1’ for the 1st partition

p
1

After creating partitions change it to lo Linux raid auto detect

Press ‘t’ to change partition type

t

Press ‘fd’ to change it to “Linux RAID auto”

fd

Press ‘w’ to save and write the configuration

w

Repeat the above steps for the other hard disks also.

After getting the partitions up, it’s time to build the raid and it’s a simple 1 liner. 🙂

mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sdb1 /dev/sdc1 /dev/sdd1

Then you persist the RAID settings into a mdadm.conf file using this

mdadm --detail --scan >> /etc/mdadm.conf

Then it’s time to format the new RAID

mkfs.ext4 /dev/md0

Then it’s time to mount somewhere create a directory

mkdir -p /mnt/raid
mount /dev/md0 /mnt/raid

After that find the UUID of the raid device

ls /dev/disk/by-uuid -alh

Then add it into /etc/fstab by editing the file using a text editor like vim

vim /etc/fstab

add this line at the end of the file

UUID=<<YOUR UUID>> /mnt/raid ext4 defaults 0 0

And there you have it! a RAID 5 storage system ready to be used! 🙂

Do take note that RAID is not a backup, it is merely redundant storage with performance. You’ll still have to backup regularly into another drive which I’ll touch on later.

 

 

IS3241 – Reading Log – Why We Blog?

Posted on by .

Where else a better place than my own blog to share my log on “Why We Blog?”

Summary

People write blogs to document their lives, provide commentary and opinions, express deeply felt emotions, articulate ideas through writing, and form and maintain community forums. This article primarily looks at the motivation of a sample of ordinary blogger (non-celebrity bloggers) on how these bloggers use blogging as a form of personal communication and expression on a specific interest.

The authors of this paper interviewed 23 bloggers and analyzed the content of their blogs. There are 3 primary ways that the bloggers linked with each other. (1) Finding blogs through other blogs, (2) word of mouth by friends/colleagues and (3) a blog link on IM profile or homepage. Bloggers blog at different rates, covering a wide range of topics and can experience burnouts. Most bloggers knew who their readers were and practices self-censorship on what to reveal and what not to.

There are 5 major motivations for blogging. (1) Blogs to “document my life”, (2) Blogs as commentary, (3) Blog as catharsis [To purge emotions], (4) Blog as muse (Writing down thoughts to see them) and (5) Blogs as community forums (collaboration).

Blogging can be considered an unimportant e-mail broadcast as people usually access them at their own free will. Contrary to belief, blogs usually have little or no comments by their readers as replies are not expected, unlike an e-mail.

My Applications

Blogging is a good form of communication, especially if carried out as a community (i.e. groups, classmates). This is because people can get to understand each other better. By going to someone’s blog, one can actually tell what motivates the person to blog and sometimes what’s on his/her mind.

I didn’t approve the concept of blogging initially, until I found myself in a community of bloggers (classmates) who maintain personal blogs. I started to blog, initially to leave a digital footprint on the current life for future reading, comment on some stuff that I found amusing (like writing analogies) then to purge some emotions because I needed an avenue to vent off steam. However, after the disbanding from the community, I found myself blogging less, so do the rest of the community. Maybe because we just cross the stage of adolescence or may be because of newer social platforms to express ourselves (Facebook and Twitter) or maybe we all started to find blogging a chore; this online community of mine just vanished.

However, I still find blogs an important tool to share thoughts. Facebook is too informal and Micro-Blogging Twitter is too limited to develop a real idea and share it. Blogging is a simple tool to share the latest info on yourself, your company, an event (upcoming or follow up). Blogs are good in a way that it allows a very good monologue with enough details and ideas to be brought across.

On the other hand, blogging can have an adverse effect too. Some things that are put up in blogs can be cached in search engine’s databases and take months before the caches are purged. Some posts that are undesirable or hurtful could haunt the affected person for quite some time (remember racist blogs?). Other times like when searching up people, like a recruiting company looking up a potential candidate, the blog might show a undesirable side of a candidate no matter how great the credentials are.

Like many other social platforms, your personal blog defines who you are and what you cared about. Having such a space on the internet could be a double edged sword and should be carried out carefully. Some degree of censorship should be practiced in order to prevent oneself from getting into trouble.