<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3990939591390512696</id><updated>2012-02-16T11:12:10.871+02:00</updated><category term='Computers'/><category term='Linux'/><title type='text'>'Ανωση</title><subtitle type='html'>Hitchhiking the galaxy and reporting live.

&lt;p&gt;
Μικρές ιστορίες καθημερινής τρέλας.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://anosi.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3990939591390512696/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://anosi.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Arthur Dent</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3990939591390512696.post-3612600093237335871</id><published>2009-07-21T14:17:00.001+03:00</published><updated>2009-08-29T13:30:36.523+03:00</updated><title type='text'>Notes on various small tweaks</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;b&gt;&lt;font face='sans-serif'&gt;Note 1: Console properties &lt;br/&gt;&lt;/font&gt;&lt;/b&gt;&lt;font face='sans-serif'&gt;To change the console configuration (e.g. language switching etc.etc.)&lt;br/&gt;dpkg-reconfigure console-setup&lt;br/&gt;&lt;br/&gt;also for locales the old "debian" way of selecting the locales (via a menu) is not used. Rather one&lt;br/&gt;has to do it manually (Check various easy guides on the web for more information). &lt;br/&gt;&lt;br/&gt;&lt;b&gt;Note 2: Dont' Zap&lt;br/&gt;&lt;/b&gt;To be able to restart the X server with Alt+Ctrl+Backspace (this has changed recently following a &lt;br/&gt;decision by Xorg maintainers). To restore this functionality do: &lt;br/&gt;1. Edit xorg.cong and add&lt;br/&gt;&lt;br/&gt;Section "ServerFlags"&lt;br/&gt;        Option  "DontZap"       "False"&lt;br/&gt;EndSection&lt;br/&gt;&lt;br/&gt;2. or  (in ubuntu)&lt;br/&gt;dontzap --disable &lt;br/&gt;&lt;br/&gt;both have the same effect, i.e. they modify the xorg.file. &lt;br/&gt;&lt;br/&gt;&lt;b&gt;Note 3: MDADM&lt;br/&gt;&lt;/b&gt;To configure mail notifications I had to enter my e-mail. The easiest way is:&lt;br/&gt;to&lt;br/&gt;dpkg-reconfigure mdadm&lt;br/&gt;and run it as a deamon...&lt;br/&gt;&lt;br/&gt;Note that it is a wise choice to have it run a consistency check (which might be time consuming but nevertheless it is useful).&lt;br/&gt;&lt;br/&gt;Alternatively, you can manually edit the file&lt;br/&gt;/etc/mdadm/mdadm.conf&lt;br/&gt;&lt;br/&gt;Now to test it we need to simulate a drive failure. I will simulate a failure on my raid1 (md1) array (since it is easier to rebuild)&lt;br/&gt; mdadm --manage --set-faulty /dev/md1 /dev/sdb1&lt;br/&gt;and then to see that it failed try:&lt;br/&gt;mdadm --detail /dev/md1&lt;br/&gt;or&lt;br/&gt;dmesg&lt;br/&gt;or &lt;br/&gt;cat /proc/mdstat&lt;br/&gt;&lt;br/&gt;You should now have received an e-mail notifying you of the failure. &lt;br/&gt;Remove the failed drive:&lt;br/&gt;mdadm /dev/md1 -r /dev/sdb1&lt;br/&gt;and re-add it:&lt;br/&gt;&lt;/font&gt;&lt;font face='sans-serif'&gt;mdadm /dev/md1 -a /dev/sdb1&lt;/font&gt;&lt;br/&gt;&lt;font face='sans-serif'&gt;and verify that everything is back to normal. &lt;br/&gt;&lt;br/&gt;&lt;b&gt;Note 4: Configure smartmon tools&lt;br/&gt;&lt;/b&gt;Verify that the packages mail (or mailx) and smartmontools are installed&lt;br/&gt;&lt;br/&gt;1) Edit the file /etc/smartd.conf (see the man page for the available options)&lt;br/&gt;&lt;br/&gt;*  Comment out the DEVICESCAN live&lt;br/&gt;&lt;br/&gt;* and add the following  &lt;br/&gt;# Run a Long self test on the 13th of each month and short self tests on Wednesday evenings.&lt;br/&gt;# -a: Run default tests&lt;br/&gt;# -m: root (Mail to root)&lt;br/&gt;/dev/sda -d sat  -s (L/../13/./01|S/../../3/01) -a -W 4,47,55 -m root&lt;br/&gt;/dev/sdb -d sat -s (L/../13/./02|S/../../3/02) -a -W 4,47,55 -m root&lt;br/&gt;/dev/sdc -d sat -s (L/../13/./03|S/../../3/03) -a -W 4,47,55 -m root&lt;br/&gt;/dev/sdd -d sat -s (L/../13/./04|S/../../3/04) -a -W 4,47,55 -m root&lt;br/&gt;/dev/sde -d sat -s (L/../13/./05|S/../../3/05) -a -W 4,47,55 -m root&lt;br/&gt;/dev/sdf  -d sat -s (L/../13/./06|S/../../3/06) -a -W 4,47,55 -m root&lt;br/&gt;&lt;br/&gt;2) Edit /etc/default/smartmontools&lt;br/&gt;and uncomment the line: (to start the deamon)&lt;br/&gt;start_smartd=yes&lt;br/&gt;&lt;br/&gt;3) Restart the deamon...&lt;br/&gt;/etc/init.d/smartmontools restart&lt;br/&gt;&lt;br/&gt;and check /var/log/syslog if everything works as expected&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Note 5: To receive automatically various notifications. &lt;br/&gt;&lt;/b&gt;Edit /etc/aliases (of course we need something like sendmail) installed and configured. &lt;br/&gt;Edit  /etc/aliases&lt;br/&gt;&lt;br/&gt;add the line &lt;br/&gt;root: name@mailadd.com&lt;br/&gt;&lt;br/&gt;and run newaliases&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Note 6: Other rc.local options&lt;br/&gt;&lt;/b&gt;&lt;br/&gt;Here we can add various optimizations. For example &lt;br/&gt;&lt;br/&gt;&lt;b&gt;Note 7: Disable ipv6&lt;br/&gt;&lt;br/&gt;&lt;/b&gt;TODO&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Note 8: Logwatch&lt;br/&gt;&lt;br/&gt;&lt;/b&gt;TODO&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Note 9: prefetch and readahead&lt;br/&gt;&lt;/b&gt;&lt;/font&gt;&lt;font face='sans-serif'&gt;TODO&lt;br/&gt;&lt;/font&gt;&lt;br/&gt;&lt;font face='sans-serif'&gt;&lt;b&gt;&lt;br/&gt;Note 10: APC UPS (Configuration and notifications).&lt;br/&gt;&lt;/b&gt;&lt;/font&gt;&lt;font face='sans-serif'&gt;TODO&lt;br/&gt;&lt;/font&gt;&lt;br/&gt;&lt;font face='sans-serif'&gt;&lt;b&gt;Note 11: Sensors&lt;br/&gt;&lt;/b&gt;&lt;/font&gt;&lt;font face='sans-serif'&gt;TODO&lt;br/&gt;&lt;/font&gt;&lt;br/&gt;&lt;font face='sans-serif'&gt;&lt;b&gt;Note 12: Sound Card &lt;br/&gt;&lt;/b&gt;&lt;/font&gt;&lt;font face='sans-serif'&gt;TODO&lt;br/&gt;&lt;/font&gt;&lt;br/&gt;&lt;b&gt;Note 13: Sudoers&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;Run visudo as root and add the lines:&lt;br/&gt;&lt;br/&gt;# User privilege specification&lt;br/&gt;root    ALL=(ALL) ALL&lt;br/&gt;username   ALL=(ALL) ALL&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=14948b52-8099-8350-8263-ed0bf28fd2a7' alt='' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3990939591390512696-3612600093237335871?l=anosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anosi.blogspot.com/feeds/3612600093237335871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3990939591390512696&amp;postID=3612600093237335871' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3990939591390512696/posts/default/3612600093237335871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3990939591390512696/posts/default/3612600093237335871'/><link rel='alternate' type='text/html' href='http://anosi.blogspot.com/2009/07/notes-on-various-small-tweaks.html' title='Notes on various small tweaks'/><author><name>Arthur Dent</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3990939591390512696.post-3270293194814464111</id><published>2009-07-18T13:00:00.001+03:00</published><updated>2009-07-18T13:27:48.406+03:00</updated><title type='text'>Fsarchiver</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;FSarchiver is a new tool that helps take snapshots (much like Acronis true Image does on Windows). With Ubuntu there is a rather mature solution, namely partimage. &lt;br/&gt;&lt;br/&gt;Partimage has several problems:&lt;br/&gt;&lt;ul&gt;&lt;li&gt;It does not support multithreaded compression. &lt;br/&gt;&lt;/li&gt;&lt;li&gt;It has stopped being actively developed, and&lt;/li&gt;&lt;li&gt;does not seem to work well with lvm. &lt;br/&gt;&lt;/li&gt;&lt;/ul&gt;FSarchiver seems to be a better option as it resolves this option. The problem is that it is not yet packages for ubuntu and a compilation from source is required. Below information is given on how to compile it and also how to backup a snapshot of a partition (using the LVM snapshot function). &lt;br/&gt;&lt;br/&gt;The website for fsarchiver is &lt;a href='http://www.fsarchiver.org/'&gt;here&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;To have full functionality (i.e. lzma compression support the xz utils is needed). Download this from &lt;br/&gt;&lt;a href='http://tukaani.org/xz/'&gt;here&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Step 1: FSarchiver installation&lt;/b&gt;&lt;br/&gt;Make sure you have some of the required packages: &lt;br/&gt; apt-get install zlib1g-dev libssl-dev libbz2-dev liblzo2-dev e2fslibs-dev attr-dev libssl-dev libblkid-dev uuid-dev&lt;br/&gt;&lt;br/&gt;Download the source code for fsarchiver and xz utils and untar it &lt;br/&gt;cd &lt;to directory='' download='' the=''&gt;&lt;br/&gt;tar xvfz xz-4.999.8beta.tar.gz&lt;br/&gt;tar xvfz fsarchiver-0.5.8.tar.gz&lt;br/&gt;&lt;br/&gt;First let's build the xz utils:&lt;br/&gt; cd xz-4.999.8beta/&lt;br/&gt;./configure; make;make check&lt;br/&gt;and verify that all tests are passed. Then do:&lt;br/&gt;make install &lt;br/&gt;&lt;br/&gt;cd ../fsarchiver-0.5.8&lt;br/&gt;./configure --enable-static &lt;br/&gt;make;make install&lt;br/&gt;cd ../xz-4.999.8beta/&lt;br/&gt;make uninstall &lt;br/&gt;cd ..&lt;br/&gt;rm -rf fsarchiver-0.5.8 xz-4.999.8beta/&lt;br/&gt;&lt;br/&gt;And you will have fsarchiver installed (with all options regarding compression support) on /usr/local/sbin &lt;br/&gt;&lt;br/&gt;&lt;b&gt;Step 2: Creating an LVM snapshot and an image of useful directories (can be used to &lt;br/&gt;restore system in case of failure). &lt;/b&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;b&gt;To restore&lt;/b&gt;&lt;br/&gt;fsarchiver restfs -j 4 backup_name.fsa id=0,dest=/dev/vgname/lvname &lt;br/&gt;id=0: Is used in case the archiver has more than one filesystems...&lt;br/&gt;-j 4: Use all four cores. &lt;br/&gt;&lt;br/&gt;To display information regarding the partitions and the current filesystems:&lt;br/&gt;fsarchiver probe simple&lt;br/&gt;&lt;br/&gt;To see the details of an archive use:&lt;br/&gt;fsarchiver archinfo backup_file.fsa&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;/to&gt;&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3990939591390512696-3270293194814464111?l=anosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anosi.blogspot.com/feeds/3270293194814464111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3990939591390512696&amp;postID=3270293194814464111' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3990939591390512696/posts/default/3270293194814464111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3990939591390512696/posts/default/3270293194814464111'/><link rel='alternate' type='text/html' href='http://anosi.blogspot.com/2009/07/fsarchiver.html' title='Fsarchiver'/><author><name>Arthur Dent</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3990939591390512696.post-3498366421935320972</id><published>2009-07-06T17:21:00.001+03:00</published><updated>2009-07-20T16:58:05.914+03:00</updated><title type='text'>LVM Installation (Partition Alignment)</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;span style='font-family: arial;'&gt;We are now ready to delve into the details and start the procedure again with the goal of performing various &lt;br/&gt;optimizations. &lt;br/&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style='font-family: arial;'&gt; Things to consider when doing lvm on top of raid: &lt;br/&gt;- stripe vs. extent alignment&lt;br/&gt;- stride vs. stripe vs. extent size for ext3 filesystems (or sunit swidth in the case of xfs filesystems) &lt;br/&gt;- filesystem's awareness that there's also raid a layer below&lt;br/&gt;- lvm's readahead&lt;br/&gt;&lt;/span&gt;In the discussion that follows I will detail the various topics above and how I addressed them.&lt;br/&gt;&lt;span style='font-family: arial;'&gt;&lt;br/&gt;&lt;span style='font-weight: bold;'&gt;Step 0: &lt;/span&gt;Boot from the server or the desktop CD in rescue (or live) mode to execute these commands. &lt;br/&gt;&lt;br/&gt;&lt;span style='font-weight: bold;'&gt;Step 1: Create the array &lt;/span&gt;&lt;br/&gt;One of the choices that has to be performed is the stripe (chunk) size for the raid5 array. &lt;br/&gt;Based on the discussion &lt;a href='http://storageadvisors.adaptec.com/2006/06/05/picking-the-right-stripe-size/' target='_blank'&gt;here&lt;/a&gt; regarding how to choose an appropriate stripe size (I found much, oftentimes conflicting, &lt;br/&gt;information on the web the previous link gives satisfactory explanations)  also there are a number &lt;br/&gt;of benchmarks that help understand on the effect of various parameters. Based on the &lt;a href='http://linux-raid.osdl.org/index.php/Performance' target='_blank'&gt;benchmarks&lt;/a&gt; here and the &lt;br/&gt;discussion in the previous link I created the array using &lt;span style='font-weight: bold;'&gt;stripe size 256kB.&lt;/span&gt;&lt;br style='font-weight: bold;'/&gt;&lt;br/&gt;To create the arrays:&lt;br/&gt;mdadm --create /dev/md0 --chunk=256 --level=raid5 --raid-devices=5 /dev/sd[a-e]2&lt;br/&gt;and &lt;br/&gt;mdadm --create /dev/md1 --level=raid1 --raid-devices=2 /dev/sda[a-b]1&lt;br/&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style='font-family: arial;'&gt;To delete the arrays: (Warning: This can and probably will destroy your data)&lt;br/&gt;mdadm --stop /dev/md0&lt;br/&gt;mdadm --zero-superblock /dev/sd[a-e]2&lt;br/&gt;&lt;/span&gt;&lt;br/&gt;&lt;span style='font-family: arial;'&gt;and after 2-3 hours the building of the array is complete as can be verified by &lt;br/&gt;cat /proc/mdstat&lt;br/&gt;and &lt;br/&gt;mdadm --detail /dev/md0 &lt;br/&gt;mdadm --detail /dev/md1 &lt;br/&gt;&lt;br/&gt;For md0 the layout is left-symmetric, i.e.&lt;br/&gt;&lt;/span&gt;&lt;img alt='Left-Symmetric Layout' src='http://www.docs.hp.com/en/5187-1369/img/gfx24.gif'/&gt;&lt;br/&gt;&lt;span style='font-family: arial;'&gt;A quick bench shows&lt;br/&gt;hdparm -tT /dev/md0 shows an uncached read speed of ~434MB/sec something to be expected based on the stripe size &lt;br/&gt;and the per disk performance of the hardware used. Compared to the previous chunk size (64kB, see my previous post) and&lt;br/&gt;increase in performance is obtained as expected given the increase in stripe size. &lt;br/&gt;&lt;br/&gt;&lt;span style='font-weight: bold;'&gt;Step 2: LVM and it's alignment&lt;/span&gt;&lt;br style='font-weight: bold;'/&gt;A search on the web, turns out a long discussion about alignment of the various layers. This is especially important for RAID 5 installations since a misalignment will incur a performance hit especially during the write operations. It seems that there is a long discussion regarding alignment on the web, but many people are unclear about the exact procedure. &lt;br/&gt;&lt;/span&gt;&lt;span style='font-family: arial;'&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style='font-family: arial;'&gt; In my (long and winded) search, I found a number of interesting discussions. These can be found in the following links: &lt;br/&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style='font-family: arial;'&gt;&lt;a href='http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/' target='_blank'&gt;Link 1:&lt;/a&gt;   &lt;/span&gt;&lt;span style='font-family: arial;'&gt;Is a discussion on alignment for SSDs. Although the topic is only somewhat related the discussion is extremely clear and  all the salient points are addressed. This post helped me understand the various problems. &lt;br/&gt;&lt;/span&gt;&lt;br/&gt;The main discussion of Ted Ts'o covers alignment at the sector level. Basically the idea is to change the hd geometry in such a way that each cylinder will be aligned with a certain basic (stripe) size. This depending on the application alignment can happen on 4KiB (for next gen H/Ds) or 128KiB (for SSDs, erase block boundaries his case) boundaries. His explanations are very clear so I will point to his discussion. One thing that needs special care is the partition table: for MS/DOS compatibility the first partition starts on track 1. To have proper partition alignment one has to move the start of the partition so that it is aligned correctly. This can happen with fdisk in expert mode (see at the end of this post for an example). In our case we do not need alignment at the disk level (this is not the case in hardware raid OR if we create a partition table in the md array, in this case &lt;a href='http://www.mail-archive.com/linux-raid@vger.kernel.org/msg10093.html' target='_blank'&gt;read this&lt;/a&gt; for a discussion), but if we did we would have to manually move the partitions. &lt;br/&gt;&lt;br/&gt;&lt;a href='http://sqlblog.com/blogs/linchi_shea/archive/2007/02/01/performance-impact-of-disk-misalignment.aspx' target='_blank'&gt;Link 2&lt;/a&gt;: The impact of misalignment can be significant as the link illustrates. Also as the discussion on this &lt;a href='http://insights.oetiker.ch/linux/raidoptimization.html' target='_blank'&gt;link&lt;/a&gt; illustrates it can have an impact of 30% or more on performance. It seems that the greater impact can be expected when the stripe size becomes smaller. This is obvious as the read-verify-write operation would cross more times the boundaries in the case of misalignment and therefore we would pay a higher premium in terms of performance. &lt;br/&gt;&lt;br/&gt;Note I will be using the same partition scheme described in a previous post. That is on the hardware level for each of the hard drives there are two partitions: a small one (~100MB to be used for the boot partition); and a larger one to be used for the raid5 array. Note that on each of the drives we do not care about alignment  and there is a partition table on the first track (although we could easily take this into account). We need alignment once the array is created. In this case, given the stripe (chunk) size of 256kB, the basic "quantum" size for alignment is the 256K. While overlaying on top of the md array the LVM partition we have similar problems as the ones described before in the sense that the LVM extents should be aligned with the md stripe...&lt;br/&gt;&lt;br/&gt;&lt;span style='font-style: italic;'&gt;Note for HW Raids: &lt;/span&gt;&lt;br style='font-style: italic;'/&gt;In the software case we need to have a RAID 1 partition so that we can boot from there since the bootloaders do not fully support booting from a RAID 5. In the case of HW this is not a problem. The system sees the hard drive as a unit (since the controller takes care of that). The best approach in this case is not to create a partition table (anyway) and overlay the LVM system --- then use the LVM to perform the partition. &lt;br/&gt;&lt;span style='font-family: arial;'&gt;&lt;a target='_blank' href='http://makarevitch.org/rant/raid/'&gt;Link 3: &lt;/a&gt;An&lt;br/&gt;extremely comprehensive benchmark and comparison between hard and soft&lt;br/&gt;raid. Essentially md is compared to a 3ware card on RAID 5 and RAID 10&lt;br/&gt;configurations. Along the way many interesting information is&lt;br/&gt;presented. A definite must read as it contains a lot of information... &lt;br/&gt;&lt;/span&gt;&lt;span style='font-family: arial;'&gt;&lt;br/&gt;&lt;/span&gt;To create the LVM we  have two options:&lt;br/&gt;1) Create  a partition on /dev/md0 and label it for LVM, (typical of a HW raid) or&lt;br/&gt;2) Create the LVM without a partition table. &lt;br/&gt;In&lt;br/&gt;the first case we would need alignment for the partition (since we are&lt;br/&gt;doing this on top of the md layer see the example below), &lt;span style='font-weight: bold;'&gt;and &lt;/span&gt;then&lt;br/&gt;alignment for the metadata, whereas in the second case alignment is&lt;br/&gt;only required for the metadata (see what follows). The LVM tools&lt;span style='font-family: arial;'&gt;&lt;br/&gt;from version 2.0.40 onwards (which unfortunately as of this time is not&lt;br/&gt;yet integrated with ubuntu) can get information from a software array&lt;br/&gt;and arrange automagically aligment issues. For HW raids or in our case&lt;br/&gt;(since we have version 2.0.39) we will do it manually. &lt;br/&gt;&lt;/span&gt;&lt;span style='font-family: arial;'&gt;&lt;a href='http://forums.storagereview.net/index.php?showtopic=25786&amp;amp;st=0' target='_blank'&gt;Link 4&lt;/a&gt;:  Interesting discussion on alignment for Windows OSes..&lt;br/&gt;&lt;/span&gt;&lt;span style='font-family: arial;'&gt;&lt;a href='http://www.mail-archive.com/linux-raid@vger.kernel.org/msg10093.html' target='_blank'&gt;Link 5:&lt;/a&gt;  Linux-raid mailing list: Linux RAID Partition Offset 63 cylinders / 30% performance hit? &lt;br/&gt;&lt;/span&gt;&lt;a target='_blank' href='http://tjworld.net/wiki/Linux/Ubuntu/HardyRAID5EncryptedLVM'&gt;&lt;span style='font-family: arial;'/&gt;&lt;/a&gt;&lt;span style='font-family: arial;'&gt;&lt;a target='_blank' href='http://tjworld.net/wiki/Linux/Ubuntu/HardyRAID5EncryptedLVM'&gt;Link 6:&lt;/a&gt;  LVM tools confuse Megabytes with Mebibytes. Overall a very detailed and interesting article...&lt;br/&gt;&lt;/span&gt;&lt;span style='font-family: arial;'&gt;&lt;br/&gt;&lt;span style='font-style: italic;'&gt;Relevant/Interesting HOWTOs:&lt;/span&gt;&lt;br style='font-style: italic;'/&gt;&lt;a target='_blank' href='http://linux-raid.osdl.org/index.php/Main_Page'&gt;HOWTO: Software Raid&lt;/a&gt;&lt;br/&gt;&lt;a target='_blank' href='http://www.nyx.net/%7Esgjoen/disk.html'&gt;HOWTO: Multi Disk System Tuning&lt;br/&gt;&lt;/a&gt;&lt;a target='_blank' href='http://tldp.org/HOWTO/LVM-HOWTO/'&gt;HOWTO: LVM&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style='font-family: arial;'&gt;&lt;span style='font-style: italic;'&gt;Disk partition adjustment for Linux systems &lt;/span&gt;&lt;br style='font-style: italic;'/&gt;In&lt;br/&gt;Linux, align the partition table before data is written to the LUN, as&lt;br/&gt;the partition map will be rewritten and all data on the LUN destroyed.&lt;br/&gt;In the following example, the LUN is mapped to /dev/emcpowerah, and the&lt;br/&gt;LUN stripe element size is 128 blocks. Arguments for the fdisk utility&lt;br/&gt;are as follows:&lt;br/&gt;fdisk    /dev/emcpowerah&lt;br/&gt;x      # expert mode&lt;br/&gt;b      # adjust starting block number&lt;br/&gt;1      # choose partition 1&lt;br/&gt;xxx #    set it to an appropriate size for the alignment, our stripe element size&lt;br/&gt;w      # write the new partition&lt;br/&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style='font-style: italic; font-weight: bold;'&gt;Steps to setup LVM: &lt;/span&gt;&lt;br style='font-style: italic; font-weight: bold;'/&gt;&lt;br style='font-style: italic; font-weight: bold;'/&gt;1) First create a test filesystem using the defaults &lt;br/&gt;&lt;br/&gt;mkfs.xfs /dev/md0 and record the various parameters. (will be needed later) &lt;br/&gt;&lt;br/&gt;&lt;span style='font-family: arial;'&gt; Filesystem parameters by default on /dev/md0&lt;br/&gt;meta-data=/dev/md0      isize=256           agcount=32, agsize=15258240 blks&lt;br/&gt;                =                    sectsz=4096,     attr=2&lt;br/&gt;data         =                    bsize=4096        blocks=488263424, imaxpct=5&lt;br/&gt;                =                    sunit=64             swidth=256 blks&lt;br/&gt;naming     = version 2    bsize=4096        ascii-ci=0&lt;br/&gt;log           = internal log  bsize=4096        blocks=32768, version=2 &lt;br/&gt;                =                    sectsz=4096      sunit=1 blks, lazy-count=0&lt;br/&gt;realtime    = none          extsz= 1048576 blocks=0, rtextents=0&lt;br/&gt;&lt;/span&gt;&lt;span style='font-family: arial;'&gt;&lt;br/&gt;&lt;span style='font-family: arial;'&gt;&lt;span style='font-family: arial;'&gt;this will remove the partition table... &lt;br/&gt;dd if=/dev/zero of=/dev/md0 bs=512 count=1&lt;br/&gt;&lt;br/&gt;2) Create physical volume&lt;br/&gt;Normally the LVM metadata allocates 196kB (we need to allocate a little more for alignment) &lt;br/&gt;&lt;br/&gt;pvcreate --metadatasize 250k /dev/md0     (apparently the calculation is 250KiB *1.024=256, what a mess...)&lt;br/&gt;&lt;/span&gt;&lt;span style='font-family: arial;'&gt;&lt;br/&gt;To verify: &lt;br/&gt;pvs -o +pe_start  &lt;/span&gt;&lt;/span&gt;&lt;span style='font-family: arial;'&gt;&lt;span style='font-family: arial;'&gt; (you can also add     --units B)&lt;br/&gt;or&lt;br/&gt;pvdisplay --units b&lt;br/&gt;&lt;br/&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style='font-family: arial;'&gt;&lt;span style='font-family: arial;'&gt;The second set of commands are used to verify that the first physical extent is aligned with the 256K boundary. Notice &lt;br/&gt;that because lvm tools confuse KiB,MiB,GiB, with kB,MB,GB One might wonder why 250K is used.It's a mess but see Link 6 for an "explanation"..&lt;br/&gt;&lt;br/&gt;3) Create volume group (32MB extend size)&lt;br/&gt;This needs to align on top of the md layer. So it has to be a multiple of 256Kib&lt;br/&gt;&lt;br/&gt;It can be argued that it is beneficial to have it a multiple of &lt;br/&gt;256Kib*4=1MiB (where 4:Raid Devices-1).&lt;br/&gt;&lt;br/&gt;Here we choose it to be 32MiB&lt;br/&gt;&lt;br/&gt;vgcreate --physicalextentsize 32M &lt;vgname&gt; /dev/md0&lt;br/&gt;&lt;/vgname&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;to verify alignment &lt;br/&gt;&lt;span style='font-family: arial;'&gt;&lt;span style='font-family: arial;'&gt;&lt;br/&gt;vgdisplay &lt;vgname&gt; --units b&lt;br/&gt;and we get PE size 33554432= 32*(1024)^2&lt;br/&gt;&lt;br/&gt;4) Create Logical Volumes&lt;br/&gt;&lt;br/&gt;100GiB for /&lt;br/&gt;600GiB for /var&lt;br/&gt;600GiB for /home&lt;br/&gt;&lt;br/&gt;In terms of extents this is equal to:&lt;br/&gt;32extents*32MiB=1GiB&lt;br/&gt;100Gib= 32*100=3200 extents&lt;br/&gt;600Gib= 32*600=19200 extents&lt;br/&gt;&lt;br/&gt;&lt;/vgname&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style='font-family: arial;'&gt;&lt;span style='font-family: arial;'&gt;lvcreate -l 3200 -n root &lt;vgname/&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style='font-family: arial;'&gt;&lt;span style='font-family: arial;'&gt;&lt;br/&gt;lvcreate -l 19200 -n home &lt;vgname/&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style='font-family: arial;'&gt;&lt;span style='font-family: arial;'&gt;&lt;br/&gt;lvcreate -l 19200 -n var &lt;vgname/&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;span style='font-family: arial;'&gt;&lt;span style='font-family: arial;'&gt;lvs (to verify that everything is ok)&lt;br/&gt;&lt;br/&gt;To activate an lv:&lt;br/&gt;vgchange -a y &lt;vgname&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style='font-weight: bold;'&gt;Step 3: Create the filesystem&lt;/span&gt;&lt;/vgname&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style='font-family: arial;'&gt;&lt;br/&gt;&lt;br/&gt;To create the filesystem we need to make sure that we get alignment also at this level. Thankfully the XFS filesystem &lt;br/&gt;can become RAID aware and adapt performance to the presence of soft/hard RAID. The relevant parameters are &lt;br/&gt;the sunit (stripe unit) and swidth (stripe width) parameters. &lt;br/&gt;&lt;br/&gt;Explanation of options: from the &lt;a target='_blank' href='http://manpages.ubuntu.com/manpages/jaunty/man8/mkfs.xfs.8.html'&gt;manpage:&lt;/a&gt; &lt;br/&gt;and also using notes from the following links&lt;br/&gt; &lt;a target='_blank' href='http://forums.gentoo.org/viewtopic-t-488215.html'&gt;tuning the XFS&lt;/a&gt;        &lt;a target='_blank' href='http://xfs.org/index.php/XFS_FAQ#Q:_What_is_the_problem_with_the_write_cache_on_journaled_filesystems.3F'&gt;XFS FAQ &lt;/a&gt;    &lt;a target='_blank' href='http://everything2.com/index.pl?node_id=1479435'&gt;Tweaking XFS Performance &lt;/a&gt;&lt;br/&gt;&lt;br/&gt;My choices are outlined below&lt;br/&gt;&lt;/span&gt;&lt;big&gt;&lt;big style='font-family: sans-serif;'&gt;&lt;big&gt;&lt;span class='Apple-style-span' style='border-collapse: separate; color: rgb(0, 0, 0); font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 21px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;'&gt;&lt;vgname&gt;&lt;vgame/&gt;&lt;/vgname&gt;&lt;/span&gt;&lt;/big&gt;&lt;/big&gt;&lt;/big&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style='font-style: italic;'&gt;Block Size&lt;/span&gt;&lt;br style='font-style: italic;'/&gt;-b size : This option specifies the fundamental block size of the filesystem. This has to be smaller than the kernel pagesize, in 32-bit linux this is 4096 and in 64-bit it can be higher. Normally, a higher block size will result in better performance but here I let the default choice.&lt;br/&gt;&lt;br/&gt;-b size=4096&lt;br/&gt;&lt;br/&gt;Data Section&lt;br/&gt;&lt;br/&gt;-d data_section_options&lt;br/&gt;&lt;br/&gt;    agcount:This is used to specify the number of allocation groups. The data section of the filesystem is divided into allocation groups to improve the performance of XFS.&lt;br/&gt;    sunit: This is used to specify the stripe unit for a RAID device or a logical volume. The value has to be specified in 512-byte block units. Use the su sub-option to specify the stripe unit size in bytes.&lt;br/&gt;    swidth: This is used to specify the stripe width for a RAID device or a striped logical volume. The value has to be specified in 512-byte block units. Use the suboption sw to specify the width size in bytes. &lt;br/&gt;&lt;br/&gt; -d agcount=4,su=256k,sw=4&lt;br/&gt;&lt;br/&gt;Here for RAID5: width=su*(number of Raid Drives - 1)&lt;br/&gt;for RAID 6, it would be: width=su*(number of Raid Drives -2)&lt;br/&gt;&lt;br/&gt;Force Overwrite (Optional)&lt;br/&gt;-f Force overwrite when an existing filesystem is detected on the device. &lt;br/&gt;&lt;br/&gt;Log Section&lt;br/&gt;-l log_section_options&lt;br/&gt;     internal: This is used to specify that the log section is a piece of the data section instead of being another device or logical volume.&lt;br/&gt;     size: This is used to specify the size of the log section.&lt;br/&gt;     version: This specifies the version of the log. The current default is 2, which allows for larger log buffer sizes as well as supporting stripe-aligned log writes (see the sunit and su options, below).&lt;br/&gt;     sunit: This specifies the alignment to be used for log writes. The value has to be specified in 512-byte block units. Note: I do not set it as it done automatically once the data sunit is given. &lt;br/&gt;     lazy-count: This changes the method of logging various persistent counters in the superblock. Under metadata intensive workloads, these counters are updated and logged frequently enough that the superblock updates become a serialisation point in the filesystem. The value can be either 0 or 1.&lt;br/&gt;&lt;br/&gt;-l internal,size=128m, version=2, lazy-count=1&lt;br/&gt;&lt;br/&gt;The remaining options can remain to their default values&lt;br/&gt;&lt;br/&gt;mkfs.xfs -b size=4096 -d agcount=4, su=256k,sw=4 -l internal,size=128m, version=2, lazy-count=1 -f /dev/&lt;vgname&gt;/root&lt;br/&gt;running it gives that, for alignment AG must be a multiple of stripe width, so a recommendation is given&lt;br/&gt;mkfs.xfs -b size=4096 -d agsize=6553536b,su=256k,sw=4 -l internal,size=128m, version=2, lazy-count=1 -f /dev/&lt;vgname&gt;/root&lt;br/&gt;mkfs.xfs -b size=4096 -d agsize=39321536b,su=256k,sw=4 -l internal,size=128m, version=2, lazy-count=1 -f /dev/&lt;vgname&gt;/home&lt;br/&gt;mkfs.xfs -b size=4096 -d agsize=39321536b,su=256k,sw=4 -l internal,size=128m, version=2, lazy-count=1 -f /dev/&lt;vgname&gt;/var&lt;br/&gt;&lt;br/&gt;and then to mount (also change these options in the fstab)&lt;br/&gt;nobarrier,logbufs=8,noatime,nodiratime /dev/root&lt;br/&gt;nobarrier,logbufs=8,noatime,nodiratime /dev/var&lt;br/&gt;nobarrier,logbufs=8,noatime,nodiratime /dev/home&lt;br/&gt;&lt;br/&gt;&lt;span style='font-weight: bold;'&gt;Step 4: Final tweaks. Set readahead buffers correctly&lt;/span&gt;&lt;br style='font-weight: bold;'/&gt;&lt;br/&gt;There is an issue with the readahead buffers. This is a known problem and is discussed extensively in the following links:&lt;br/&gt;&lt;br/&gt;&lt;a href='https://bugzilla.redhat.com/show_bug.cgi?id=232843' target='_blank'&gt;Link 1&lt;/a&gt;     &lt;a href='https://bugzilla.redhat.com/show_bug.cgi?id=473273' target='_blank'&gt;Link2 &lt;/a&gt;&lt;br/&gt;&lt;br/&gt;blockdev --getra /dev/md0 /dev/&lt;vgname&gt;/root /dev/&lt;vgname&gt;/var /dev/&lt;vgname&gt;/home&lt;br/&gt;&lt;br/&gt;Gives&lt;br/&gt;4096 256 256 256 &lt;br/&gt;&lt;br/&gt;To fix this: &lt;br/&gt;blockdev --setra 4096 /dev/md0 /dev/&lt;vgname&gt;/root /dev/&lt;vgname&gt;/var /dev/&lt;vgname&gt;/home&lt;br/&gt;&lt;br/&gt;(To make this permanent add an entry to /etc/rc.local) &lt;br/&gt;&lt;br/&gt;and then do a bonnie++ benchmark to test that everything works as expected. &lt;br/&gt;bonnie++ -u &lt;username&gt; -f &lt;br/&gt;&lt;br/&gt;Note: The benefits of partition alignment will be more profound as the chunk size becomes smaller. &lt;br/&gt;&lt;br/&gt;&lt;span style='font-weight: bold;'&gt;Step 5: System Installation&lt;/span&gt;&lt;br style='font-weight: bold;'/&gt;&lt;br/&gt;Reboot the system and do the installation as usual (one could do it manually but there are no &lt;br/&gt;significant reasons why one should complicate things more). &lt;br/&gt;&lt;br/&gt;Once the basic installation has completed, the system will be restarted and the basic grub prompt will &lt;br/&gt;appear: &lt;br/&gt;&lt;br/&gt;find /grub/menu.lst (or find /boot/grub/menu.lst) &lt;br/&gt;root (hd0,0)&lt;br/&gt;setup (hd0)&lt;br/&gt;&lt;br/&gt;root(hd1,0)&lt;br/&gt;setup (hd1) &lt;br/&gt;&lt;br/&gt;will install grub on two hard drives. And restart....&lt;br/&gt;&lt;br/&gt;Once the system is setup: &lt;br/&gt;&lt;br/&gt;1. Install the network (edit /etc/init.d/networking)&lt;br/&gt;&lt;br/&gt;iface eth0 inet static&lt;br/&gt;address 192.168.1.100&lt;br/&gt;netmask 255.255.255.0&lt;br/&gt;network 192.168.1.0&lt;br/&gt;broadcast 192.168.1.255&lt;br/&gt;gateway 192.168.1.254&lt;br/&gt;&lt;br/&gt;Edit /etc/resolv.conf to add the nameservers&lt;br/&gt;search myisp.com&lt;br/&gt;nameserver 192.168.1.254&lt;br/&gt;nameserver 202.54.1.20&lt;br/&gt;nameserver 202.54.1.30&lt;br/&gt;&lt;br/&gt;/etc/init.d/networking restart&lt;br/&gt;&lt;br/&gt;Test connectivity:&lt;br/&gt;ping www.google.com&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;2. Update the system&lt;br/&gt;&lt;br/&gt;apt-get update;apt-get dist-upgrade&lt;br/&gt;&lt;br/&gt;dpkg-reconfigure debconf (to set the level of questions that you want asked, I choose medium)&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;3. Add swap (if you have not added it before)&lt;br/&gt;&lt;br/&gt;Rule of thumb (for system memory of 4GB and higher, swap should be system memory+2GB), &lt;br/&gt;so for me it is 6GB. &lt;br/&gt;&lt;br/&gt;lvcreate &lt;vgname&gt; -l 192 -n swap1 &lt;br/&gt;mkswap /dev/&lt;vgname&gt;/swap1 &lt;br/&gt;and record the UUID given.&lt;br/&gt;swapon -va (To activate it) &lt;br/&gt;and &lt;br/&gt;cat /proc/swaps &lt;br/&gt;or&lt;br/&gt;free&lt;br/&gt;To verify that it is installed&lt;br/&gt;&lt;br/&gt;4. Edit /etc/fstab  and add there&lt;br/&gt;a. The options for the xfs filesystems (see above)&lt;br/&gt;b. for the swap one line along the lines&lt;br/&gt;UUID=&lt;the id='' you='' recorded='' before=''&gt;  swap     swap    defaults     0 0&lt;br/&gt;&lt;br/&gt;5. Set readahead to a larger value automatically on system boot. &lt;br/&gt;&lt;br/&gt;Edit rc.local and add the line&lt;br/&gt;blockdev --getra 4096 /dev/md0 /dev/&lt;vgname&gt;/*&lt;br/&gt;&lt;br/&gt;&lt;span style='font-weight: bold;'&gt;Reboot and we are done!!!! &lt;br/&gt;&lt;/span&gt;&lt;br/&gt;Other minor topics defrag the filesystem...&lt;br/&gt;1. Info on xfs system&lt;br/&gt;xfs_info /dev/data/test&lt;br/&gt;Check Fragmentation Level:&lt;br/&gt;xfs_db -c frag -r /dev/hdXY&lt;br/&gt;To lower fragmentation level:&lt;br/&gt;xfs_fsr /dev/hdXY&lt;br/&gt;&lt;br/&gt;2. Expert mode in server installation&lt;br/&gt;&lt;br/&gt;Note: in Ubuntu 9.04 using expert mode seems to create problems during the installation of the base system when mkintrd is creating the initrd image. There are some workarounds on the internet but it is easier to not use expert mode. &lt;br/&gt;&lt;br/&gt;3. Items that need further investigation&lt;br/&gt;&lt;br/&gt;a. bonnie++ and bonnie++ -f give different results....&lt;br/&gt;&lt;br/&gt;I have no clue, why this is the case. This difference is probably due to a bug with bonnie++. Other people around the net have noticed this behavior. While not certain, I can say that compared with other benchmarking software it seems that there is a problem with the -f switch. &lt;br/&gt;&lt;br/&gt;After the tweakings above indicative numbers are shown below: &lt;br/&gt;&lt;br/&gt;Version 1.03c       ------Sequential Output------ --Sequential Input- --Random-&lt;br/&gt;                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--&lt;br/&gt;Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP&lt;br/&gt;name          8G 81129  93 161448  19 115095  13 86482  96 414836  27 586.2   0&lt;br/&gt;                    ------Sequential Create------ --------Random Create--------   &lt;br/&gt;                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--   &lt;br/&gt;              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP   &lt;br/&gt;                 16  7780  23 +++++ +++  3866   8  8314  19 +++++ +++  3874   9   &lt;br/&gt;&lt;br/&gt;and with the option in my rc.local file:&lt;br/&gt;&lt;br/&gt;echo 4096 &amp;gt; /sys/block/md0/md/stripe_cache_size&lt;br/&gt;&lt;br/&gt;I get the following:&lt;br/&gt;&lt;br/&gt;Version 1.03c       ------Sequential Output------ --Sequential Input- --Random-&lt;br/&gt;                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--&lt;br/&gt;Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP&lt;br/&gt;foxtrot          8G 87635  96 180044  21 131761  16 91021  97 401820  25 499.2   0&lt;br/&gt;                    ------Sequential Create------ --------Random Create--------&lt;br/&gt;                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--&lt;br/&gt;              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP&lt;br/&gt;                 16  8988  27 +++++ +++  4239   8 10419  33 +++++ +++  3921   9&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;c. Why hdparm -tT gives different numbers on a mounted vs an unmounted filesystem&lt;br/&gt;Based on the discussion &lt;a href='http://makarevitch.org/rant/raid/'&gt;here&lt;/a&gt; it seems that there is some communication between the filesystem and the block device. This gives slower hdparm results when the filesystem is mounted.  &lt;br/&gt;&lt;br/&gt;d. Configure mdadm.conf to send automatic notifications regarding the health of the disk array. &lt;/vgname&gt;&lt;/the&gt;&lt;/vgname&gt;&lt;/vgname&gt;&lt;/username&gt;&lt;/vgname&gt;&lt;/vgname&gt;&lt;/vgname&gt;&lt;/vgname&gt;&lt;/vgname&gt;&lt;/vgname&gt;&lt;/vgname&gt;&lt;/vgname&gt;&lt;/vgname&gt;&lt;/vgname&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=b7a6e5c0-a380-82d3-8a7a-364dba2184bb' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3990939591390512696-3498366421935320972?l=anosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anosi.blogspot.com/feeds/3498366421935320972/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3990939591390512696&amp;postID=3498366421935320972' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3990939591390512696/posts/default/3498366421935320972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3990939591390512696/posts/default/3498366421935320972'/><link rel='alternate' type='text/html' href='http://anosi.blogspot.com/2009/07/lvm-installation-partition-alignment.html' title='LVM Installation (Partition Alignment)'/><author><name>Arthur Dent</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3990939591390512696.post-2437207238768641442</id><published>2009-07-04T13:13:00.001+03:00</published><updated>2009-07-20T16:58:17.167+03:00</updated><title type='text'>LVM Advanced Installation Notes:</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;span style='font-family: arial;'&gt;&lt;span style='font-weight: bold;'&gt;1) The problem&lt;/span&gt;&lt;br/&gt;After the  default installation (see previous post) I noticed that performance was not satisfactory. &lt;br/&gt;I ran bonnie++ and other io benchmarking software. &lt;br/&gt;The problem can be illustrated as follows: &lt;br/&gt;hdparm -tT /dev/md0&lt;br/&gt;Gives reasonable performance (380MB/s reads), while &lt;br/&gt;hdparm -tT /dev/vgvol/dir &lt;br/&gt;gives abysmal performance (120 MB/sec, equivalent to that of one drive)...&lt;br/&gt;&lt;br/&gt;This suggests that we might have a problem with alignment between raid/lvm/xfs....&lt;br/&gt;&lt;br/&gt;&lt;span style='font-weight: bold;'&gt;2) Raid Information&lt;/span&gt;&lt;br/&gt;The following resources provide a lot of useful information regarding raid installation:&lt;br/&gt;&lt;a target='_blank' href='http://linux-raid.osdl.org/index.php/Linux_Raid'&gt;RAID HOWTO&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;In particular it defines the superblock and gives lots of useful information on mdadm and it's use. &lt;br/&gt;&lt;br/&gt;&lt;span style='font-weight: bold;'&gt;3) File mdadm.conf&lt;/span&gt;&lt;br/&gt;/etc/mdadm.conf is mdadms' primary configuration file. Unlike /etc/raidtab, mdadm does not rely on /etc/mdadm.conf to create or manage arrays. Rather, mdadm.conf is simply an extra way of keeping track of software RAIDs. Using a configuration file with mdadm is useful, but not required. Having one means you can quickly manage arrays without spending extra time figuring out what array properties are and where disks belong. For example, if an array wasn't running and there was no mdadm.conf file describing it, then the system administrator would need to spend time examining individual disks to determine array properties and member disks.&lt;br/&gt;&lt;br/&gt;# mdadm --detail --scan&lt;br/&gt;ARRAY /dev/md0 level=raid0 num-devices=2   \&lt;br/&gt;    UUID=410a299e:4cdd535e:169d3df4:48b7144a&lt;br/&gt;&lt;br/&gt;If there were multiple arrays running on the system, then mdadm would generate an array line for each one. So after you're done building arrays you could redirect the output of mdadm --detail --scan to /etc/mdadm.conf. Just make sure that you manually create a DEVICEentry as well. Using the example I've provided above we might have an /etc/mdadm.conf that looks like:&lt;br/&gt;&lt;br/&gt;DEVICE    /dev/sdb1 /dev/sdc1&lt;br/&gt;ARRAY     /dev/md0 level=raid0 num-devices=2    \                       &lt;br/&gt;    UUID=410a299e:4cdd535e:169d3df4:48b7144a&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style='font-weight: bold;'&gt;4) Choices&lt;/span&gt;&lt;br style='font-weight: bold;'/&gt;&lt;span style='font-style: italic;'&gt;HW vs SoftRaid vs FakeRaid:&lt;/span&gt;&lt;br style='font-style: italic;'/&gt;I had all three options (I have a raid controller, an ICH10R mobo, and only run linux). &lt;br/&gt;See below for a discussion&lt;br/&gt;&lt;a target='_blank' href='http://linux.yyz.us/why-software-raid.html'&gt;Pros and Cons&lt;/a&gt;&lt;br/&gt;I chose &lt;span style='font-weight: bold;'&gt;softraid &lt;/span&gt;because:&lt;br style='font-weight: bold;'/&gt;- I have a fast processor&lt;br/&gt;- I only ran linux. &lt;br/&gt;- From what I have seen is reliable and fast and compared to fakeraid (dmraid) is more stable and slightly&lt;br/&gt;faster. &lt;br/&gt;See also the following for more discussion:&lt;br/&gt;&lt;a target='_blank' href='http://bbossola.wordpress.com/2008/03/07/dmraid-on-ubuntu-with-sata-fakeraid/'&gt;Link 1&lt;/a&gt; &lt;a target='_blank' href='http://ubuntuforums.org/showthread.php?t=721825'&gt;Link 2 &lt;/a&gt;  &lt;a target='_blank' href='http://blog.shaf.net/?p=6'&gt;Link 3 &lt;/a&gt;  &lt;br/&gt;&lt;br/&gt;&lt;span style='font-style: italic;'&gt;&lt;br/&gt;&lt;br/&gt;Superblock: &lt;/span&gt;&lt;br style='font-style: italic;'/&gt;It turns out there are multiple versions. This is reported when running &lt;br style='font-weight: bold;'/&gt;mdadm --detail /dev/md0  (Under the version) &lt;br/&gt;See &lt;a target='_blank' href='http://linux-raid.osdl.org/index.php/Superblock'&gt;link&lt;/a&gt; for more information. &lt;br/&gt;Update: Add here choice ....&lt;br/&gt;&lt;br/&gt;&lt;span style='font-weight: bold;'&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style='font-style: italic;'&gt;Swap file Location:&lt;/span&gt;&lt;br style='font-style: italic;'/&gt;There is a discussion on where to put the swap file if you have a RAID partition... Should it be put on the raid&lt;br/&gt;or separately??? &lt;br/&gt;&lt;br/&gt;Three solutions are proposed: &lt;br/&gt;Separate RAID 1 for swap on 2 drives (so that if a drive fails there is swap on the other). &lt;br/&gt;Add many swap partitions on each of the drives and let the kernel decide where to place the swap, or &lt;br/&gt;place on raid 5. &lt;br/&gt;&lt;br/&gt;After looking around the following discussion is the most convincing:&lt;br/&gt; If you have everything on RAID on your server, it's often debated whether you want your swap partition on RAID as well. Some will state correctly that Linux optimally uses two swap partitions (e.g. on /dev/sda2 and /dev/sdb2) and that putting the swap on a RAID impacts the swap performance. While this is techncally correct, it is nonsense when it comes to availability.&lt;br/&gt; &lt;strong&gt;First:&lt;/strong&gt; if swap performance is an issue, the problem isn't RAID or not, it is too less RAM. Under normal circumstances, swap should be used only sparsely -- if at all. From time to time the system might swap out something not used for some time. If a larger amount of swap is used on a regular basis, else there's a memory leak in one of the applications running, or you simply have not enough RAM built in for the tasks running. Go buy some!&lt;br/&gt; &lt;strong&gt;Second:&lt;/strong&gt; while Linux can indeed distribute swapped pages across several swap partitions, once one of them suddenly disappears because the underlying disk died, the system simply crashes. And that's exactly what you don't want.&lt;br/&gt; &lt;br/&gt; Conclusion: put the swap on a RAID as well as everything else.&lt;br/&gt;&lt;br/&gt;&lt;span style='font-weight: bold;'&gt;Swap on RAID 5 &lt;/span&gt;for me&lt;br/&gt;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=52ec9be5-e29a-8155-9fdd-55dc8a22ac0d' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3990939591390512696-2437207238768641442?l=anosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anosi.blogspot.com/feeds/2437207238768641442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3990939591390512696&amp;postID=2437207238768641442' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3990939591390512696/posts/default/2437207238768641442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3990939591390512696/posts/default/2437207238768641442'/><link rel='alternate' type='text/html' href='http://anosi.blogspot.com/2009/07/lvm-advanced-installation-notes.html' title='LVM Advanced Installation Notes:'/><author><name>Arthur Dent</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3990939591390512696.post-2779071381439822890</id><published>2009-07-01T17:42:00.001+03:00</published><updated>2009-07-01T17:42:58.316+03:00</updated><title type='text'>Notes on RAID 5/LVM Installation...</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;span style='font-family: arial;'&gt;I found quite a few resources on the internet with useful information regarding setting up a RAID 5 system with LVM. &lt;br/&gt;&lt;br/&gt; &lt;span style='font-weight: bold;'&gt;Setup soft RAID/LVM&lt;/span&gt;&lt;br/&gt;Using the 9.04 server CD, I partitioned the 5 disks as follows:&lt;br/&gt;128MB on every disk (set flag to raid) (/dev/sd[a-e]1) &lt;br/&gt;and the rest as a single partition (with the flag set on raid again) (/dev/sd[a-e]2) &lt;br/&gt;&lt;br/&gt;I set the bootable flag on /dev/sda1 and /dev/sda2 and created a raid array that I formatted using XFS and set the mount point to /boot. I then proceeded with the creation of a raid5 array using /dev/sd[a-e]2 (/dev/md0) and then I set on top of it a partition that had the &lt;br/&gt;flag set on lvm. Using the LVM tool I then proceeded to create partitions:&lt;br/&gt;swap, var, home, root&lt;br/&gt;for the corresponding directories. &lt;br/&gt;I formatted everything as XFS (and mounted them in the appropriate locations)&lt;br/&gt;Then grub was installed per the recommendations on the first link below:&lt;br/&gt;&lt;/span&gt;&lt;a href='https://help.ubuntu.com/community/Installation/SoftwareRAID' target='_blank'&gt;Software Raid on Ubuntu:&lt;/a&gt; In this first link and useful suggestion on how to install the boot loader with grub&lt;br/&gt;after the configuration has been completed (Essentially run and install the boot loader on both of the boot partitions)&lt;br/&gt;&lt;span style='font-family: arial;'/&gt;&lt;a href='https://help.ubuntu.com/community/Installation/SoftwareRAID' target='_blank'&gt;Ubuntu forums: &lt;/a&gt;On this link an interesting suggestion regarding the swap is given. The suggestion is to have &lt;br/&gt;multiple cache files &lt;br/&gt;&lt;br/&gt;Once restarted everything seems to be working correctly and the raid array started the sync process...&lt;br/&gt;cat /proc/mdstat&lt;br/&gt;&lt;br/&gt;Also it easy to check that the file /etc/mdadm/mdadm.conf has been created correctly. &lt;br/&gt;The following link (in Greek) has a very good description of the process as well as the &lt;br/&gt;&lt;a href='http://forum.ubuntu-gr.org/viewtopic.php?f=9&amp;amp;t=5133' target='_blank'&gt;Greek Forums on Ubuntu&lt;/a&gt; describing many details of the procedure.&lt;br/&gt;&lt;br/&gt;Chunk sizes and other misc stuff I have left them on their default values. It seems that there are benefits to &lt;br/&gt;selecting the proper stripe sizes but for my system (which is not very heavy load) the difference would be &lt;br/&gt;marginal with a concominant waste of my time.&lt;br/&gt;&lt;span style='font-weight: bold;'&gt;&lt;br/&gt;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3990939591390512696-2779071381439822890?l=anosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anosi.blogspot.com/feeds/2779071381439822890/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3990939591390512696&amp;postID=2779071381439822890' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3990939591390512696/posts/default/2779071381439822890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3990939591390512696/posts/default/2779071381439822890'/><link rel='alternate' type='text/html' href='http://anosi.blogspot.com/2009/07/notes-on-raid-5lvm-installation.html' title='Notes on RAID 5/LVM Installation...'/><author><name>Arthur Dent</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3990939591390512696.post-5582452968700718345</id><published>2009-06-29T19:48:00.001+03:00</published><updated>2009-08-30T19:24:51.439+03:00</updated><title type='text'>Bacula Installation Notes</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Bacula is especially hard to configure as there are many options. My backup plan was to &lt;br/&gt;be able to automatically take backup from various hosts. These might be user's machines, &lt;br/&gt;in which case, depending on the operating system their /home (for linux) or My Documents &lt;br/&gt;(for windows hosts) would be taken. What made it especially hard was the need to take&lt;br/&gt;server backups. The servers are hosts to many websites, as well as other lab services. &lt;br/&gt;This created the need to take automatic (and consistent backups) of the web site and the &lt;br/&gt;associated database. The solution I devised was a set of scripts that allow to &lt;br/&gt;take LVM snapshots and then backup these snapshots. &lt;br/&gt;&lt;br/&gt;I had to write a number of scripts so that this would be scalable to many hosts, &lt;br/&gt;and also found extremely useful the script mylvmbackup... The bacula conf files are &lt;br/&gt;a word in progress. Especially in an effort to automate the various processes. Here I just document (for my own sake) the input-output to the scripts I wrote. For the bacula terminology see at the end of this post. &lt;u&gt;&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Bacula Installation&lt;/b&gt; &lt;b&gt;Notes&lt;/b&gt;&lt;/u&gt;&lt;br/&gt;The first problem when installing bacula is that the new version (3.0.x) is not yet officially packaged (although there  exists an unofficial PPA package). It seems that the ubuntu server team will be preparing an official ppa package but nothing has been done yet. I decided to use the old version and upgrade in a few months as the new version becomes &lt;br/&gt;available. (In fact, I tried the PPA version and it would not work.)&lt;br/&gt;&lt;p&gt;To enable ssl follow the steps below: &lt;br/&gt;&lt;/p&gt;&lt;p&gt;apt-get build-dep bacula&lt;br/&gt;apt-get install build-essential libssl-dev fakeroot devscripts&lt;br/&gt;apt-get source bacula&lt;br/&gt;cd bacula-2.2.4&lt;br/&gt;(edit debian/rules to add the openssl option)&lt;br/&gt;dch -i -Djaunty&lt;br/&gt;fakeroot dpkg-buildpackage&lt;/p&gt;&lt;p&gt;and then install the deb packages to commence the installation.&lt;/p&gt;&lt;p&gt;After answering the questions (creating a separate db user with access privileges to the bacula catalog). &lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;Add here stuff about the pools and how to create them.....&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;u&gt;&lt;b&gt;Backup Websites&lt;/b&gt;&lt;/u&gt; (or other applications that have a file and a db part)&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Step 1:&lt;/b&gt; Download mylvmbackup and mylvmbackup.conf&lt;br/&gt;Edit and place them in the bacula scripts directory (diffs follow)&lt;br/&gt;&lt;br/&gt;mylvmbackup&lt;br/&gt;19,26d18&lt;br/&gt;&amp;lt;&lt;br/&gt;&amp;lt; #&lt;br/&gt;&amp;lt; # Note I have edited two things here.&lt;br/&gt;&amp;lt; # a. $configfile to point to the actual file. Due to a bug I could not pass it as an option&lt;br/&gt;&amp;lt; # b. removed the default user from being the root (since the my.cnf will be used).&lt;br/&gt;&amp;lt; # c. and of course, I edited the file mylvmbackup.conf&lt;br/&gt;&amp;lt;&lt;br/&gt;&amp;lt;&lt;br/&gt;45c37&lt;br/&gt;&amp;lt; my $configfile = "/etc/bacula/scripts/mylvmbackup.conf";&lt;br/&gt;---&lt;br/&gt; /&amp;gt; my $configfile = "/etc/mylvmbackup.conf";&lt;br/&gt;116c108&lt;br/&gt;&amp;lt; }&lt;br/&gt;---&lt;br/&gt; /&amp;gt; }&lt;br/&gt;411c403&lt;br/&gt;&amp;lt;   $user = '';&lt;br/&gt;---&lt;br/&gt; /&amp;gt;   $user = 'root';&lt;br/&gt;&lt;br/&gt;mylvmbackup.conf&lt;br/&gt;&lt;br/&gt;16c16&lt;br/&gt;&amp;lt; user=&lt;br/&gt;---&lt;br/&gt; /&amp;gt; user=root&lt;br/&gt;18c18&lt;br/&gt;&amp;lt; host=localhost&lt;br/&gt;---&lt;br/&gt; /&amp;gt; host=&lt;br/&gt;21c21&lt;br/&gt;&amp;lt; mycnf=/etc/mysql/my.cnf&lt;br/&gt;---&lt;br/&gt; /&amp;gt; mycnf=/etc/my.cnf&lt;br/&gt;27,28c27,28&lt;br/&gt;&amp;lt; vgname=&lt;br/&gt;&amp;lt; lvname=&lt;br/&gt;---&lt;br/&gt; /&amp;gt; vgname=mysql&lt;br/&gt; /&amp;gt; lvname=data&lt;br/&gt;30c30&lt;br/&gt;&amp;lt; lvsize=10G&lt;br/&gt;---&lt;br/&gt; /&amp;gt; lvsize=5G&lt;br/&gt;88c88&lt;br/&gt;&amp;lt; skip_hooks=1&lt;br/&gt;---&lt;br/&gt; /&amp;gt; skip_hooks=0&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Step 2:&lt;/b&gt; In the file director with the website insert commented out the following in the file deamon (client) configuration file:&lt;br/&gt;# WebSite {&lt;br/&gt;#  Name = "Joomla_Website"&lt;br/&gt;#  dbuser ="joomuser"; dbpassword ="dbpasswd"&lt;br/&gt;#  dbname "Joomla";dbdir = "/path to db";&lt;br/&gt;#  dbvgname="dbvgname"; dblvname="database"; dbxfs=0;&lt;br/&gt;#  webdir ="/path to website";&lt;br/&gt;#  webvgname="dbwebname";weblvname="websites"; webxfs=0;&lt;br/&gt;# }&lt;br/&gt;&lt;br/&gt;With the following information:&lt;br/&gt;&lt;br/&gt;&lt;i&gt;REQUIRED&lt;/i&gt;&lt;br/&gt;Name: Unique name to identify the database&lt;br/&gt;dbuser: User name to access the database&lt;br/&gt;dbpassword: Password to access the database&lt;br/&gt;dbname: Name of the database (used for the dump in the non-lvm case)&lt;br/&gt;dbdir:&lt;br/&gt;      In the non lvm case, full path to dir where the temp sql dump will be placed.&lt;br/&gt;      In the lvm case, the relative path (in the lv) where the db is located.&lt;br/&gt;&lt;br/&gt;&lt;i&gt;OPTIONAL,&lt;/i&gt;  &lt;br/&gt;If the optional values are provided an LVM snapshot is used.&lt;br/&gt;&lt;br/&gt;&lt;i&gt;Database options&lt;/i&gt;&lt;br/&gt;dbvgname: Name of the volume group where the database resides.&lt;br/&gt;dblvname: The name of the logical volume where the database resides.&lt;br/&gt;dbxfs: Set to 1 if the snapshot volume has the xfs filesystem.&lt;br/&gt;&lt;br/&gt;&lt;i&gt;Website Data Directory options&lt;br/&gt;&lt;/i&gt; webdir: Directory where the data files reside&lt;br/&gt;       In the non-lvm case, this should be the actual directory.&lt;br/&gt;       In the lvm case, the relative path (in the lv) where the website is located&lt;br/&gt;       If not specified no website backup will be taken.&lt;br/&gt;webvgname: The name of the volume group where the data dir resides&lt;br/&gt;weblvname: The logical volume name where the data dir resides.&lt;br/&gt;webxfs: Set to 1 if the snapshot volume has the xfs filesystem.&lt;br/&gt;&lt;br/&gt;Also in the scripts directory copy the scripts mylvmbackup (see note above), &lt;br/&gt;backup_website  (and) &lt;br/&gt;backup_website_awk &lt;br/&gt;&lt;br/&gt;The awk script scans the file for configuration information and then the backup_website (sh)&lt;br/&gt;script is doing the actual work. In particular, to invoke the script&lt;br/&gt;&lt;br/&gt;backup_website _mode_of_operation_    jobname&lt;br/&gt;&lt;br/&gt;mode_of_operation has three possible choices:  snapshot, release, filelist&lt;br/&gt;jobname: Is the jobname as created by bacula.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Step 3: In the director I use the following&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;b&gt;&lt;u&gt;Terminology&lt;/u&gt;&lt;br/&gt;&lt;br/&gt;1. &lt;/b&gt;Glossary on &lt;b&gt;data storage&lt;/b&gt; schemes&lt;br/&gt;&lt;i&gt;Volume&lt;/i&gt;: A Volume is a single physical tape (or possibly a single file) on which Bacula will write your backup data.&lt;br/&gt;&lt;i&gt;Pools&lt;/i&gt;: Pools group together Volumes so that a backup is not restricted to the length of a single Volume (tape).&lt;br/&gt;&lt;i&gt;Label&lt;/i&gt;:Before Bacula will read or write a Volume, the physical Volume must have a Bacula software label so that Bacula can be sure the correct Volume is mounted. &lt;br/&gt;Console: The program that interfaces to the Director allowing the user or system administrator to control Bacula.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;2. &lt;/b&gt;There are a number of &lt;b&gt;deamons&lt;/b&gt; used to facilitate the operation:&lt;br/&gt;&lt;i&gt;Bacula-Director:&lt;/i&gt; The director is used to orchestrate all the backup operations&lt;br/&gt;&lt;i&gt;Bacula-SD &lt;/i&gt;(Storage Deamon): The storage demo is in charge of handling the storage devices&lt;br/&gt;&lt;i&gt;Bacula-FD&lt;/i&gt; (File Deamon) essentially this is the client software installed on the machine to be backed up.&lt;br/&gt;Upon installation all these deamons require (a minimal) configuration by editing their configuration&lt;br/&gt;files that reside on the /etc/bacula subdirectory. &lt;br/&gt;&lt;br/&gt;&lt;b&gt;3. &lt;/b&gt;Other &lt;b&gt;utilities/&lt;/b&gt;interfaces of note: &lt;br/&gt;&lt;i&gt;Bconsole: &lt;/i&gt;Console utility that starts whenever a user logs onto the console.&lt;br/&gt;&lt;i&gt;Bsmtp&lt;/i&gt;: smtp utility used to send messages to the administrators&lt;br/&gt;&lt;i&gt;BootStrapRecord&lt;/i&gt;: Is the crucial information used to recover files in case of a catastrophic failure of the server itself.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;4. &lt;/b&gt;Types of &lt;b&gt;backups:&lt;/b&gt;&lt;br/&gt;&lt;i&gt;Full: &lt;/i&gt;A full backup&lt;br/&gt;&lt;i&gt;Differential: &lt;/i&gt;A backup that includes all files that have changed since the last full backup,&lt;br/&gt;&lt;i&gt;Incremental: &lt;/i&gt;A backup that includes all the files changed since the last Full, Differential, or Incremental backup started. &lt;br/&gt;&lt;br/&gt;&lt;b&gt;5. &lt;/b&gt;Bacula &lt;b&gt;Jobs &lt;/b&gt;(Configuration Resource)&lt;br/&gt;A configuration resource that defines work that Bacula must perform to backup a particular client. It consists of:&lt;br/&gt;&lt;i&gt;Type:&lt;/i&gt; Backup, restore, verify, etc&lt;br/&gt;&lt;i&gt;Level:&lt;/i&gt;&lt;b&gt; &lt;/b&gt;Full, Incremental, Differential&lt;br/&gt;&lt;i&gt;Fileset: &lt;/i&gt;A Resource contained in a configuration file that defines the files to be backed up. It consists of a list&lt;br/&gt;   included files or directories, a list of excluded files, and how the file is to be stored. &lt;i&gt;&lt;br/&gt;Storage: &lt;/i&gt;Storage Device, Media Pool&lt;br/&gt;&lt;br/&gt;&lt;b&gt;6. &lt;/b&gt;Types of &lt;b&gt;Resources &lt;/b&gt;&lt;br/&gt;Jobs: See 5 above&lt;br/&gt;Restore: Describes the process of recovering a file from backup media. &lt;br/&gt;Schedule: Defines when a job will be scheduled for execution&lt;br/&gt;Verify: Operation (Job) to verify restored data. &lt;br/&gt;&lt;i&gt;Scan&lt;/i&gt;: A scan operation causes the contents of a Volume or a series of Volumes to be scanned. &lt;br/&gt;&lt;br/&gt;&lt;b&gt;7. &lt;/b&gt;Other &lt;b&gt;terminology&lt;/b&gt; and information repositories&lt;br/&gt;&lt;i&gt;Resource:&lt;/i&gt;&lt;b&gt; &lt;/b&gt;Part of a configuration file that defines a specific unit of information that is available to bacula. &lt;br/&gt;&lt;i&gt;Bootstrap file:&lt;/i&gt;&lt;b&gt; &lt;/b&gt;Is an ASCII file containing commands that allow Bacula to restore the contents of one or more volumes. &lt;br/&gt;&lt;i&gt;Catalog: &lt;/i&gt;The catalog stores summary information about Jobs, Clients, and Files that were backed up on a Volume.  &lt;br/&gt;&lt;i&gt;Retention Period: &lt;/i&gt;The most important are the File Retention Period, Job Retention Period, and the Volume Retention Period. Each of these retention periods applies to the time that specific records will be kept in the Catalog database.&lt;br/&gt;&lt;ul&gt;&lt;li&gt;This period is important for two reasons:the first is that as long as File records remain in the database, you&lt;br/&gt;can ”browse” the database with a console program and restore any individual file. Once the File records are removed or pruned from the database, the individual files of a backup job can no longer be ”browsed”. The second reason for carefully choosing the File Retention Period is because the volume of the database File records use the most storage space in the database. As a consequence, you must ensure that regular ”pruning” of the database file records is done to keep your&lt;br/&gt;database from growing too large.&lt;/li&gt;&lt;li&gt;The Job Retention Period is the length of time that Job records will be kept in the database. Note, all the File records are tied to the Job that saved those files. The File records can be purged leaving the Job records. In this case, information will be available about the jobs that ran, but not the details of the files that were backed up. Normally, when a Job record is purged, all its File records will also be purged.&lt;br/&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=092d9720-d00a-8146-9267-2ed5ee0d810e' alt='' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3990939591390512696-5582452968700718345?l=anosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anosi.blogspot.com/feeds/5582452968700718345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3990939591390512696&amp;postID=5582452968700718345' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3990939591390512696/posts/default/5582452968700718345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3990939591390512696/posts/default/5582452968700718345'/><link rel='alternate' type='text/html' href='http://anosi.blogspot.com/2009/06/bacula-installation-notes.html' title='Bacula Installation Notes'/><author><name>Arthur Dent</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3990939591390512696.post-1573908274175516414</id><published>2009-06-28T15:57:00.005+03:00</published><updated>2009-06-29T16:02:16.990+03:00</updated><title type='text'>RAID/LVM Notes</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;span style='font-family: arial; font-size: 100%;'&gt;&lt;span xmlns=''&gt;&lt;p&gt;&lt;b&gt;General Notes on the concept:&lt;br/&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;The following link provides a comprehensive description of the fundamental ideas behind LVM&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;a href='http://www.ibm.com/developerworks/linux/library/l-lvm2/index.html?ca=drs-'&gt;IBM Tutorial&lt;/a&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Following the (excellent) discussion above, LVM is an interesting solution because it offers the following possibilities:&lt;/p&gt;&lt;li style='margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 3px; font-family: arial,sans-serif;'&gt;In multiple disk installations, it offers the possibility of having filesystems larger than any of the disks&lt;br/&gt;&lt;/li&gt;&lt;li style='margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 3px; font-family: arial,sans-serif;'&gt;Add disks/partitions to your disk-pool and extend existing filesystems online&lt;/li&gt;&lt;li style='margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 3px; font-family: arial,sans-serif;'&gt;Replace two 80GB disks with one 160GB disk without the need to bring the system offline or manually move data between disks&lt;/li&gt;&lt;li style='margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 3px; font-family: arial,sans-serif;'&gt;Shrink filesystems and remove disks from the pool when their storage space is no longer necessary&lt;/li&gt;&lt;li style='margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 3px; font-family: arial,sans-serif;'&gt;Perform consistent backups using&lt;span class='Apple-converted-space'&gt; &lt;/span&gt;&lt;i&gt;snapshots&lt;/i&gt;&lt;span class='Apple-converted-space'&gt; &lt;/span&gt;(more on this later in the article)&lt;/li&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style='font-family: arial; font-size: 100%;'&gt;&lt;span&gt;&lt;span style='font-family: arial;'&gt;&lt;span&gt;&lt;span class='Apple-style-span' style='border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-family: &amp;apos;Times New Roman&amp;apos;;'&gt;&lt;span class='Apple-style-span' style='text-align: left;'&gt;This as we see below is not that big of a deal as long as one has a thorough understanding of the concepts.&lt;br/&gt;All this flexibility comes at a small added complexity in the sense that one has to properly describe the abstraction using CLI commands.&lt;br/&gt;The LVM is structured in three elements:&lt;br/&gt;&lt;ul style='margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 5px; font-size: 0.76em;'&gt;&lt;li style='margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 3px; font-family: arial,sans-serif;'&gt;Volumes:&lt;span class='Apple-converted-space'&gt; &lt;/span&gt;&lt;i&gt;physical&lt;/i&gt;&lt;span class='Apple-converted-space'&gt; &lt;/span&gt;and&lt;span class='Apple-converted-space'&gt; &lt;/span&gt;&lt;i&gt;logical volumes&lt;/i&gt;&lt;span class='Apple-converted-space'&gt; &lt;/span&gt;and&lt;span class='Apple-converted-space'&gt; &lt;/span&gt;&lt;i&gt;volume groups&lt;/i&gt;&lt;/li&gt;&lt;li style='margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 3px;' face='arial,sans-serif'&gt;Extents:&lt;span class='Apple-converted-space'&gt; &lt;/span&gt;&lt;i&gt;physical&lt;/i&gt;&lt;span class='Apple-converted-space'&gt; &lt;/span&gt;and&lt;span class='Apple-converted-space'&gt; &lt;/span&gt;&lt;i&gt;logical extents&lt;/i&gt;&lt;/li&gt;&lt;li style='font-family: arial,sans-serif; margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-right: 5px; padding-bottom: 3px;'&gt;Device mapper: the Linux kernel module&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;span class='Apple-style-span' style='border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-family: &amp;apos;Times New Roman&amp;apos;;'&gt;&lt;span class='Apple-style-span' style='text-align: left;'&gt;&lt;b&gt;Volume&lt;/b&gt;&lt;br/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class='Apple-style-span' style='border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-family: &amp;apos;Times New Roman&amp;apos;;'&gt;&lt;span class='Apple-style-span' style='text-align: left; font-family: arial;'&gt;Linux LVM is organized into:&lt;br/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style='font-family: arial;'&gt;&lt;span xmlns=''&gt;&lt;p&gt;&lt;span class='Apple-style-span' style='border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-family: &amp;apos;Times New Roman&amp;apos;;'&gt;&lt;span class='Apple-style-span' style='text-align: left; font-family: arial;'&gt;physical volumes (PVs),&lt;br/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style='font-family: arial;'&gt;&lt;span xmlns=''&gt;&lt;p&gt;&lt;span class='Apple-style-span' style='border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-family: &amp;apos;Times New Roman&amp;apos;;'&gt;&lt;span class='Apple-style-span' style='text-align: left; font-family: arial;'&gt;volume groups (VGs), and&lt;br/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style='font-family: arial;'&gt;&lt;span xmlns=''&gt;&lt;p&gt;&lt;span class='Apple-style-span' style='border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-family: &amp;apos;Times New Roman&amp;apos;;'&gt;&lt;span class='Apple-style-span' style='text-align: left; font-family: arial;'&gt;logical volumes (LVs).&lt;span class='Apple-converted-space'&gt;&lt;br/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style='font-family: arial;'&gt;&lt;span xmlns=''&gt;&lt;span class='Apple-style-span' style='border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-family: &amp;apos;Times New Roman&amp;apos;;'&gt;&lt;span class='Apple-style-span' style='text-align: left; font-family: arial;'&gt;&lt;i&gt;Physical volumes&lt;/i&gt;&lt;span class='Apple-converted-space'&gt; &lt;/span&gt;are physical disks or physical disk partitions (as in /dev/hda or /dev/hdb1). A&lt;span class='Apple-converted-space'&gt; &lt;/span&gt;&lt;i&gt;volume group&lt;/i&gt;&lt;span class='Apple-converted-space'&gt; &lt;/span&gt;is an aggregation of physical volumes. And a&lt;span class='Apple-converted-space'&gt; &lt;/span&gt;&lt;i&gt;volume group&lt;/i&gt;&lt;span class='Apple-converted-space'&gt; &lt;/span&gt;can be logically partitioned into logical volumes.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style='font-family: arial;'&gt;&lt;span xmlns=''&gt;&lt;p&gt;&lt;span class='Apple-style-span' style='border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-family: &amp;apos;Times New Roman&amp;apos;;'&gt;&lt;span class='Apple-style-span' style='text-align: left;'&gt;Figure 1: Physical-to-logical volume mapping&lt;br/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;span xmlns=''&gt;&lt;p&gt;&lt;img width='375' height='74' src='http://www.ibm.com/developerworks/linux/library/l-lvm2/figure2.gif' alt='Physical to logical volume mapping'/&gt;&lt;br/&gt;&lt;strong&gt;&lt;em/&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;em&gt;&lt;em&gt;&lt;b&gt;Extends&lt;/b&gt;&lt;br/&gt;&lt;/em&gt;&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;&lt;/span&gt;&lt;em&gt;&lt;em&gt;&lt;em&gt;&lt;em&gt;&lt;span xmlns=''&gt;&lt;p&gt;&lt;span class='Apple-style-span' style='border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-family: &amp;apos;Times New Roman&amp;apos;;'&gt;&lt;span class='Apple-style-span' style='text-align: left; font-family: arial;'&gt;In order to do the&lt;span class='Apple-converted-space'&gt; &lt;/span&gt;&lt;i&gt;n-to-m&lt;/i&gt;, physical-to-logical volumes mapping, PVs and VGs must share a common quantum size for their basic blocks; these are called&lt;span class='Apple-converted-space'&gt; &lt;/span&gt;&lt;i&gt;physical extents (PEs)&lt;/i&gt;&lt;span class='Apple-converted-space'&gt; &lt;/span&gt;and&lt;span class='Apple-converted-space'&gt; &lt;/span&gt;&lt;i&gt;logical extents (LEs)&lt;/i&gt;. Despite the n-physical to m-logical volume mapping, PEs and LEs always map 1-to-1. The&lt;br/&gt;following image illustrate this concept.&lt;br/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;span xmlns=''&gt;&lt;p&gt;&lt;img width='405' height='143' src='http://www.ibm.com/developerworks/linux/library/l-lvm2/figure4.gif' alt='Physical to logical extent mapping'/&gt;&lt;strong&gt;&lt;em&gt;&lt;br/&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-family: &amp;apos;Times New Roman&amp;apos;;' class='Apple-style-span'&gt;&lt;span style='text-align: left; font-family: arial;' class='Apple-style-span'&gt;Different extent sizes means different VG granularity. For instance, if you choose an extent size of 4GB, you can only shrink/extend LVs in steps of 4GB.&lt;/span&gt;&lt;/span&gt;&lt;span style='border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-family: &amp;apos;Times New Roman&amp;apos;;' class='Apple-style-span'&gt;&lt;span style='text-align: left; font-family: arial;' class='Apple-style-span'&gt; Of &lt;i&gt;importance &lt;/i&gt;is also  the extent allocation policy. LVM2 doesn't always allocate PEs contiguously; for more details, see the Linux man page on lvm. The system administrator can set different allocation policies, but that isn't normally necessary, since the default one (called the&lt;span class='Apple-converted-space'&gt; &lt;/span&gt;&lt;i&gt;normal &lt;em&gt;allocation &lt;/em&gt;policy&lt;/i&gt;) uses common-sense rules such as not placing parallel stripes on the same physical volume.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;b&gt;Device Mapper&lt;br/&gt;&lt;/b&gt;&lt;/span&gt;&lt;/em&gt;&lt;/em&gt;&lt;/em&gt;&lt;/em&gt;&lt;/span&gt;&lt;em&gt;&lt;em&gt;&lt;em&gt;&lt;span style='font-family: arial;'&gt;When creating VGs and LVs, you can give them a meaningful name (as opposed to the previous examples where, for didactic purposes, the names VG0, LV0, and LV1 were used). It is the Device mapper's job to map these names correctly to the physical devices. Using the previous examples, the Device mapper would create the following device nodes in the /dev filesystem:&lt;br/&gt;&lt;/span&gt;&lt;/em&gt;&lt;/em&gt;&lt;/em&gt;&lt;ul&gt;&lt;li&gt;&lt;em&gt;&lt;em&gt;&lt;em&gt;&lt;span style='font-family: arial;'&gt;/dev/mapper/VG0-LV0&lt;/span&gt;&lt;/em&gt;&lt;/em&gt;&lt;/em&gt;&lt;/li&gt;&lt;/ul&gt;&lt;em&gt;&lt;em&gt;&lt;em&gt;&lt;span style='font-family: arial;'&gt;with /dev/VG0/LV0 a link to the above.&lt;br/&gt;&lt;small&gt;&lt;font face='sans-serif'&gt;Note: Many distributions provide utilities to partition using LVM and/or RAID. RedHat has a very nice tool, but I will be using&lt;br/&gt;Ubuntu (since I very much prefer the apt-package management system). In Ubuntu, the alternate installation CD has&lt;br/&gt;partman and support for LVM/RAID... But this does not offer much flexibility in setting extent sizes, stripe sizes, etc. So I will be&lt;br/&gt;using the CLI to do much of the partitioning. Also note that LVM (and RAID) support must be included in the initrd for the&lt;br/&gt;system to be able to boot from an LVM volume. Ubuntu does this automatically, from version 9.04, what you need though is&lt;br/&gt;the server edition.&lt;/font&gt;&lt;/small&gt;&lt;br/&gt;&lt;br/&gt;&lt;em&gt;&lt;span xmlns=''&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;References&lt;br/&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;a href='http://www.ibm.com/developerworks/linux/library/l-lvm2/index.html?ca=drs-'&gt;IBM Tutorial&lt;/a&gt; , Logical Volume Management&lt;br/&gt;&lt;/li&gt;&lt;li&gt;    &lt;a target='_blank' href='http://tldp.org/HOWTO/LVM-HOWTO/'&gt;LVM-HOWTO&lt;/a&gt;, LVM Howto&lt;/li&gt;&lt;/ol&gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/em&gt;&lt;/em&gt;&lt;/em&gt;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3990939591390512696-1573908274175516414?l=anosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anosi.blogspot.com/feeds/1573908274175516414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3990939591390512696&amp;postID=1573908274175516414' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3990939591390512696/posts/default/1573908274175516414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3990939591390512696/posts/default/1573908274175516414'/><link rel='alternate' type='text/html' href='http://anosi.blogspot.com/2009/06/raidlvm-notes_28.html' title='RAID/LVM Notes'/><author><name>Arthur Dent</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3990939591390512696.post-6767324864760959961</id><published>2009-06-23T21:25:00.001+03:00</published><updated>2009-06-24T10:30:34.756+03:00</updated><title type='text'>Περί ελέγχου του σκληρού δίσκου</title><content type='html'>&lt;span xmlns=''&gt;&lt;p&gt;This is a post documenting efforts to recover data from a failed hard drive. The drive had a reiserfs filesystem and failed suddenly. I can't mount it or in any other way access my data, so I will be documenting here the investigations…&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Smartmon Tools:&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;It is possible to use the smartmon tools to check the health of the hard drive…&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;div&gt;Check the health of the drive&lt;br /&gt;&lt;/div&gt;&lt;p&gt;smartctl –H –d ata /dev/sda (if PASSED this is a good indication)&lt;br /&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;One can do more elaborate tests&lt;span style='font-family:Courier New; font-size:10pt'&gt;&lt;br /&gt;						&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:10pt'&gt;smartctl -t short –d ata /dev/sda     (or)&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:10pt'&gt;smartctl -t long –d ata /dev/sda&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;      smartctl -l selftest –d ata /dev/sda (to display results)&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;div&gt;&lt;span style='font-family:Courier New; font-size:10pt'&gt;And can also display the following&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;smartctl -a /dev/sda&lt;br /&gt;&lt;/p&gt;&lt;p&gt;smartctl -A /dev/sda&lt;br /&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Gives read failures by going for short and extended periods offline. Not good.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt; reiserfsk:&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;    reiserfsck –check /dev/sda&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style='font-family:Courier New; font-size:10pt'&gt;This gives out a warning that there is some sort of hardware failure. (Will get back to this later)&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;seatools:&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Now I moved it over to windows and tried tools offered by Seagate (it turns out that some of their drives are shipped with buggy firmware and this can cause an unexpected crash. The idea is to run their diagnostic tests and see if they pass. Tried with the Seagate web-site and it turns out that for my serial no firmware update is required. I run the updater utility (to update the firmware on my other drive) and it also updated the firmware in the messed up one as well. Some of the status messages changed but no change whatsoever on the drive accessibility. I do get errors with all their diagnostic tests (long/short dst, generic dst). &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;PCB:&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;After looking around a little it seems that for people having problems with their drives one way to fix them is to replace their PCB boards. This is  probably not an option for me as it seems that this is necessary when the drives are destroyed by a power surge or some anomaly. In my case the drive works "perfectly" (i.e. rotates) and the filesystems are recognized. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;badblocks:&lt;/strong&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;It is now time to investigate into bad blocks and the potential of, at least, partially recovering some data.   &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;References&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;a href='http://smartmontools.sourceforge.net/'&gt;Smartmon Tools&lt;/a&gt;&lt;br /&gt;				&lt;/li&gt;&lt;li&gt;&lt;a href='http://www.linuxjournal.com/article/6983/'&gt;Linux Journal Article&lt;/a&gt;&lt;br /&gt;				&lt;/li&gt;&lt;li&gt;&lt;a href='https://help.ubuntu.com/community/DataRecovery'&gt;Ubuntu Data Recovery&lt;/a&gt;&lt;br /&gt;				&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3990939591390512696-6767324864760959961?l=anosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anosi.blogspot.com/feeds/6767324864760959961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3990939591390512696&amp;postID=6767324864760959961' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3990939591390512696/posts/default/6767324864760959961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3990939591390512696/posts/default/6767324864760959961'/><link rel='alternate' type='text/html' href='http://anosi.blogspot.com/2009/06/dokimh.html' title='Περί ελέγχου του σκληρού δίσκου'/><author><name>Arthur Dent</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3990939591390512696.post-6403177308709029826</id><published>2009-03-15T14:04:00.001+02:00</published><updated>2009-03-15T14:06:37.087+02:00</updated><title type='text'></title><content type='html'>I just found out this tutorial on HOW to set up chroot sftp sessions....&lt;br /&gt;&lt;a href="http://www.minstrel.org.uk/papers/sftp/"&gt;chroot sftp &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Worked like a charm&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3990939591390512696-6403177308709029826?l=anosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anosi.blogspot.com/feeds/6403177308709029826/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3990939591390512696&amp;postID=6403177308709029826' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3990939591390512696/posts/default/6403177308709029826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3990939591390512696/posts/default/6403177308709029826'/><link rel='alternate' type='text/html' href='http://anosi.blogspot.com/2009/03/i-just-found-out-this-tutorial-on-how.html' title=''/><author><name>Arthur Dent</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3990939591390512696.post-7323186793063073686</id><published>2008-06-05T00:51:00.001+03:00</published><updated>2008-06-05T00:51:03.810+03:00</updated><title type='text'>Joomla Installation Notes</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Joomla is an open-source content management system licensed under the GPL license. &lt;br /&gt;Today I tried installing it on my laptop to give it a go. The thought is maybe to use &lt;br /&gt;some of the tools in a personal project. So here are some installation details. &lt;br /&gt;The linux distribution installed on my laptop is Ubuntu 8.04LTS. &lt;br /&gt;&lt;br /&gt;Steps: &lt;br /&gt;1) Install LAMP subsystem&lt;br /&gt;apt-get instal apache2 php5-mysql libapache2-mod-php5 mysql-server&lt;br /&gt;&lt;br /&gt;The post-processing script requests for the mysql server a username (root) and a password (supplied at prompt).&lt;br /&gt;&lt;br /&gt;2) Create Database &lt;br /&gt;&lt;br /&gt;mysql -u root -p &lt;br /&gt;&lt;br /&gt;The previously supplied password is provided and we enter the command line of the mysql server. &lt;br /&gt;&lt;br /&gt; show databases; &lt;br /&gt;&lt;br /&gt;Will show the databases. &lt;br /&gt;&lt;br /&gt; drop database db_name; &lt;br /&gt;&lt;br /&gt;Will remove the database&lt;br /&gt;&lt;br /&gt;To useful links &lt;a href='http://www.debian-administration.org/articles/39'&gt;here&lt;/a&gt; and &lt;a href='https://help.ubuntu.com/community/Joomla'&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt; create database joomla;&lt;br /&gt;&lt;br /&gt;To create a database for joomla!&lt;br /&gt;&lt;br /&gt; GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON joomla.* TO 'yourusername'@'localhost' IDENTIFIED BY 'yourpassword';&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Set's a user and a password and gives the right permissions.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; FLUSH PRIVILEGES;&lt;br /&gt;&lt;br /&gt;quit&lt;br /&gt;&lt;br /&gt;To quit mysql. &lt;br /&gt;&lt;br /&gt;3) Allow userdirs in apache&lt;br /&gt;&lt;br /&gt;In /etc/apache2 &lt;br /&gt;&lt;br /&gt;do symbolic links in the mods-enabled directory to userdir.load userdir.mod&lt;br /&gt; ln -s ../mods-available/userdir.load userdir.load&lt;br /&gt; ln -s ../mods-available/userdir.conf userdir.conf&lt;br /&gt;&lt;br /&gt;Edit as needed the userdir.conf file (by default the public_html directory is enabled at&lt;br /&gt;each user directory). &lt;br /&gt;&lt;br /&gt;And finally apply the changes by restarting apache:&lt;br /&gt;/etc/init.d/apache2 restart&lt;br /&gt;&lt;br /&gt;4) Now create in the home directory the public_html directory&lt;br /&gt;and download and extract the jumla tar-ball.&lt;br /&gt;&lt;br /&gt;tar xvfj Joomla_1.5.3-Stable-Full_Package.tar.bz2&lt;br /&gt;&lt;br /&gt;cd joomla_dir&lt;br /&gt;&lt;br /&gt; touch configuration.php; chown www-data.www-data configuration.php;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The following commands should help fix the permissions&lt;br /&gt;&amp;amp;lt;pre&amp;amp;gt;cd joomla&lt;br /&gt;PLACES='&lt;br /&gt;administrator/backups&lt;br /&gt;administrator/components&lt;br /&gt;administrator/language&lt;br /&gt;administrator/language/en-GB&lt;br /&gt;administrator/modules&lt;br /&gt;administrator/templates&lt;br /&gt;components&lt;br /&gt;images&lt;br /&gt;images/banners&lt;br /&gt;images/stories&lt;br /&gt;language&lt;br /&gt;language/en-GB&lt;br /&gt;language/pdf_fonts&lt;br /&gt;modules&lt;br /&gt;plugins&lt;br /&gt;plugins/content&lt;br /&gt;plugins/editors&lt;br /&gt;plugins/editors-xtd&lt;br /&gt;plugins/search&lt;br /&gt;plugins/system&lt;br /&gt;plugins/user&lt;br /&gt;plugins/xmlrpc&lt;br /&gt;tmp&lt;br /&gt;templates&lt;br /&gt;cache&lt;br /&gt;administrator/cache&lt;br /&gt;'&lt;br /&gt;for i in $PLACES; do&lt;br /&gt;    sudo chown -R www-data:www-data $i&lt;br /&gt;done&lt;br /&gt;&amp;amp;lt;/pre&amp;amp;gt;&amp;amp;lt;pre&amp;amp;gt;find . -type f -exec chmod 644 {} \;&lt;br /&gt;find . -type d -exec chmod 755 {} \;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;5) Now the web installation of joomla can commence. &lt;br /&gt;Point a browser to the joomla directory and follow the installation steps. &lt;br /&gt;&lt;br /&gt;6) As instructed by the web installer, delete the installation directory and we are ready &lt;br /&gt;to go!!!!&lt;br /&gt;&lt;br /&gt;Check permissions by going in the admin interface and selecting directory permissions. There everything should appear as writeable. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Some small notes:&lt;br /&gt;a) .htaccess can be used to control php behaviour locally for the joomla  installation&lt;br /&gt;b) max upload size should probably be modified, by editing php.ini, to a larger size.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3990939591390512696-7323186793063073686?l=anosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anosi.blogspot.com/feeds/7323186793063073686/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3990939591390512696&amp;postID=7323186793063073686' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3990939591390512696/posts/default/7323186793063073686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3990939591390512696/posts/default/7323186793063073686'/><link rel='alternate' type='text/html' href='http://anosi.blogspot.com/2008/06/joomla-installation-notes_1591.html' title='Joomla Installation Notes'/><author><name>Arthur Dent</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3990939591390512696.post-1072612876477615301</id><published>2008-04-15T12:35:00.010+03:00</published><updated>2008-04-15T16:53:34.143+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Computers'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>My new machine</title><content type='html'>Σκοπός μου είναι να κρατάω σημειώσεις αναφορικά με θέματα που ασχολούμαι. Σήμερα δοκιμάζω την εγκατάσταση ενός καινούργιου υπολογιστικού συστήματος για το γραφείο μου.&lt;br /&gt;Σε αυτό το post θα κρατάω σημειώσεις σχετικά με το configuration που επέλεξα.&lt;br /&gt;&lt;br /&gt;Λίγα λόγια για το σύστημά μου: Intel Q6600 (2.4 Ghz) υπερχρονισμένος (περισσότερα στη&lt;br /&gt;συνέχεια) με 4GΒ RAM και για λειτουργικό σύστημα το Ubuntu 7.10 64-bit.&lt;br /&gt;&lt;br /&gt;Γενικά σχόλια:&lt;br /&gt;&lt;br /&gt;Mobo: Asus P5KC&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Το mobo είναι ένα Asus p5KC που υποστηρίζει DDR2 και DDR3. Δεν είναι high-end αλλά γενικά η Asus φτιάχνει ποιοτικά mobos και επέλεξα το συγκεκριμένο (δες όμως σχόλια παρακάτω).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Το Northbridge είναι το p35, στο παρκάτω σχήμα φαίνονται τα λειτουργικά χαρακτηριστικά του: &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.intel.com/products/chipsets/P35/P35_Block_Diagram.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px;" src="http://www.intel.com/products/chipsets/P35/P35_Block_Diagram.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Σε dual-channel η μνήμη θεωρητικά σύμφωνα με το παραπάνω διάγραμμα μπορεί να&lt;br /&gt;μέγιστη ταχύτητα μεταφοράς 12.8GB/s (για DDR2) και 17GB/s (για DDR3). Λόγω της σχεδίασης του Northbridge, μπορεί να υπάρχει DDR2 ή DDR3. Όπως φαίνεται από το παραπάνω για λόγους απόδοσης θα προτιμούσαμε DDR3 μνήμες. Η πραγματικότητα είναι όμως διαφορετική, ανεπίσημα, πολλά mobos, και το P5KC δεν αποτελεί εξαίρεση , υποστηρίζουν PC2-8500 (1033Mhz) η οποία έχει 8.5GB/s ή σε dual mode 17GB/s. Άρα μπορούμε να πετύχουμε τον μέγιστο (θεωρητικά) ρυθμό μεταφοράς με DDR2 μνήμες, οι οποίες είναι σημαντικά φθηνότερες από τις αντίστοιχες DDR3. Έτσι επέλεξα 4-1GB modules PC2-8500 μνήμης.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Η Asus θεωρείται ότι βγάζει ποιοτικά mobos και προϊόντα. Αυτό μπορώ να το επιβεβαιώσω μιας και είναι πολύ καλά σχεδιασμένο με όλα τα connectors στην άκρη και τοποθέτηση στη σωστή θέση όλων των ports. Δεν θα έλεγα το ίδιο όμως και για το&lt;br /&gt;website τους, το οποίο είναι φτωχό αλλά και υπερβολικά αργό. Προσπαθούσα να κατεβάσω μια αναβάθμιση για το bios καθώς και το καινούργιο manual και περίμενα συνολικά πάνω από 10 λεπτά. Όσο για υποστήριξη, το μόνο που βρήκα ήταν ένα forum (hosted by Asus) το οποίο είχε αρκετή πληροφορία αλλά πολύ λίγο feedback από ανθρώπους της εταιρείας. Το manual είναι άχρηστο και άθλιο, κακογραμμένο και χωρίς ικανοποιητικές εξηγήσεις για όλες τις ρυθμίσεις στο bios (αυτό με ταλαιπώρησε απίστευτα).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Το Southbridge είναι το ICH9 και όπως φαίνεται από το παραπάνω σχήμα υποστηρίζει&lt;br /&gt;πολλές USB θύρες, καθώς 6 x1 PCI Express κανάλια. Το τελευταίο είναι χρήσιμο γιατί σκοπεύω να αγοράσω σύντομα και έναν RAID Controller ο οποίος θα μπορεί να τοποθετηθεί εκεί και θα έχει μέχρι 8 ports για σκληρούς δίσκους. Τέλος υπάρχει ικανοποιητική υποστήριξη για  (μέχρι 6)  SATA II σκληρούς. Μια ενδιαφέρουσα παρατήρηση είναι ότι στα Hi-Speed USB devices μοιράζονται το θεωρητικό μέγιστο (στην πραγματικότητα είναι πολύ χαμηλότερο) bandwidth ανά 2. Αυτός είναι και ο λόγος που &lt;span style="font-weight: bold;"&gt;δεν&lt;/span&gt; πρέπει να βάζουμε δύο υψηλής ταχύτητας συσκευές (όπως π.χ. εξωτερικούς σκληρούς δίσκους) στο ίδιο ζευγάρι ports.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Συμβουλή: Μην αγοράσετε mobo με το ICH9  επιλέξτε το ICH9R. Οι λόγοι πολλοί αλλά σε εμένα είναι σημαντικό ότι δεν υποστηρίζει AHCI. To ACHI επιτρέπει hot-plug support για SATA σκληρούς χρήσιμο ιδιαίτερα για εξωτερικούς σκληρούς που συνδέονται μέσω του eSATA interface, καθώς επίσης και &lt;a href="http://en.wikipedia.org/wiki/NCQ"&gt;NCQ&lt;/a&gt; το οποίο είναι ένα χαρακτηριστικό που παλαιότερα υπήρχε μόνο σε high-end SCSI δίσκους και πλέον υπάρχει και για SATA τύπου σκληρούς. Επίσης ο RAID controller που έχει το ICH9R είναι πλέον αρκετά ικανοποιητικός από πλευράς απόδοσης οπότε είναι εύκολο να φτιάξει κάποιος ένα Raid 5 configuration με ελάχιστο κόπο και προσπάθεια. Το μεγαλύτερο πρόβλημα για εμένα ήταν ότι: πρώτον, δεν δουλεύει σε linux, μιας και όλοι αυτοί οι onboard controllers δεν είναι πραγματικά hardware controllers και χρειάζονται υποστήριξη και από software το οποίο όμως δεν υπάρχει για linux; δεύτερον, δεν είναι αρκετά αξιόπιστοι και σε μια πτώση τάσης (που συμβαίνουν συχνά) μπορεί να δημιουργηθούν προβλήματα με το Raid (οπότε είναι καλό να υπάρχει και ένα UPS εάν θέλουμε να χρησιμοποιήσουμε αυτή τη λύση). Νομίζω ότι η πιό αξιόπιστη και αποτελεσματική λύση βέβαια είναι ένας πραγματικός Raid controller όπως αυτούς που έχει η 3ware οι οποίοι υποστηρίζονται πολύ καλά από linux (συμβουλή:  μακριά επίσης από φθηνιάρικους controllers όπως αυτούς που φτιάχνει η Promise).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Το ahci ήταν κάτι που ήθελα πραγματικά να χρησιμοποιήσω. Officially δεν υποστηρίζεται από τον ICH9 αλλά στις αρχικές εκδόσεις του Bios είχε ανεπίσημη υποστήριξη. Οι επόμενες αναβαθμίσεις όμως αφαίρεσαν την υποστήριξη και δεν υπάρχει καμία πληροφόρηση σχετικά με το εάν θα υπάρξει κάποια αλλαγή στο μέλλον. Η Gigabyte στα δικά της mobos προσφέρει ahci σαν επιλογή.  Πολύ κακό after-sales support από την Asus... Επίσης στα επίσημα forums υπάρχουν πολλοί που γκρινιάζουν για το ίδιο θέμα.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Το χειρότερο όμως είναι ότι το bios δεν έχει καλό memory handling. Εάν και διαφημίζουν ότι υποστηρίζουν PC2-8500 μνήμη, πολλοί αναφέρουν και το επιβεβαιώνω και εγώ ότι δεν μπορούν να δουλέψουν τη μνήμη σε πλήρη ταχύτητα. Καμία ανακοίνωση από την Asus και υπάρχουν πολλοί που περιμένουν (μάταια?) αναβαθμίσεις μπας και μπορέσουν να χρησιμοποιήσουν την (ακριβή σχετικά) PC2-8500 μνήμη τους.&lt;/li&gt;&lt;li&gt;Τέλος σε καταστάσεις πλήρους φορτίου το Vdroop είναι σημαντικό και αυτό είναι γνωστό πρόβλημα με τα Asus mobos. Δεν νομίζω ότι θα ξαναπάρω Asus, θα προτιμάω τα Gigabyte μάλλον.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Μνήμη: 4x Kingston Hyper-X (PC2-8500)&lt;br /&gt;&lt;br /&gt;Είναι το high-end μοντέλο μνήμης της Kingston, σχεδιασμένο για υπερχρονισμό και κάλυμα από αλουμίνιο για αποτελεσματικότερη ψύξη. Έχει καλά timings 5-5-5-15 στα 2.2V αλλά δυστυχώς το mobo της Asus δεν μου επιτρέπει να φτάσω τόσο ψηλά (δεν είναι και τόσο σημαντικό πρόβλημα όπως θα δούμε σε  άλλο post).&lt;br /&gt;&lt;br /&gt;Επεξεργαστής: Intel Core2Quad Q6600 (2.4Ghz)&lt;br /&gt;Πολύ καλός επεξεργαστής με (επιβεβαιωμένα) καλές δυνατότητες υπερχρονισμού.&lt;br /&gt;Τέσσερις πυρήνες. Τον υπερχρόνισα χωρίς ιδιαίτερα προβλήματα στα 3Ghz και θα μπορούσα αρκετά περισσότερο αλλά έκρινα ότι είναι μάλλον υπερβολικό και το άφησα εκεί.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Κουτί: Antec P182 (Highly Recommended)&lt;br /&gt;Το κουτί αυτό της Antec είναι εξαιρετικό και φτιαγμένο με μεγάλη προσοχή στη λεπτομέρεια για αθόρυβη και αποτελεσματική λειτουργία των υπολογιστικών υποσυστημάτων. Ορισμένα ενδιαφέροντα λειτουργικά χαρακτηριστικά:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.antec.com/images/400/p182_q_op.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px;" src="http://www.antec.com/images/400/p182_q_op.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Στα περισσότερα κουτιά το τροφοδοτικό είναι στο πάνω και πίσω μέρος του κουτιού. Το τροφοδοτικό παράγει αρκετή θερμότητα κατά τη λειτουργία του.  Για καλά τροφοδοτικά (80 Plus certification, δηλαδή πάνω από 80% βαθμός απόδοσης), περίπου 20% της ισχύος μετατρέπεται σε θερμότητα. Αυτό σημαίνει 60-80W σε συνθήκες πλήρους λειτουργίας, θερμότητα η οποία πρέπει να απαχθεί ώστε να μην οδηγήσει σε αυξημένες θερμοκρασίες. Η λύση της Antec είναι να δημιουργήσει έναν χωριστό θάλαμο στο κάτω μέρος και να τοποθετήσει εκεί το τροφοδοτικό καθώς επίσης και τους σκληρούς δίσκους οι οποίοι παράγουν άλλα 10-15w (ανά σκληρό δίσκο). Ένας αθόρυβος ανεμιστήρας στη μέση κυκλοφορεί αέρα στον κάτω θάλαμο με αποτέλεσμα να απαγάγεται η θερμότητα από το πίσω μέρος του κουτιού. Ο ανεμιστήρας είναι έτσι τοποθετημένος ώστε αέρας να κινείται από το μπροστά μέρος προς το πίσω μέσα από το τροφοδοτικό και έξω από το πίσω μέρος. Τα υπόλοιπα υποσυστήματα του υπολογιστή δεν επηρεάζονται μιας και βρίσκονται στον πάνω θάλαμο.&lt;br /&gt;Έτσι επιτυγχάνεται αποτελεσματική ψύξη των σκληρών (ιδιαίτερα ευαίσθητοι σε υψηλές θερμοκρασίες) αλλά και του τροφοδοτικού.&lt;br /&gt;&lt;br /&gt;Το όλο κουτί είναι σχεδιασμένο για (σχετικά) αθόρυβη λειτουργία. Έτσι ο ανεμιστήρας είναι&lt;br /&gt;μεγάλης διαμέτρου (120mm) και λειτουργεί σε χαμηλές στροφές (έτσι το επίπεδο θορύβου είναι σχετικά χαμηλό). Οι σκληροί δίσκοι τοποθετούνται σε μεταλλικό χώρο και προσαρμόζονται σε αυτό με ελαστικά παρεμβύσματα ώστε να υπάρχει επιπλέον απορρόφηση κραδασμών και να μην μεταφέρονται αυτοί στο μεταλλικό πλαίσιο. Αυτό είναι καλό για αθόρυβη λειτουργία του υπολογιστή αλλά κακό από θερμικής απόψεως μιας και οι σκληροί δεν ακουμπούν στο μεταλλικό πλαίσιο (που είναι καλύτερος αγωγός της θερμότητας). Η εξαναγκασμένη όμως συναγωγή που οφείλεται στον ανεμιστήρα διατηρεί τη θερμοκρασία των σκληρών δίσκων σε εξαιρετικά επίπεδα (35-40 C), πολύ κάτω από τα όρια που θέτουν οι κατασκευαστές (περίπου 60 C).&lt;br /&gt;&lt;br /&gt;Επίσης το κουτί είναι φτιαγμένο ώστε να μην υπάρχουν καλώδια αλλά να περνάνε πίσω από την επιφάνεια που ακουμπάει η μητρική. Έτσι ο πάνω χώρος του κουτιού, όπου βρίσκεται η μητρική και ο επεξεργαστής, είναι τελείως κενός από καλώδια και όλα περνάνε από το πίσω μέρος. Επιτυγχάνεται έτσι καλή κυκλοφορία του άερα και καλή ψύξη των διαφόρων υποσυστημάτων. Η Antec έχει βάλει επίσης δύο ανεμιστήρες στο πίσω και πάνω μέρος του κουτιού, σε σημείο που να είναι πολύ κοντά στο σημείο που συνήθως τοποθετείται ο επεξεργαστής. Είναι ρυθμισμένοι ώστε να μεταφέρουν αέρα προς τα έξω και ουσιαστικά απαγάγουν τη θερμότητα που παράγεται στον επεξεργαστή. Αυτή είναι αρκετά σημαντική μιας και o Q6600 (stepping G0) έχει ονομαστική θερμική ισχύ (95w) και υπερχρονισμένος παράγει ακόμα περισσότερη θερμότητα. Μια καλή ψύκτρα σε συνδιασμό με τους δύο ανεμιστήρες βοηθούν να κρατηθεί η θερμοκρασία σε λογικά επίπεδα ακόμα και υπό συνθήκες υψηλών υπολογιστικών φορτίων.&lt;br /&gt;&lt;br /&gt;Άλλη σημαντική παράμετρος στο σχεδιασμό του συστήματος είναι η κάρτα γραφικών. Επειδή με ενδιαφέρει περισσότερο ο θόρυβος λειτουργίας από την υψηλή απόδοση σε γραφικά, διάλεξα την Asus 8600 GT Silent , με παθητικό σύστημα ψύξης που έχει μηδενικό επίπεδο θορύβου. Επίσης οι μνήμες (όπου λόγω του υπερχρονισμού ανεβάζουν σχετικά υψηλές θερμοκρασίες) διατηρούν λογικές θερμοκρασίες λόγω του αλουμινένιου (υψηλή θερμική αγωγιμότητα) περίβληματος αλλά και λόγω της καλής κυκλοφορίας αέρα στο κουτί.&lt;br /&gt;&lt;br /&gt;Τέλος για λόγους ηχομόνωσης όλες οι παράπλευρες επιφάνειες του κουτιού είναι φτιαγμένες από τρία στρώματα (ατσάλι, πλαστικό, αλουμίνιο). Αυτό κάνει τις παράπλευρες επιφάνειες να έχουν χαρακτηριστικές ιδιοσυχνότητες πολύ διαφορετικές από αυτές που έχουν τα συνηθισμένα κουτιά. Έτσι αποφεύγονται φαινόμενα συντονισμού και ο εσωτερικός θόρυβος δε μεταφέρεται προς τα έξω.&lt;br /&gt;&lt;br /&gt;Τέλος το κουτί στηρίζεται σε ελαστικές βάσεις ώστε να υπάρχει επιπλέον απορρόφηση των κραδασμών. Όλα τα παραπάνω επιτρέπουν την αθόρυβη λειτουργία του υπολογιστή.&lt;br /&gt;&lt;br /&gt;Σκληρός Δίσκος: ST31000340AS&lt;br /&gt;&lt;br /&gt;Τροφοδοτικό: Corsair 550W&lt;br /&gt;&lt;br /&gt;Σύνοψη:&lt;br /&gt;&lt;br /&gt;Με σχετικά χαμηλό κόστος (&lt;1000Ε) κατασκευάστηκε ένα υπολογιστικό σύστημα υψηλών επιδόσεων και, το δυσκολότερο, με πολύ χαμηλά επίπεδα θορύβου.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3990939591390512696-1072612876477615301?l=anosi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://anosi.blogspot.com/feeds/1072612876477615301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3990939591390512696&amp;postID=1072612876477615301' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3990939591390512696/posts/default/1072612876477615301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3990939591390512696/posts/default/1072612876477615301'/><link rel='alternate' type='text/html' href='http://anosi.blogspot.com/2008/04/blog-post_15.html' title='My new machine'/><author><name>Arthur Dent</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
