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

<channel>
	<title>tolaris.com &#187; rsync</title>
	<atom:link href="http://www.tolaris.com/tag/rsync/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tolaris.com</link>
	<description>When the going gets tough, the tough sniff packets.</description>
	<lastBuildDate>Tue, 24 Jan 2012 17:47:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Upgrading from Kubuntu 9.10 to 10.04</title>
		<link>http://www.tolaris.com/2010/08/04/upgrading-from-kubuntu-9-10-to-10-04/</link>
		<comments>http://www.tolaris.com/2010/08/04/upgrading-from-kubuntu-9-10-to-10-04/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 20:39:36 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[karmic]]></category>
		<category><![CDATA[kde]]></category>
		<category><![CDATA[lucid]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=967</guid>
		<description><![CDATA[Last week I upgraded from Kubuntu 9.10 &#8220;Karmic Koala&#8221; to 10.04 &#8220;Lucid Lynx&#8221;. The word &#8220;upgrade&#8221; here is misleading, since I chose to reformat to take advantage of filesystem changes. However, I imported much of my customisations from backup. Here are my notes on Lucid, from the perspective of a long-time Kubuntu user. My opinion [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I upgraded from Kubuntu 9.10 &#8220;Karmic Koala&#8221; to 10.04 &#8220;Lucid Lynx&#8221;. The word &#8220;upgrade&#8221; here is misleading, since I chose to reformat to take advantage of filesystem changes. However, I imported much of my customisations from backup. Here are my notes on Lucid, from the perspective of a long-time Kubuntu user.</p>
<p><span id="more-967"></span>My opinion is that Lucid improves on <a href="/2009/11/01/upgrading-from-kubuntu-9-04-to-9-10/">Karmic</a> in almost every way. That&#8217;s not saying much, since the KDE 4 upgrade has been so painful. We&#8217;re finally back to KDE 3.5 functionality, and speed is improving with each release. On the other hand, there are a lot of new features in the OS since Hardy &#8211; grub2, ext4, ecryptfs, upstart, kernel mode setting, compositing window management, Strigi indexing and Nepomuk semantic desktop. Some of these have dramatically improved performance, while others have increased system requirements just to add eye candy. It&#8217;s hard to evaluate KDE on its own, so I&#8217;m not going to focus on that.</p>
<p>I backed up my entire drive to an external USB drive formatted for ext3 using <a href="/tag/rsync/">rsync</a>. I then booted from the Kubuntu 10.04 AMD64 Desktop CD, and followed the default install options until the disk partitioning step. I always install with separate /, /home, and swap partitions (this normally makes upgrades easier, unless you are reformatting as I did here). I used ext4 for / and /home, and chose to encrypt my home directory. I then followed the rest of the steps and rebooted at the end.</p>
<p>Following the reboot, I used rsync to restore my lost files and most of my dotfiles &#8211; .mozilla, .gnome, .gconf, .Virtualbox, and the like. However, I did not restore .kde. Instead I manually copied only some configs, for KGPG, Akregator, and Kopete. The rest of my KDE apps I reconfigured from scratch. I did this because we use Kolab at work, which integrates with Kontact but can be fussy with local contacts files. As of Lucid, Kontact uses Akonadi to manage contacts. I expected trouble, and found it. More on that later.</p>
<p>Finally, since I have an encrypted home directory, I also encrypted swap and created a tmpfs on /tmp. I followed the steps in <a href="/2009/11/14/securing-laptops-with-ecryptfs-cryptsetup-and-tmpfs/">my guide</a>, and rebooted with no problems.</p>
<p>What&#8217;s better:</p>
<p>The <strong>ext4</strong> filesystem is noticeably faster. This is the reason I reformatted instead of upgrading. I used ext3 under Karmic, and really wanted to see if what I&#8217;d been hearing about the speedy new filesystem is true. It is. It&#8217;s faster for booting and it&#8217;s faster for reading large data. My Virtualbox virtual machines load in almost half the time, even compared to the same Virtualbox 3.2.6 release on Karmic. I suppose there could be other differences contributing to this but it really stands out. I haven&#8217;t run an fsck yet but others report that it is much faster as well.</p>
<p>ext4 has definitely improved performance of copying data inside my encrypted home directory. I barely notice the performance hit from using ecryptfs now. The only time I do is when using rsync to compare large directories (like when my backup process examines my mail archive).</p>
<p>There is a new <strong>touchpad control</strong> in KDE Control Center. This enables gestures, including two-finger scrolling (but not pinch-to-zoom, which I hope is forthcoming), and different actions for tapping in corners, multi-finger tapping, and so on. Still missing is tap suppression (accidentally tapping while typing), so I still use syndaemon. Create ~/.kde/Autostart/syndaemon.sh, make it executable, and insert:</p>
<pre>#!/bin/sh
# Disable touchpad while typing to prevent accidental tapping.
/usr/bin/syndaemon -d -t -i 1</pre>
<p>The <strong>device notifier plasmoid</strong> now has multiple actions when opening attached storage devices, and can be configured to automatically mount drives. This is a vast improvement.</p>
<p>The <strong>system tray plasmoid</strong> now obeys my auto-hide preferences. Under Jaunty and Karmic, some applications had overriding preferences that caused them to always be hidden or visible. For instance, it was impossible to make KGPG always visible. I frequently use KGPG, so this caused me to almost always have the system tray expanded to show all applications.</p>
<p><strong>Firefox/KDE integration</strong> works very well. Open/save file dialogs use KDE, and menus and icons use KDE defaults. The printer dialog is still the native Firefox one.</p>
<p><strong>virt-manager</strong> is vastly improved. The GUI is more responsive when connecting, is prettier, and has graphs for CPU, disk, and network I/O.</p>
<p><strong>ClusterSSH</strong> works with KWin again. Since 8.10, <a href="http://sourceforge.net/projects/clusterssh/">ClustterSSH</a> has been nearly broken in KDE. First, simply starting it caused copy (to clipboard or selection) to stop working in most QT/KDE apps. Second, the ClusterSSH master window would grab focus and prevent you from giving focus to any of its children xterms. This made it very hard to run commands on just one host without running it on all. I gave up and used various other techniques for managing my servers. But nothing beats ClusterSSH for managing 2-20 servers at once, and I&#8217;ve sorely missed it. Welcome back, old friend!</p>
<p>What needed tweaking:</p>
<p>The <strong>Oxygen</strong> window decoration theme still doesn&#8217;t colourise the active window. Open System Settings, go to &#8220;Appearance&#8221;, then the &#8220;Windows&#8221; side bar.  Under the &#8220;Window Decoration&#8221; tab, choose &#8220;Oxygen&#8221;.  Under the &#8220;Decoration Options&#8221; area, choose the &#8220;Fine Tuning&#8221; sub-tab. Check &#8220;Outline active window title&#8221;.</p>
<p><strong>Hotkeys in Kmenu</strong> are ignored. I use a few quick-launch shortcuts, such as &#8220;Win+T&#8221; to start a terminal. You can set these when editing the K menu, but they are <a href="http://kubuntuforums.net/forums/index.php?topic=3110677.0">ignored by default</a>. Open System Settings, select &#8220;Input Actions&#8221;, and then check &#8220;KMenuEdit&#8221;.</p>
<p><strong>VirtualBox and virt-manager</strong> don&#8217;t play well together. I don&#8217;t use Xen or KVM on my desktop, but I do manage several KVM-based virtual machine servers. Thanks to the new &#8220;install recommends&#8221; preference in the package manager, simply installing virt-manager also installs libvirt-bin. This loads the kvm-intel or kvm-amd modules on boot, which then <a href="http://forums.virtualbox.org/viewtopic.php?p=52266&#038;sid=f2a1898a3036872a16717f7e52e8b4e3">prevents VirtualBox from starting virtual machines</a>, with the error &#8220;VirtualBox can&#8217;t operate in VMX root mode. Please disable the KVM kernel extension, recompile your kernel and reboot (VERR_VMX_IN_VMX_ROOT_MODE).&#8221;</p>
<p>I suppose this is really a problem with the &#8220;install recommends&#8221; behaviour. I&#8217;ve complained about that elsewhere, but I always repeat a good gripe when the opportunity presents.</p>
<p>The solution is to edit /etc/default/libvirt-bin and disable libvirtd:</p>
<pre>start_libvirtd="no"</pre>
<p>And for good measure, blacklist the modules. Create /etc/modprobe.d/local.conf and insert:</p>
<pre>blacklist kvm-intel
blacklist kvm-amd</pre>
<p>What still needs work:</p>
<p><strong>Akonadi</strong> doesn&#8217;t start before Kontact tries to access it. <a href="http://kubuntuforums.net/forums/index.php?topic=3112175.0">This solution</a> (autostarting &#8220;akonadictl start&#8221; at login) worked for me, although I (painfully) developed it independently. If only I had used Google.</p>
<p><strong>openvpn with knetworkmanager</strong> still doesn&#8217;t work. I still prefer Gnome&#8217;s network manager applet, which works just fine with Kubuntu. Kill knetworkmanager, and start nm-applet. Next time you login, KDE will tell you that another network manager is running, and ask you if you still want to use Knetworkmanager. Say no. Also, OpenVPN support is more reliable under Lucid. Using Gnome network manager with Kubuntu Karmic, the OpenVPN service would periodically fail to start. Editing VPN preferences and then hitting OK sometimes resolved it, but at other times it was an annoying and random dance to make it work. This seems to be resolved under Lucid.</p>
<p><strong>OpenOffice/KDE integration</strong> is improved since Karmic, but still has drawing bugs. In particular, the zoom slider in the lower right often disappears. It&#8217;s still there, and clicking in the area makes it reappear and zooms. I prefer the &#8220;100% / 75% / &#8230;&#8221; pull-down of the stock OpenOffice theme, however. This is a vast improvement over the Karmic integration, where simply dragging a spreadsheet tab in Calc crashed OpenOffice, but I&#8217;d like to see more development here.</p>
<p>Otherwise, <a href="/2009/11/01/upgrading-from-kubuntu-9-04-to-9-10/">my comments</a> regarding Karmic still hold. Google Earth and Kwin play nicely, qtcurve (KDE/GTK integration) is awesome and no longer has the font bug, and Plasma and Kwin are faster and more stable. Lucid is no great leap forward and Kubuntu is still not an innovator among KDE distributions like Ubuntu is to Gnome. But it is an incremental improvement worth using if you prefer KDE.</p>
<p>I have had a Lucid <a href="/apt-repository/">repository</a> since upgrading my media PC and servers. It now includes dfreer&#8217;s znes32 for AMD64 (still working on Lucid) and kregexpeditor (you can have it when you pry it from my cold, dead hands).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2010/08/04/upgrading-from-kubuntu-9-10-to-10-04/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Moving cPanel services and /home/virtfs</title>
		<link>http://www.tolaris.com/2009/10/28/moving-cpanel-services-and-homevirtfs/</link>
		<comments>http://www.tolaris.com/2009/10/28/moving-cpanel-services-and-homevirtfs/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 08:10:30 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[rsync]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=551</guid>
		<description><![CDATA[We are currently moving our customer hosting platform from our old colo to our new one. The servers run cPanel on CentOS 4. The process of moving these services goes something like this: install new servers at new location of same or similar model as the old servers, and load them with a basic CentOS [...]]]></description>
			<content:encoded><![CDATA[<p>We are currently moving our customer hosting platform from our old colo to our new one.  The servers run <a href="http://www.cpanel.net/">cPanel</a> on <a href="http://www.centos.org/">CentOS</a> 4.  The process of moving these services goes something like this:</p>
<ol>
<li>install new servers at new location of same or similar model as the old servers, and load them with a basic CentOS install</li>
<li>rsync oldserver:/ to newserver:/ including customer files</li>
<li>reboot new server and fix whatever goes wrong (MAC addresses changing, etc)</li>
<li>move BGP announcement of hosting IP range to new colo</li>
<li>shut down and remove old servers</li>
</ol>
<p>The actual process is more complicated.  During step 2, I hit a problem with cPanel&#8217;s /home/virtfs directory tree.</p>
<p><span id="more-551"></span>cPanel users with shell access use a facility called jailshell.  Jailshell limits a user to a subtree of the filesystem that only reveals their own files.  Jailshell does this by creating a basic root directory structure under /home/virtfs/username, and using rbind mounts to give access to parts of the root filesystem.</p>
<p>This has been documented <a href="http://platonic.techfiz.info/2008/10/17/cpanel-jailshell-virtfs-unmount/">elsewhere</a>, but you should not run the commands in that blog.  Thankfully the author made a syntax error in his &#8220;for .. umount&#8221; script, because if it did run correctly you&#8217;d unmount all your filesystems including /.</p>
<p>These files in /home/virtfs are NOT hardlinks or symlinks, but are actually the real files in your root filesystem.  If you delete them, you&#8217;ll delete the real files in /.  Mount&#8217;s &#8220;rbind&#8221; feature allows one directory to be mounted in several places in the filesystem, which is what is happening here.</p>
<p>These directories should be mostly empty when users aren&#8217;t logged in.  Sometimes users fail to logout from jailshell, and in that case the rbind mounts will remain.  You can remove them, but only after you unmount the rbind mounts.  First make sure no users are logged in:</p>
<pre>root@example.com:~# who
root     pts/0        Oct 28 06:13 (10.0.0.1)</pre>
<p>Then you can unmount these directories with a loop:</p>
<p><code>for i in `cat /proc/mounts | grep /home/virtfs | cut -d ' ' -f 2 ` ; do umount $i ; done</code></p>
<p>My concern is using rsync to clone my server.  When I do this, I do not want to copy /home/virtfs at all.  So I&#8217;ll use an rsync excludes file.  First create /root/rsync-filter:</p>
<pre>- core.*
- /dev/
- /lib/modules/*/volatile/
- /media/
- /mnt/
- /proc/
- /sys/
- /tmp/
- /var/lock/
- /var/run/
- /var/tmp/
- /boot/grub/
- /etc/mdadm/
- /etc/fstab
- /etc/mtab
- /etc/resolv.conf
#- /etc/sysconfig/network-scripts/ifcfg-eth0*
- /home/virtfs/
- /root/screenlog.*
- /root/rsync-filter
- /var/spool/cron/root
</pre>
<p>The first part of this is my &#8220;boilerplate&#8221; rsync exclude that I always use when cloning servers.  If you use &#8216;rsync -x&#8217; you can leave some of it out, but it&#8217;s best to be safe.  Note that I&#8217;ve commented out the line for ifcfg-eth0.  This is because, while I&#8217;m testing, I want my new server to stay on a temporary IP address.  Once I clone that file it will come up on the old server&#8217;s IP, so I&#8217;ll only do that last, just before the final reboot.</p>
<p>You can also see that I&#8217;m skipping all of /home/virtfs.  Since the contents here are created on demand by jailshell, you won&#8217;t need it.</p>
<p>I&#8217;m ready to clone the server, so I run (on the old server):</p>
<p><code>rsync -av --delete --exclude-from /root/rsync-filter / root@newserver:/ -n</code></p>
<p>Once you verify that is doing exactly what you expect, remove the &#8216;-n&#8217; and run it again.  If you are in the habit of running rsync without a dry-run first, you will eventually regret it.  Like C, rsync gives you enough rope to shoot yourself in the foot.</p>
<p>The rest of the migration is another story.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2009/10/28/moving-cpanel-services-and-homevirtfs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

