<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>33dots &#187; Cent OS</title>
	<atom:link href="http://www.33dots.com/index.php/category/centos/feed" rel="self" type="application/rss+xml" />
	<link>http://www.33dots.com</link>
	<description></description>
	<lastBuildDate>Thu, 09 Sep 2010 05:19:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mount an .iso image in linux</title>
		<link>http://www.33dots.com/index.php/linux/mount-an-iso-image-in-linux.html</link>
		<comments>http://www.33dots.com/index.php/linux/mount-an-iso-image-in-linux.html#comments</comments>
		<pubDate>Thu, 09 Sep 2010 05:19:08 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Cent OS]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.33dots.com/?p=275</guid>
		<description><![CDATA[I just wanted to extract the USB boot image from the .iso of the CentOS DVD image that i downloaded.
Now i mounted it by

[root@localhost ~]# mkdir /mnt/iso
[root@localhost ~]# mount /home/dloads/CentOS-5.2-i386-bin-DVD.iso /mnt/iso/ -t iso9660 -o loop,ro
ro mounts it read only so that we dont accidentally make no changes.
loop is required to mount it as a loop [...]]]></description>
			<content:encoded><![CDATA[<p>I just wanted to extract the USB boot image from the <code>.iso</code> of the CentOS DVD image that i downloaded.</p>
<p>Now i mounted it by
<pre>
[root@localhost ~]# mkdir /mnt/iso
[root@localhost ~]# mount /home/dloads/CentOS-5.2-i386-bin-DVD.iso /mnt/iso/ -t iso9660 -o loop,ro</pre>
<p><code>ro</code> mounts it read only so that we dont accidentally make no changes.<br />
<code>loop</code> is required to mount it as a loop device (so as to access the file as a block device).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.33dots.com/index.php/linux/mount-an-iso-image-in-linux.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resized my root filesystem online</title>
		<link>http://www.33dots.com/index.php/linux/resized-my-root-filesystem-online.html</link>
		<comments>http://www.33dots.com/index.php/linux/resized-my-root-filesystem-online.html#comments</comments>
		<pubDate>Fri, 26 Feb 2010 17:32:25 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Cent OS]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.33dots.com/?p=252</guid>
		<description><![CDATA[Wanted to increase the size of my root filesystem. I have my CentOS 5.3 in an LVM
[tony@localhost ~]$ df -h /
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/CentOsVG-RootLV
16G   11G  3.8G  75% /

Decided to use a less used NTFS partition. (i [...]]]></description>
			<content:encoded><![CDATA[<p>Wanted to increase the size of my <em>root</em> filesystem. I have my CentOS 5.3 in an <a href="http://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux)" title="Wikipedia article on LVM">LVM</a></p>
<pre>[tony@localhost ~]$ df -h /
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/CentOsVG-RootLV
16G   11G  3.8G  75% /
</pre>
<p>Decided to use a less used NTFS partition. (i have a Linux/Windows multiboot system)</p>
<p>The steps i did,<br />
<strong>1.</strong> Created a new <em>Physical volume</em> using the spare partition</p>
<pre>[tony@localhost ~]$ su -
Password:
[root@localhost ~]# pvcreate /dev/sda8
Physical volume "/dev/sda8" successfully created
</pre>
<p>Use  <code>pvdisplay</code>  to see the newly created physical volume, if required.</p>
<p><strong>2.</strong> Extended the <em>Volume Group</em> to include this physical volume.</p>
<pre>[root@localhost ~]# vgextend CentOsVG /dev/sda8
Volume group "CentOsVG" successfully extended
</pre>
<p><strong>3.</strong> Now, Enlarge the size of the <em>Logical volume</em> and then the <em>filesystem.</em><br />
I knew i have to use <code>lvextend</code> command, but got confused after reading the man pages, so finally decided to use the Graphical Utiliy. <img src='http://www.33dots.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /><br />
<em>System &gt; Administration &gt; Logical Volume Management</em><br />
Clicked on my volume group and then, the required logical volume and &#8216;<em>Edit Properties</em>&#8216;.<br />
Set the size to use the &#8216;<em>Use Remaining</em>&#8216; and <em>Ok</em><br />
The system prompted for enlarging file system size,  and it was all over!</p>
<p>Later i figured out that i should have used the command,<br />
<code>lvextend  /dev/CentOsVG/CentOsVG-RootLV /dev/sda8</code><br />
or<br />
<code>lvextend  /dev/CentOsVG/CentOsVG-RootLV/ -l +100%FREE</code></p>
<p>And perhaps increase the size of <em>root filesystem</em> by using <code>resize2fs</code></p>
<p>Shouldn&#8217;t this require an <code>umount</code> of the /? And so use a &#8216;rescue environment&#8217; or live CD?<br />
No! Online increase of <em>ext3</em> partitions are available from kernel 2.6.10</p>
<p>Finally checked the size of the root</p>
<pre>[tony@localhost ~]$ df -h /
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/CentOsVG-RootLV
25G   11G   13G  47% /
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.33dots.com/index.php/linux/resized-my-root-filesystem-online.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Linux File System basics</title>
		<link>http://www.33dots.com/index.php/linux/the-linux-file-system-basics.html</link>
		<comments>http://www.33dots.com/index.php/linux/the-linux-file-system-basics.html#comments</comments>
		<pubDate>Mon, 22 Feb 2010 10:08:28 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Cent OS]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.33dots.com/?p=244</guid>
		<description><![CDATA[Each file in a Linux file system (eg, ext2, ext3) is described by an Inode, and every inode is identified by a unique number.
An Inode is a datastructure that describes the blocks of data the file occupies, as well as, metadata about the file like, the file&#8217;s owner and group owner, the file&#8217;s access permissions(eg [...]]]></description>
			<content:encoded><![CDATA[<p>Each file in a Linux file system (eg, ext2, ext3) is described by an <em>Inode</em>, and every inode is identified by a unique number.<br />
An Inode is a datastructure that describes the blocks of data the file occupies, as well as, metadata about the file like, the file&#8217;s owner and group owner, the file&#8217;s access permissions(eg <em>rwx-r&#8211;r&#8211;)</em>, it&#8217;s size in bytes, timestamps telling when the file was created, last modified and last accessed and a count telling how many hard links point to the inode.<br />
It should be noted that the <span style="text-decoration: underline;">filename is not stored in the inode.</span></p>
<p>A File&#8217;s name along with it&#8217;s inode number are stored in special files called directories. In other words, a directory is just another file, which is treated specially by the linux, and it contains a list of filenames along with their inode numbers. All these list of files are assumed to be contained within that directory.</p>
<p>Use <code>ls -i</code> to see the inode numbers of files and directorys .</p>
<pre>[tony@localhost ~]$ ls -ila
total 820
65538 drwx-----x 57 tony tony    4096 Feb 22 12:18 .
65537 drwxr-xr-x  4 root root    4096 Jul  6  2009 ..
65997 drwx------  3 tony tony    4096 Jul  1  2009  adobe
66027 -rw-rw-r--  1 tony tony     352 Feb 18 21:56 .aspell.en.prepl
</pre>
<p>All the inodes of a file system are created at the moment we format the disk (eg, when we use <code>mkfs</code> command). Thus, the maximum number of inodes (and so the maximum number of files) that the filesystem can have, is determined during the filesystem&#8217;s creation itself.<br />
These inodes are all kept together in inode tables towards the beginning of the partition. The inode tables usually occupy about 1% of the partition&#8217;s space when using the default settings.<br />
The decision as to how many inodes to create is made on Linux using an algorithm. The default setting creates an inode for every 2K bytes contained in the filesystem, but the number can be adjusted by the user when creating the filesystem. For example, it can be wise to create fewer inodes when setting up a filesystem that will contain just a few large files.</p>
<p>It should be noted that, there are two ways in which a filesystem can run out of space: it can consume all the space for adding new data (i.e., to existing files or to new files), or it can use up all the available inodes even when space is left for adding data.<br />
Use the command <code>df -i</code> to see the number of inodes available, used and free.</p>
<pre>[tony@localhost ~]$ df -i
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/mapper/CentOsVG-RootLV
4161536  155678 4005858    4% /
/dev/sda9              26104      40   26064    1% /boot
</pre>
<p>Whenever a file is created, the kernel assigns a free inode to that file. The inode is updated to reflect the details of the file. The file&#8217;s name, along with that free inode&#8217;s number, is written to the directory, the file is supposed to be in.<br />
</p>
<h3>Hard links and Symbolic links</h3>
<p><em>Hard links</em> are different filenames that point to same inode number (in essence to the same file).<br />
A <em>soft link</em> or symbolic link is a file whose data contains the &#8216;path&#8217; (eg,<em> /home/tony/resume.txt</em>) of another file(its target).</p>
<p>Since inode numbers are unique only within a filesystem, hard links cannot span across partitions or different filesystems. Where as softlinks can be to anywhere as long as a valid path is there to its target.</p>
<pre>[tony@localhost test]$ echo "this is just some contents" &gt; mytestfile  //create a file
[tony@localhost test]$ ln mytestfile myhardlink              //create a hardlink
[tony@localhost test]$ ln -s mytestfile mysoftlink           //create a softlink
[tony@localhost test]$ ls -li
total 8
2687664 -rw-rw-r-- 2 tony tony 27 Feb 22 14:59 myhardlink
2687665 lrwxrwxrwx 1 tony tony 10 Feb 22 14:58 mysoftlink -&gt; mytestfile
2687664 -rw-rw-r-- 2 tony tony 27 Feb 22 14:59 mytestfile
</pre>
<p>Note in the above shell dialogue that the hardlink and the original file has the same inode number, and the same size.<br />
The soft link has different inode number and of different size, obviously as it is another file whose data has the path to &#8216;<em>mytestfile</em>&#8216;<br />
</p>
<h3>Virtual File System</h3>
<p>On top of the underlying filesystem, the linux maintains a <em>Virtual FileSystem (VFS)</em>. The VFS is an interface for the operating system, system services, and programs to the underlying filesystem.<br />
VFS allows Linux to support many, often very different, file systems, each presenting a common software interface to the VFS. All of the details of the underlying file systems are translated by VFS so that all file systems appear identical to the rest of the Linux kernel and to programs running in the system.<br />
Each filesystem type supported by your VFS will have an associated driver routines loaded in to the kernel.<br />
Linux&#8217;s Virtual File system layer allows you to transparently mount the many different file systems at the same time.<br />
</p>
<h3>The <em>/proc</em> File System</h3>
<p>The <em>/proc</em> file system really shows the power of the Linux Virtual File System. It does not really exist; neither the <em>/proc</em> directory nor its subdirectories and its files actually exist.<br />
The <em>/proc</em> file system, like a real file system, registers itself with the Virtual File System. However, when the VFS makes calls to it requesting inodes as its files and directories are opened, the <em>/proc</em> file system creates those files and directories from information within the kernel.<br />
For example, the kernel&#8217;s <em>/proc/devices</em> file is generated from the kernel&#8217;s data structures describing its devices.<br />
The <em>/proc</em> file system presents a user readable window into the kernel&#8217;s inner workings.</p>
<p><strong>References</strong><br />
<a href="http://tldp.org/LDP/tlk/fs/filesystem.html" title="The Linux Documentation Project">http://tldp.org/LDP/tlk/fs/filesystem.html</a><br />
<a href="http://www.linfo.org/inode.html" title="Linux Info Project">http://www.linfo.org/inode.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.33dots.com/index.php/linux/the-linux-file-system-basics.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rar archive support in Cent OS 5</title>
		<link>http://www.33dots.com/index.php/linux/rar-archive-support-in-cent-os-5.html</link>
		<comments>http://www.33dots.com/index.php/linux/rar-archive-support-in-cent-os-5.html#comments</comments>
		<pubDate>Wed, 23 Sep 2009 06:20:57 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Cent OS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[extract rar in cent os]]></category>
		<category><![CDATA[rar]]></category>
		<category><![CDATA[rar in linux]]></category>
		<category><![CDATA[unrar]]></category>

		<guid isPermaLink="false">http://www.33dots.com/?p=229</guid>
		<description><![CDATA[.rar archive is not available in linux by default, but it can be installed by the command

[root@localhost ~]# yum install unrar

This allows you to extract rar files using the command
[tony@localhost ~]# unrar e myfile.rar
The e parameter tells the unrar to extract. More details can be found in man unrar
Now In Gnome, You could right click [...]]]></description>
			<content:encoded><![CDATA[<p><em>.rar</em> archive is not available in linux by default, but it can be installed by the command</p>
<pre>
[root@localhost ~]# yum install unrar
</pre>
<p>This allows you to extract <em>rar</em> files using the command</p>
<pre>[tony@localhost ~]# unrar e myfile.rar</pre>
<p>The <code>e</code> parameter tells the <em>unrar</em> to extract. More details can be found in <code>man unrar</code></p>
<p>Now In Gnome, You could right click on the file and click <em>Extract here</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.33dots.com/index.php/linux/rar-archive-support-in-cent-os-5.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing phpMyAdmin in my Cent OS 5.3</title>
		<link>http://www.33dots.com/index.php/linux/installing-phpmyadmin-in-cent-os-5-3.html</link>
		<comments>http://www.33dots.com/index.php/linux/installing-phpmyadmin-in-cent-os-5-3.html#comments</comments>
		<pubDate>Fri, 04 Sep 2009 17:21:19 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Cent OS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[cent os 5]]></category>
		<category><![CDATA[phpMyAdmin]]></category>
		<category><![CDATA[phpmyadmin in RHEL 5.3]]></category>
		<category><![CDATA[phpmyadmin.conf]]></category>

		<guid isPermaLink="false">http://www.33dots.com/?p=226</guid>
		<description><![CDATA[I did this by yum, which i think is the easiest way.
[root@localhost ~]# yum install phpmyadmin
This will install it in /usr/share/phpmyadmin 
Now, configure it by editing config.inc.php
[root@localhost html]# gedit /usr/share/phpmyadmin/config.inc.php 
add the blowfish secret,
$cfg['blowfish_secret'] = 'a8b7dafdferHJHJ^&#038;U^45776TIUuiYc6d';
and i also changed to mysqli in,
$cfg['Servers'][$i]['extension'] = 'mysqli';
Now you could access the phpMyAdmin by,
http://127.0.0.1/phpmyadmin/
This is possible because an alias [...]]]></description>
			<content:encoded><![CDATA[<p>I did this by <em>yum</em>, which i think is the easiest way.</p>
<pre>[root@localhost ~]# yum install phpmyadmin</pre>
<p>This will install it in <em>/usr/share/phpmyadmin</em> </p>
<p>Now, configure it by editing <em>config.inc.php</em></p>
<pre>[root@localhost html]# gedit /usr/share/phpmyadmin/config.inc.php </pre>
<p>add the blowfish secret,<br />
<code>$cfg['blowfish_secret'] = 'a8b7dafdferHJHJ^&#038;U^45776TIUuiYc6d';</code></p>
<p>and i also changed to <em>mysqli</em> in,<br />
<code>$cfg['Servers'][$i]['extension'] = 'mysqli';</code></p>
<p>Now you could access the phpMyAdmin by,<br />
<code>http://127.0.0.1/phpmyadmin/</code></p>
<p>This is possible because an <em>alias</em> is created for apache to the directory where phpMyAdmin in installed [ie <em>/usr/share/phpmyadmin</em>]. This is done in the file,</p>
<pre>[tony@localhost ~]$ gedit /etc/httpd/conf.d/phpmyadmin.conf</pre>
<p>You will see a lines like,<br />
<code>Alias /phpmyadmin /usr/share/phpmyadmin<br />
Alias /phpMyAdmin /usr/share/phpmyadmin<br />
Alias /mysqladmin /usr/share/phpmyadmin<br />
</code></p>
<p>&#8212;&#8212;&#8212;&#8212;-</p>
<p>You could also install phpMyAdmin manually by downloading <a title="phpMyAdming download site" href="http://www.phpmyadmin.net/home_page/downloads.php">phpMyAdmin</a>.<br />
Make sure you download the version 2.xx and not 3.xx[requires PHP 5.2] as Cent OS 5.3 has only PHP 5.1 by default</p>
<p>Extract the <em>tar.gz</em> file to your desktop.</p>
<p>Copy it to <em>/var/www/html/phpmyadmin</em> as root,</p>
<pre>[root@localhost ~]# mv /home/tony/Desktop/phpMyAdmin-3.2.1-all-languages /var/www/html/phpmyadmin</pre>
<p>Give the appropriate permission for apache,<br />
Set owner as apache</p>
<pre>[root@localhost html]# chown apache -R /var/www/html/phpmyadmin/</pre>
<p>Set the group owner as your user, this is good as you can edit the files easily,</p>
<pre>[root@localhost html]# chgrp tony -R /var/www/html/phpmyadmin/</pre>
<p>Now give group user the write permission</p>
<pre>[root@localhost html]# chmod g+w -R /var/www/html/phpmyadmin/</pre>
<p>Now, add the <em>blowfish secret</em> and <em>mysqli</em> extension as above, </p>
<p>Thats all.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.33dots.com/index.php/linux/installing-phpmyadmin-in-cent-os-5-3.html/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>
