Friday, December 10, 2010

File Systems

First I'd like to thank Henry for sending me the ebook for I could not have finished this blag post without it and that's it.

The partitioning and file systems is the current chapter. Beginning talks of the basics such as logical partitions and swap. According to the book fdisk is the most popular partitioning tool and I can't disagree.

To edit the device that you want you would use fdisk /dev/device_here. It shows how to partition a machine and it's funny how at the end of that it says "This works only on a machine that you are destructively partitioning for an installation". Whoops! Anyways...

fdisk -l lists your partition tables. Here's an part of an output from a computer of mine.

Device Boot Start End Blocks Id System
/dev/sda1 * 1 8486 68160928+ 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 8486 60801 420223041+ f W95 Ext'd (LBA)
/dev/sda5 8486 34692 210500608+ 7 HPFS/NTFS
/dev/sda6 34692 34756 512000 83 Linux
/dev/sda7 34756 60801 209207296 8e Linux LVM

It's actually very screwey but as you can tell sda1 is the boot partition and it's windows, sda2 is a second windows partition, sda5 is a logical partition (always starts at 5) I thought I deleted long ago... and the last one as you can tell is the Fedora partition.

Last part I got to was superblocks and inodes. A superblock is basically a block of data (36 bytes) containing the file system size, location, number of inodes, and disk usage. There are many of them throughout the device occuring every 8192 blocks. They are important because if part of a disk is corrupted and a superblock is part of it you still have other ones to fall back on.

Inodes are assigned to a file when it's created. They are pointers to disk bocks, groups of eight, and the indoe is assigned to the block group in front of it. There are only a limited amount of indoes with only three sizes available when you create a file system.

1024KB
2048KB
4096KB

Smaller means more inodes. You could run out of inodes and still have hard drive space but you wouldn't be able to use it. So when you are creating the file system you can use mkfs with one of three switches.

news-Indoes are 4KB per block
largefile-1MB per block
largefile4-4MB per block

largefile4 should only be used for databases.

My journey ends around the mkfs command which is what you use to make the file system and there are many file systems to choose from. That's all for now.

Wednesday, December 8, 2010

End of Hardware

In the chapter it talks quite a bit about the Point to Point Protocol. Using it's examples if you want to make a PPP link you would use a script that looks like.

chat " " ATZ OK ATDT5558080 CONNECT " " login: username word: password Mind you this is all about modems which is pretty much irrelevant these days but I'm assuming that they want us to know this...

Chat wakes up the modem, ATZ resets it, ATDT and CONNECT dial the number and then the login and password prompts are used for logging in.

Still not done. After that you must establish networking (chat just opens up the connection) by using pppd (point to point daemon). Another example.

pppd /dev/cua1 57600 crtscts defaultroute

ppd /dev/cua1 changes the interface over to a PPP connection and sets up networking. 57600 specifies the estimated speed and no that is not kilobytes, it's baud. crtscts performs a "handshake" and defaultroute sets the default gateway to the remote machine's IP. I obviously couldn't test any of this like the previous commands so I'm just going to have to go with their word.

Apparently the LPIC assumes you have servers with SCSI so...

The SCSI bus type determines the density of the devices so 8-bit SCSI is eight devices and 16-bit 16 devices. The number that you associate (1 -7 or 1-15) determines the priority it gets accessing the SCSI bus. Usually the highest number is the highest priority.

Any info on SCSI devices on your machine can be found in /proc/scsi/scsi and then the chapter abruptly ends. I took the exam after that and got an 8/10 which I think is pretty good.

Monday, December 6, 2010

Today

I'm going to read more of LPIC as usual which this week involves finishing up the hardware chapter. We're going to get this done by January since we all decided to get the exam finished to "prove" that we are actually working and so that we have time to focus on getting the lab fully autonomous if you will. Hopefully after that it will require no intervention at all until the time comes to upgrade... But we'll be long gone by then :D Just kidding. I think Devin and Jason will have enough of a handle on things to take care of the lab.