<?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>Linux Archives - IT Blog Site</title>
	<atom:link href="https://www.lavatelli.it/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.lavatelli.it/category/linux/</link>
	<description>Lavatelli IT Blog Site</description>
	<lastBuildDate>Thu, 30 Sep 2021 14:22:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.5</generator>

<image>
	<url>https://www.lavatelli.it/wp-content/uploads/2019/02/ice_dragon-150x145.gif</url>
	<title>Linux Archives - IT Blog Site</title>
	<link>https://www.lavatelli.it/category/linux/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Strace a future linux process by name</title>
		<link>https://www.lavatelli.it/strace-a-future-linux-process-by-name/</link>
		
		<dc:creator><![CDATA[Franz]]></dc:creator>
		<pubDate>Tue, 15 Oct 2019 16:29:35 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">https://www.lavatelli.it/?p=498</guid>

					<description><![CDATA[<p>The post <a href="https://www.lavatelli.it/strace-a-future-linux-process-by-name/">Strace a future linux process by name</a> appeared first on <a href="https://www.lavatelli.it">IT Blog Site</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="entry">


<pre class="wp-block-code"><code>while true; do pid=$(pgrep 'ipmi-sensors' | head -1); if [[ -n "$pid" ]]; then strace  -s 2000 -vvtf -p "$pid"; break; fi; done</code></pre>


</div><p><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fstrace-a-future-linux-process-by-name%2F&amp;linkname=Strace%20a%20future%20linux%20process%20by%20name" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fstrace-a-future-linux-process-by-name%2F&amp;linkname=Strace%20a%20future%20linux%20process%20by%20name" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fstrace-a-future-linux-process-by-name%2F&amp;linkname=Strace%20a%20future%20linux%20process%20by%20name" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fstrace-a-future-linux-process-by-name%2F&amp;linkname=Strace%20a%20future%20linux%20process%20by%20name" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fstrace-a-future-linux-process-by-name%2F&amp;linkname=Strace%20a%20future%20linux%20process%20by%20name" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.lavatelli.it%2Fstrace-a-future-linux-process-by-name%2F&#038;title=Strace%20a%20future%20linux%20process%20by%20name" data-a2a-url="https://www.lavatelli.it/strace-a-future-linux-process-by-name/" data-a2a-title="Strace a future linux process by name"></a></p><p>The post <a href="https://www.lavatelli.it/strace-a-future-linux-process-by-name/">Strace a future linux process by name</a> appeared first on <a href="https://www.lavatelli.it">IT Blog Site</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>OpsView wrong ipmi result</title>
		<link>https://www.lavatelli.it/opsview-wrong-ipmi-result/</link>
		
		<dc:creator><![CDATA[Franz]]></dc:creator>
		<pubDate>Tue, 15 Oct 2019 16:27:51 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Varie]]></category>
		<guid isPermaLink="false">https://www.lavatelli.it/?p=496</guid>

					<description><![CDATA[<p>Opsview cache the result into /var/log/nagios/.freeipmi/sdr-cache with file named by ip address. Remove them to recreate cache from new device</p>
<p>The post <a href="https://www.lavatelli.it/opsview-wrong-ipmi-result/">OpsView wrong ipmi result</a> appeared first on <a href="https://www.lavatelli.it">IT Blog Site</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="entry">


<p class="wp-block-paragraph">Opsview cache the result into /var/log/nagios/.freeipmi/sdr-cache with file named by ip address.</p>



<p class="wp-block-paragraph">Remove them to recreate cache from new device</p>


</div><p><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fopsview-wrong-ipmi-result%2F&amp;linkname=OpsView%20wrong%20ipmi%20result" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fopsview-wrong-ipmi-result%2F&amp;linkname=OpsView%20wrong%20ipmi%20result" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fopsview-wrong-ipmi-result%2F&amp;linkname=OpsView%20wrong%20ipmi%20result" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fopsview-wrong-ipmi-result%2F&amp;linkname=OpsView%20wrong%20ipmi%20result" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fopsview-wrong-ipmi-result%2F&amp;linkname=OpsView%20wrong%20ipmi%20result" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.lavatelli.it%2Fopsview-wrong-ipmi-result%2F&#038;title=OpsView%20wrong%20ipmi%20result" data-a2a-url="https://www.lavatelli.it/opsview-wrong-ipmi-result/" data-a2a-title="OpsView wrong ipmi result"></a></p><p>The post <a href="https://www.lavatelli.it/opsview-wrong-ipmi-result/">OpsView wrong ipmi result</a> appeared first on <a href="https://www.lavatelli.it">IT Blog Site</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Powershell script to import LDAP object into exchange contact</title>
		<link>https://www.lavatelli.it/powershell-script-to-import-ldap-object-into-exchange-contact/</link>
		
		<dc:creator><![CDATA[Franz]]></dc:creator>
		<pubDate>Fri, 01 Feb 2019 16:55:35 +0000</pubDate>
				<category><![CDATA[AD]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">https://www.lavatelli.it/?p=463</guid>

					<description><![CDATA[<p>Whith this powershell script, it&#8217;s possible to import external ldap object into active directory mail-contact. Exchange will parse and create a list of contact available for everyone. The script will clear all OU before importing.</p>
<p>The post <a href="https://www.lavatelli.it/powershell-script-to-import-ldap-object-into-exchange-contact/">Powershell script to import LDAP object into exchange contact</a> appeared first on <a href="https://www.lavatelli.it">IT Blog Site</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="entry">


<p class="wp-block-paragraph">Whith this powershell script, it&#8217;s possible to import external ldap object into active directory mail-contact.</p>



<p class="wp-block-paragraph">Exchange will parse and create a list of contact available for everyone.</p>



<p class="wp-block-paragraph">The script will clear all OU before importing.<br></p>



<pre class="wp-block-code"><code>$ErrorActionPreference = 'Stop'
#load Exchange pssnapin
Add-PSSnapIn Microsoft.Exchange.Management.PowerShell.SnapIn
#load Assembly DirectoryServices
&#91;System.Reflection.Assembly]::LoadWithPartialName("System.DirectoryServices.Protocols") 
&#91;System.Reflection.Assembly]::LoadWithPartialName("System.Net") 
$body = ""
start-transcript
get-date
#---------------------------------------------
$OUS="TEST","TEST2","TEST3"
foreach ($OU in $OUS)
{
	#----------------------------------------------------------------------------------------------------------
	#load user and password to logon in Openldap
	$count = 0
	$UserName = "uid=reader,ou=users,dc=test,dc=eu"  
	$Password = "CgtCat34"
	$BODY= $body + "`n Processing OU "+$OU+"`n"
	$filter = "(objectclass=inetOrgPerson)"
	#Insert openLDAP source server and the OU of the company created in this openLDAP 
	$domain = "LDAP://10.241.37.1:389/o="+$OU+",dc=test,dc=eu"

	#Launch the search in the openLDAP
	$root = New-Object -TypeName System.DirectoryServices.DirectoryEntry($domain,$UserName,$Password,'FastBind')
	$query = New-Object System.DirectoryServices.DirectorySearcher($root,$filter)
	$objuser = $query.findall()
	#write-host "NO ERROR"
	#exit(1)
	get-mailcontact -ResultSize Unlimited -OrganizationalUnit ("OU="+$OU+",OU=LDAP-XXX,DC=TEST,DC=local") -filter {CustomAttribute11 -ne $null}|set-mailcontact -CustomAttribute11 ""
	Start-Sleep -s 30 #delay of 30 seconds to let AD to replicate the contact in the DCS servers

	#search user by user in the openLDAP ou
	foreach ($user in $objUser.GetEnumerator()) {
	  
		#this counter is only a security counter and for testing porpouses, in case of you dont want to launch all users at the same time
		if ($count -ge 0) #insert the number of users you want to import
		{ 
			write-host "-------------------------------------------------------"
			#select the mail of the user in openLDAP
			if ($user.properties.mail -eq $null)
			{ 
				$smtpmail=""
				write-host "the contact has empty email address" $user.properties.displayname
			}
			else
			{
				$smtpmail=""
				$smtpmail = &#91;Microsoft.Exchange.Data.ProxyAddress]("$($user.properties.mail)")		
			}

		if(-not(&#91;string]::IsNullOrEmpty($smtpmail.SmtpAddress))) # check if the smtp field is not empty
		{
		
		$mail = $smtpmail.SmtpAddress        
		write-host $user.properties.cn
	   
		If (&#91;string]$user.properties.displayname -ne (Get-MailContact (&#91;string]$user.properties.displayname) -ErrorAction silentlycontinue)) #check if the user exist in the AD yet   
		{
			If ( (get-mailcontact -ResultSize Unlimited  -OrganizationalUnit ("OU="+$OU+",OU=LDAP-XXX,DC=TEST,DC=local") -filter {WindowsEmailAddress -eq $mail}) -eq $null ) 
			{
				write-host "the contact doesnt exist, I create it"
				#change the OU where the contacts will be created in your AD, changing "-organizationalunit" property
				New-MailContact -Name $user.properties.cn -DisplayName $user.properties.displayname -FirstName $user.properties.givenname -LastName $user.properties.sn -OrganizationalUnit ("OU="+$OU+",OU=LDAP-XXX,DC=TEST,DC=local") -ExternalEmailAddress $mail #-Alias $_.mailNickname
				Start-Sleep -s 30 #delay of 15 seconds to let AD to replicate the contact in the DCS servers		
				Write-host "update contacts properties.... " $user.properties.displayname
				Set-Contact -identity (&#91;string]$user.properties.displayname) -Phone $user.properties.telephonenumber -mobilePhone $user.properties.mobile -Office $user.properties.physicaldeliveryofficename -Title $user.properties.title -Department $user.properties.department -Company $user.properties.o -city $user.properties.l
				set-Mailcontact -identity (&#91;string]$user.properties.displayname) -CustomAttribute10 $OU
				Set-Mailcontact -identity (&#91;string]$user.properties.displayname) -CustomAttribute11 "updated"
				$BODY=$BODY+"ADDED "+$user.properties.displayname+"`n"
			}
			else
			{
				write-host "contact has been renamed"
			}
		}
		Else
		{
			write-host "the contact exist"
			Write-host "update contacts properties.... " $user.properties.displayname
			Set-Contact -identity (&#91;string]$user.properties.displayname) -Phone $user.properties.telephonenumber -mobilePhone $user.properties.mobile -Office $user.properties.physicaldeliveryofficename -Title $user.properties.title -Department $user.properties.department -Company $user.properties.o -city $user.properties.l
			Set-Mailcontact -identity (&#91;string]$user.properties.displayname) -CustomAttribute10 $OU -ForceUpgrade
			Set-Mailcontact -identity (&#91;string]$user.properties.displayname) -CustomAttribute11 "updated" -ForceUpgrade
			#$BODY=$BODY+"UPDATED "+$user.properties.displayname+"`n"
		}
		
		
		}
		$count++
		}
	}
	#Remove all contact not updated
	Start-Sleep -s 60 #delay of 60 seconds to let AD to replicate the contact in the DCS servers
	Write-host "start removing removed contact.... "
	$removed=get-mailcontact -ResultSize Unlimited  -OrganizationalUnit ("OU="+$OU+",OU=LDAP-XXX,DC=TEST,DC=local") -filter {CustomAttribute11 -eq $null}|% { $_.Name}
	if ($removed) {
		$body = $body + "REMOVED " + ($removed -join "`nREMOVED ")
		$body = $body + "`n------------------------------------------------------`n"
	}
	get-mailcontact -OrganizationalUnit ("OU="+$OU+",OU=LDAP-XXX,DC=TEST,DC=local") -filter {CustomAttribute11 -eq $null}|remove-mailcontact -Confirm:$false
}
#----------------------------------------------------------------------------------------------------------
get-date
stop-transcript
$log = Get-childitem -Filter *.txt c:\users\administrator\Documents | sort LastWriteTime | select -last 1
send-mailmessage -from "Administrator &lt;administrator@test.it>" -to "Test &lt;dest@email.com>" -subject "LDAP Import" -attachment C:\users\administrator\Documents\$log -body $BODY -smtpServer smtp.isp.it
#----------------------------------------------------------------------------------------------------------
$Daysback = "-7"
 
$CurrentDate = Get-Date
$DatetoDelete = $CurrentDate.AddDays($Daysback)
Get-ChildItem -Filter *.txt c:\users\administrator\Documents | Where-Object { $_.LastWriteTime -lt $DatetoDelete } | Remove-Item
</code></pre>


</div><p><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fpowershell-script-to-import-ldap-object-into-exchange-contact%2F&amp;linkname=Powershell%20script%20to%20import%20LDAP%20object%20into%20exchange%20contact" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fpowershell-script-to-import-ldap-object-into-exchange-contact%2F&amp;linkname=Powershell%20script%20to%20import%20LDAP%20object%20into%20exchange%20contact" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fpowershell-script-to-import-ldap-object-into-exchange-contact%2F&amp;linkname=Powershell%20script%20to%20import%20LDAP%20object%20into%20exchange%20contact" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fpowershell-script-to-import-ldap-object-into-exchange-contact%2F&amp;linkname=Powershell%20script%20to%20import%20LDAP%20object%20into%20exchange%20contact" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fpowershell-script-to-import-ldap-object-into-exchange-contact%2F&amp;linkname=Powershell%20script%20to%20import%20LDAP%20object%20into%20exchange%20contact" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.lavatelli.it%2Fpowershell-script-to-import-ldap-object-into-exchange-contact%2F&#038;title=Powershell%20script%20to%20import%20LDAP%20object%20into%20exchange%20contact" data-a2a-url="https://www.lavatelli.it/powershell-script-to-import-ldap-object-into-exchange-contact/" data-a2a-title="Powershell script to import LDAP object into exchange contact"></a></p><p>The post <a href="https://www.lavatelli.it/powershell-script-to-import-ldap-object-into-exchange-contact/">Powershell script to import LDAP object into exchange contact</a> appeared first on <a href="https://www.lavatelli.it">IT Blog Site</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to add program available to user under CageFS</title>
		<link>https://www.lavatelli.it/how-to-add-program-available-to-user-under-cagefs/</link>
		
		<dc:creator><![CDATA[Franz]]></dc:creator>
		<pubDate>Thu, 17 May 2018 15:30:46 +0000</pubDate>
				<category><![CDATA[CloudLinux]]></category>
		<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">http://www.lavatelli.it/?p=432</guid>

					<description><![CDATA[<p>CloudLinux servers are built to be far more secure than traditional CentOS servers, especially with the addition of CageFS. However, sometimes you might want to allow your users access to some of the commands that are disabled by default. In our example we needed to enable rsync.  If this is your problem, you and your ...</p>
<p>The post <a href="https://www.lavatelli.it/how-to-add-program-available-to-user-under-cagefs/">How to add program available to user under CageFS</a> appeared first on <a href="https://www.lavatelli.it">IT Blog Site</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="entry">
<p><a href="http://www.cloudlinux.com">CloudLinux</a> servers are built to be far more secure than traditional CentOS servers, especially with the addition of CageFS. However, sometimes you might want to allow your users access to some of the commands that are disabled by default. In our example we needed to enable rsync. <span id="more-1026"></span></p>
<p>If this is your problem, you and your user will see errors that look like these:</p>
<p><code>testuser@host [/]# rsync<br />
jailshell: rsync: command not found<br />
testuser@host [/]# exit<br />
[host root@host ~]cPs# su leepangc<br />
testuser@host [/]# rsync<br />
bash: rsync: command not found</code></p>
<p>First, check to make sure the command isn’t included with this command:</p>
<p><code>[/]# cagefsctl --list-rpm | grep -i rsync</code></p>
<p>If the output is blank, that’s definitely your problem. The fix is a quick one:</p>
<p><code>[/]# cagefsctl --addrpm rsync<br />
[/]# cagefsctl --update</code></p>
<p>Once that is done, your users will be able to use rsync without error.</p>
</div>
<p><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fhow-to-add-program-available-to-user-under-cagefs%2F&amp;linkname=How%20to%20add%20program%20available%20to%20user%20under%20CageFS" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fhow-to-add-program-available-to-user-under-cagefs%2F&amp;linkname=How%20to%20add%20program%20available%20to%20user%20under%20CageFS" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fhow-to-add-program-available-to-user-under-cagefs%2F&amp;linkname=How%20to%20add%20program%20available%20to%20user%20under%20CageFS" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fhow-to-add-program-available-to-user-under-cagefs%2F&amp;linkname=How%20to%20add%20program%20available%20to%20user%20under%20CageFS" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fhow-to-add-program-available-to-user-under-cagefs%2F&amp;linkname=How%20to%20add%20program%20available%20to%20user%20under%20CageFS" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.lavatelli.it%2Fhow-to-add-program-available-to-user-under-cagefs%2F&#038;title=How%20to%20add%20program%20available%20to%20user%20under%20CageFS" data-a2a-url="https://www.lavatelli.it/how-to-add-program-available-to-user-under-cagefs/" data-a2a-title="How to add program available to user under CageFS"></a></p><p>The post <a href="https://www.lavatelli.it/how-to-add-program-available-to-user-under-cagefs/">How to add program available to user under CageFS</a> appeared first on <a href="https://www.lavatelli.it">IT Blog Site</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to increase the size of a linux lvm by expanding the virtual machine disk</title>
		<link>https://www.lavatelli.it/how-to-increase-the-size-of-a-linux-lvm-by-expanding-the-virtual-machine-disk/</link>
		
		<dc:creator><![CDATA[Franz]]></dc:creator>
		<pubDate>Wed, 02 May 2018 09:07:14 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">http://www.lavatelli.it/?p=422</guid>

					<description><![CDATA[<p>Increasing the virtual hard disk First off we increase the allocated disk space on the virtual machine itself. This is done by right clicking the virtual machine in vSphere, selecting edit settings, and then selecting the hard disk. In the below image I have changed the previously set hard disk of 20gb to 30gb while ...</p>
<p>The post <a href="https://www.lavatelli.it/how-to-increase-the-size-of-a-linux-lvm-by-expanding-the-virtual-machine-disk/">How to increase the size of a linux lvm by expanding the virtual machine disk</a> appeared first on <a href="https://www.lavatelli.it">IT Blog Site</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="entry">
<p><strong>Increasing the virtual hard disk</strong></p>
<p>First off we increase the allocated disk space on the virtual machine itself. This is done by right clicking the virtual machine in vSphere, selecting edit settings, and then selecting the hard disk. In the below image I have changed the previously set hard disk of 20gb to 30gb while the virtual machine is up and running. Once complete click OK, this is all that needs to be done in VMware for this process.</p>
<p><a href="http://www.lavatelli.it/how-to-increase-the-size-of-a-linux-lvm-by-expanding-the-virtual-machine-disk/vm_settings/" rel="attachment wp-att-426"><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-426" src="https://www.lavatelli.it/wp-content/uploads/2018/05/vm_settings.png" alt="" width="487" height="429" /></a></p>
<p>If you are not able to modify the size of the disk, the provisioned size setting is greyed out. This can happen if the virtual machine has a snapshot in place, these will need to be removed prior to making the changes to the disk. Alternatively you may need to shut down the virtual machine if it does not allow you to add or increase disks on the fly, if this is the case make the change then power it back on.<br />
<strong>Detect the new disk space</strong></p>
<p>Once the physical disk has been increased at the hardware level, we need to get into the operating system and create a new partition that makes use of this space to proceed.</p>
<p>Before we can do this we need to check that the new unallocated disk space is detected by the server, you can use “fdisk -l” to list the primary disk. You will most likely see that the disk space is still showing as the same original size, at this point you can either reboot the server and it will detect the changes on boot or you can rescan your devices to avoid rebooting by running the below command. Note you may need to change host0 depending on your setup.</p>
<p>echo 1&gt;/sys/block/sda/device/rescan</p>
<p>Below is an image after performing this and confirming that the new space is displaying.</p>
<p><a href="http://www.lavatelli.it/how-to-increase-the-size-of-a-linux-lvm-by-expanding-the-virtual-machine-disk/fdisk2/" rel="attachment wp-att-424"><img decoding="async" class="alignnone size-full wp-image-424" src="https://www.lavatelli.it/wp-content/uploads/2018/05/fdisk2.png" alt="" width="523" height="224" /></a></p>
<p><strong>Partition the new disk space</strong></p>
<p>As outlined in my previous images the disk in my example that I am working with is /dev/sda, so we use fdisk to create a new primary partition to make use of the new expanded disk space. Note that we do not have 4 primary partitions already in place, making this method possible.</p>
<p>fdisk /dev/sda</p>
<p>We are now using fdisk to create a new partition, the inputs I have entered in are shown below in bold. Note that you can press ‘m’ to get a full listing of the fdisk commands.</p>
<p>‘n’ was selected for adding a new partition.</p>
<p>WARNING: DOS-compatible mode is deprecated. It&#8217;s strongly recommended to<br />
switch off the mode (command &#8216;c&#8217;) and change display units to<br />
sectors (command &#8216;u&#8217;).</p>
<p>Command (m for help): n</p>
<p>‘p’ is then selected as we are making a primary partition.</p>
<p>Command action<br />
l logical (5 or over)<br />
p primary partition (1-4)<br />
p</p>
<p>As I already have /dev/sda1 and /dev/sda2 as shown in previous images, I have gone with using ‘3’ for this new partition which will be created as /dev/sda3</p>
<p>Partition number (1-4): 3</p>
<p>We just press enter twice above as by default the first and last cylinders of the unallocated space should be correct. After this the partition is then ready.</p>
<p>First cylinder (2611-3916, default 2611): &#8220;enter&#8221;<br />
Using default value 2611<br />
Last cylinder, +cylinders or +size{K,M,G} (2611-3916, default 3916): &#8220;enter&#8221;<br />
Using default value 3916</p>
<p>‘t’ is selected to change to a partition’s system ID, in this case we change to ‘3’ which is the one we just created.</p>
<p>Command (m for help): t<br />
Partition number (1-5): 3</p>
<p>The hex code ‘8e’ was entered as this is the code for a Linux LVM which is what we want this partition to be, as we will be joining it with the original /dev/sda5 Linux LVM.</p>
<p>Hex code (type L to list codes): 8e<br />
Changed system type of partition 3 to 8e (Linux LVM)</p>
<p>‘w’ is used to write the table to disk and exit, basically all the changes that have been done will be saved and then you will be exited from fdisk.</p>
<p>Command (m for help): w<br />
The partition table has been altered!</p>
<p>Calling ioctl() to re-read partition table.</p>
<p>WARNING: Re-reading the partition table failed with error 16: Device or resource busy.<br />
The kernel still uses the old table. The new table will be used at<br />
the next reboot or after you run partprobe(8) or kpartx(8)<br />
Syncing disks.</p>
<p>You will see a warning which basically means in order to use the new table with the changes a system reboot is required. If you can not see the new partition using “fdisk -l” you may be able to run “partprobe -s” to rescan the partitions. In my test I did not require either of those things at this stage (I do a reboot later on), straight after pressing ‘w’ in fdisk I was able to see the new /dev/sda3 partition of my 10gb of space as displayed in the below image.</p>
<p>For CentOS/RHEL run a “partx -a /dev/sda3” to avoid rebooting later on.</p>
<p><a href="http://www.lavatelli.it/how-to-increase-the-size-of-a-linux-lvm-by-expanding-the-virtual-machine-disk/fdisk3/" rel="attachment wp-att-425"><img decoding="async" class="alignnone size-full wp-image-425" src="https://www.lavatelli.it/wp-content/uploads/2018/05/fdisk3.png" alt="" width="524" height="241" /></a></p>
<p>That’s all for partitioning, we now have a new partition which is making use of the previously unallocated disk space from the increase in VMware.<br />
Increasing the logical volume</p>
<p>We use the pvcreate command which creates a physical volume for later use by the logical volume manager (LVM). In this case the physical volume will be our new /dev/sda3 partition.</p>
<p>root@Mega:~# pvcreate /dev/sda3<br />
Device /dev/sda3 not found (or ignored by filtering).</p>
<p>In order to get around this you can either reboot, or use partprobe/partx as previously mentioned to avoid a reboot, as in this instance the disk does not appear to be there correctly despite showing in “fdisk -l”. After a reboot or partprobe/partx use the same command which will succeed.</p>
<p>root@Mega:~# pvcreate /dev/sda3<br />
Physical volume &#8220;/dev/sda3&#8221; successfully created</p>
<p>Next we need to confirm the name of the current volume group using the vgdisplay command. The name will vary depending on your setup, for me it is the name of my test server. vgdisplay provides lots of information on the volume group, I have only shown the name and the current size of it for this example.</p>
<p>root@Mega:~# vgdisplay<br />
&#8212; Volume group &#8212;<br />
VG Name Mega<br />
&#8230;<br />
VG Size 19.76 GiB</p>
<p>Now we extend the ‘Mega’ volume group by adding in the physical volume of /dev/sda3 which we created using the pvcreate command earlier.</p>
<p>root@Mega:~# vgextend Mega /dev/sda3<br />
Volume group &#8220;Mega&#8221; successfully extended</p>
<p>Using the pvscan command we scan all disks for physical volumes, this should confirm the original /dev/sda5 partition and the newly created physical volume /dev/sda3</p>
<p>root@Mega:~# pvscan<br />
PV /dev/sda5 VG Mega lvm2 [19.76 GiB / 0 free]<br />
PV /dev/sda3 VG Mega lvm2 [10.00 GiB / 10.00 GiB free]<br />
Total: 2 [29.75 GiB] / in use: 2 [29.75 GiB] / in no VG: 0 [0 ]</p>
<p>Next we need to increase the logical volume (rather than the physical volume) which basically means we will be taking our original logical volume and extending it over our new partition/physical volume of /dev/sda3.</p>
<p>Firstly confirm the path of the logical volume using lvdisplay. This path name will vary depending on your setup.</p>
<p>root@Mega:~# lvdisplay<br />
&#8212; Logical volume &#8212;<br />
LV Path /dev/Mega/root</p>
<p>The logical volume is then extended using the lvextend command.</p>
<p>root@Mega:~# lvextend /dev/Mega/root /dev/sda3<br />
Extending logical volume root to 28.90 GiB<br />
Logical volume root successfully resized</p>
<p>There is then one final step which is to resize the file system so that it can take advantage of this additional space, this is done using the resize2fs command for ext based file systems. Note that this may take some time to complete, it took about 30 seconds for my additional space.</p>
<p>root@Mega:~# resize2fs /dev/Mega/root<br />
resize2fs 1.41.12 (17-May-2010)<br />
Filesystem at /dev/Mega/root is mounted on /; on-line resizing required<br />
old desc_blocks = 2, new_desc_blocks = 2<br />
Performing an on-line resize of /dev/Mega/root to 7576576 (4k) blocks.<br />
The filesystem on /dev/Mega/root is now 7576576 blocks long.</p>
<p>Alternatively if you’re running the XFS file system (default as of RedHat/CentOS 7) you can grow the file system with “xfs_growfs /dev/Mega/root”.</p>
<p>That’s it, now with the ‘df’ command we can see that the total available disk space has been increased.</p>
<p><a href="http://www.lavatelli.it/how-to-increase-the-size-of-a-linux-lvm-by-expanding-the-virtual-machine-disk/df2/" rel="attachment wp-att-423"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-423" src="https://www.lavatelli.it/wp-content/uploads/2018/05/df2.png" alt="" width="455" height="129" /></a></p>
</div>
<p><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fhow-to-increase-the-size-of-a-linux-lvm-by-expanding-the-virtual-machine-disk%2F&amp;linkname=How%20to%20increase%20the%20size%20of%20a%20linux%20lvm%20by%20expanding%20the%20virtual%20machine%20disk" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fhow-to-increase-the-size-of-a-linux-lvm-by-expanding-the-virtual-machine-disk%2F&amp;linkname=How%20to%20increase%20the%20size%20of%20a%20linux%20lvm%20by%20expanding%20the%20virtual%20machine%20disk" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fhow-to-increase-the-size-of-a-linux-lvm-by-expanding-the-virtual-machine-disk%2F&amp;linkname=How%20to%20increase%20the%20size%20of%20a%20linux%20lvm%20by%20expanding%20the%20virtual%20machine%20disk" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fhow-to-increase-the-size-of-a-linux-lvm-by-expanding-the-virtual-machine-disk%2F&amp;linkname=How%20to%20increase%20the%20size%20of%20a%20linux%20lvm%20by%20expanding%20the%20virtual%20machine%20disk" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fhow-to-increase-the-size-of-a-linux-lvm-by-expanding-the-virtual-machine-disk%2F&amp;linkname=How%20to%20increase%20the%20size%20of%20a%20linux%20lvm%20by%20expanding%20the%20virtual%20machine%20disk" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.lavatelli.it%2Fhow-to-increase-the-size-of-a-linux-lvm-by-expanding-the-virtual-machine-disk%2F&#038;title=How%20to%20increase%20the%20size%20of%20a%20linux%20lvm%20by%20expanding%20the%20virtual%20machine%20disk" data-a2a-url="https://www.lavatelli.it/how-to-increase-the-size-of-a-linux-lvm-by-expanding-the-virtual-machine-disk/" data-a2a-title="How to increase the size of a linux lvm by expanding the virtual machine disk"></a></p><p>The post <a href="https://www.lavatelli.it/how-to-increase-the-size-of-a-linux-lvm-by-expanding-the-virtual-machine-disk/">How to increase the size of a linux lvm by expanding the virtual machine disk</a> appeared first on <a href="https://www.lavatelli.it">IT Blog Site</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Create a MySQL Slave using Replication with No Downtime</title>
		<link>https://www.lavatelli.it/create-a-mysql-slave-using-replication-with-no-downtime/</link>
		
		<dc:creator><![CDATA[Franz]]></dc:creator>
		<pubDate>Tue, 22 Nov 2016 14:38:52 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[hcp]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[no downtime]]></category>
		<category><![CDATA[replication]]></category>
		<guid isPermaLink="false">http://www.lavatelli.it/?p=380</guid>

					<description><![CDATA[<p>I have a customer who has over 100GB of MySQL data and taking their site down for even a few minutes is not feasible. I really wanted to get a slave set up in case the main server ever dies. Even though the server is backed up, it would take 2-3 hours (or longer) to ...</p>
<p>The post <a href="https://www.lavatelli.it/create-a-mysql-slave-using-replication-with-no-downtime/">Create a MySQL Slave using Replication with No Downtime</a> appeared first on <a href="https://www.lavatelli.it">IT Blog Site</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="entry">
<div class="entry-content">
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-382" src="http://www.lavatelli.it/wp-content/uploads/2016/11/2013060316014742_1.jpg" alt="2013060316014742_1" width="475" height="323" /></p>
<p>I have a customer who has over 100GB of MySQL data and taking their site down for even a few minutes is not feasible. I really wanted to get a slave set up in case the main server ever dies. Even though the server is backed up, it would take 2-3 hours (or longer) to restore the MySQL server which is not very acceptable.</p>
<p>The solution is to use replication. The traditional problem with this approach is locking the tables for so long while the mysqldump happens… for a database this size, close to 4-5 hours.</p>
<p>Idera’s Free Tool called <a href="http://www.lavatelli.it/linux-shadow-copy/">Linux Hot Copy (hcp)</a> was the answer I was looking for. By using hcp, you can lock the tables, make a near instant “snapshot”, record the master position, and unlock the tables. At your leisure, just copy the snapshot of the mysql data to your slave device, and start up your replication! This makes setting up new slaves a snap with minimal impact on your business.</p>
<p><i>First off, I will assume you have a production MySQL server in use and running. In my scenario, I am using CentOS 5.6 64Bit and MySQL 5.5. This tutorial will probably will work for older versions as well. I also will assume you know how to edit and copy files at the linux command line. If you don’t, you probably should get help from an experienced system administrator.</i></p>
<p>If you have not done so already, set up another mysql server for your slave. It should be a decent server, equal to your current live production server so you can switch to it in the event of failure.</p>
<p>I will also assume:</p>
<p><strong>master server = 192.168.1.100</strong><br />
<strong>slave server = 192.168.2.200</strong></p>
<p><i>You’ll need to substitute your IP Addressess in place of mine.</i></p>
<p><b>On Master Server (192.168.1.100):</b></p>
<p><b>1. Install <a href="http://www.lavatelli.it/linux-shadow-copy/">Linux Hot Copy. Linux Hot Copy</a></b>. If you need help with installation, here’s some <a href="http://www.lavatelli.it/linux-shadow-copy/">documentation</a></p>
<p><b>2. Setup your Server ID and enable bin-logs.</b> Note that bin logs record every change to your database, so make sure you have ample space to continue!)</p>
<p>Edit your /etc/my.cnf file and put these lines at the top, just under the [mysqld] line.</p>
<pre><code># enable mysql bin logs and server-id for mysql replication
       log-bin=mysql-bin
       server-id=1</code></pre>
<p>Restart MySQL so bin logs are started. e.g. /etc/init.d/mysql restart you can verify it’s working by issuing the show master statusG command.</p>
<p><b>3. Create a user that has replication privs on the Master Server.</b></p>
<pre><code>mysql&gt; GRANT REPLICATION SLAVE ON *.* TO 'repl'@'192.168.2.200' IDENTIFIED BY 'password';</code></pre>
<p>4. The next few steps will need to be done <strong>quickly</strong> so that you minimize your mysql server’s downtime. Make sure you know up-front the device (e.g. /dev/sda2) where your MySQL installation is located (typically /var/lib/mysql on CentOS):</p>
<p><b>Lock your Master MySQL Tables and show the status location of the bin log….</b></p>
<pre><code>mysql&gt; FLUSH TABLES WITH READ LOCK; SHOW MASTER STATUS;</code></pre>
<p><b>Make sure you record and copy the information down, e.g. the filename and log position</b></p>
<p>From the command line, enter the following command, replacing /dev/sda2 with your raw device:</p>
<pre><code>hcp /mnt/snap /dev/sda2</code></pre>
<p>Back to MySQL, unlock your tables:</p>
<pre><code>mysql&gt; unlock tables;</code></pre>
<p>Now you have a perfect copy of your “frozen” data at the following location: (may vary)..</p>
<pre><code>FROZEN DATA LOCATION:
/mnt/snap</code></pre>
<p><b>On Slave Server: 192.168.2.200</b></p>
<p>On the slave server, make sure MySQL is stopped and move the old mysql folder: (<b>make sure this is the SLAVE SERVER 192.168.2.200 and NOT the live server!</b>):</p>
<pre><code>/etc/init.d/mysql stop
mv /var/lib/mysql /var/lib/mysql.old</code></pre>
<p><b>Back on the Master Server: 192.168.1.100</b></p>
<p>1. Copy the “frozen” mysql data:</p>
<pre><code>rsync -avz /mnt/snap  root@192.168.2.200:/var/lib/mysql</code></pre>
<p>2. Copy my.cnf to slave:</p>
<pre><code>scp /etc/my.cnf root@slaveip_or_host:/etc/my.cnf</code></pre>
<p>3. Once the Copy is Complete you can delete your “hot copy”</p>
<pre><code>hcp -r /dev/hcp1</code></pre>
<p><b>Now, go to your Slave Server: 192.168.2.200</b></p>
<p>1. edit /etc/my.cnf and change server-id to 2 and comment out or delete the log-bin line you added from the master..</p>
<p>2. start up mysql, and then enter commands to connect to master.. replacing the log file and position number with the ones you recorded earlier:</p>
<pre><code>mysql&gt; CHANGE MASTER TO 
      MASTER_HOST='192.168.1.100', 
      MASTER_USER='repl', 
      MASTER_PASSWORD='password', 
      MASTER_LOG_FILE='mysql-bin.000001',
      MASTER_LOG_POS=12345678;</code></pre>
<pre><code>mysql&gt; START SLAVE;

 mysql&gt; SHOW SLAVE STATUS/G;</code></pre>
<p>MySQL will show how far it’s behind, it might take a few minutes to catch up depending on the number of changes that happened to your database during the copy.</p>
<p>I hope you enjoyed this tutorial on MySQL Replication with no downtime. Now it’s easy!</p>
</div>
</div>
<p><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fcreate-a-mysql-slave-using-replication-with-no-downtime%2F&amp;linkname=Create%20a%20MySQL%20Slave%20using%20Replication%20with%20No%20Downtime" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fcreate-a-mysql-slave-using-replication-with-no-downtime%2F&amp;linkname=Create%20a%20MySQL%20Slave%20using%20Replication%20with%20No%20Downtime" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fcreate-a-mysql-slave-using-replication-with-no-downtime%2F&amp;linkname=Create%20a%20MySQL%20Slave%20using%20Replication%20with%20No%20Downtime" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fcreate-a-mysql-slave-using-replication-with-no-downtime%2F&amp;linkname=Create%20a%20MySQL%20Slave%20using%20Replication%20with%20No%20Downtime" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fcreate-a-mysql-slave-using-replication-with-no-downtime%2F&amp;linkname=Create%20a%20MySQL%20Slave%20using%20Replication%20with%20No%20Downtime" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.lavatelli.it%2Fcreate-a-mysql-slave-using-replication-with-no-downtime%2F&#038;title=Create%20a%20MySQL%20Slave%20using%20Replication%20with%20No%20Downtime" data-a2a-url="https://www.lavatelli.it/create-a-mysql-slave-using-replication-with-no-downtime/" data-a2a-title="Create a MySQL Slave using Replication with No Downtime"></a></p><p>The post <a href="https://www.lavatelli.it/create-a-mysql-slave-using-replication-with-no-downtime/">Create a MySQL Slave using Replication with No Downtime</a> appeared first on <a href="https://www.lavatelli.it">IT Blog Site</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Linux shadow copy</title>
		<link>https://www.lavatelli.it/linux-shadow-copy/</link>
		
		<dc:creator><![CDATA[Franz]]></dc:creator>
		<pubDate>Tue, 22 Nov 2016 12:37:18 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[hcp]]></category>
		<category><![CDATA[idera]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[r1soft]]></category>
		<category><![CDATA[shadow copy]]></category>
		<category><![CDATA[shadowcopy]]></category>
		<guid isPermaLink="false">http://www.lavatelli.it/?p=375</guid>

					<description><![CDATA[<p>How to add shadowcopy to linux. There&#8217;s a software that add shadowcopy to linux; below are instruction for Centos 6 First of all you must download and install the two package below idera-hotcopy-5-14-4-x86_64 r1soft-setup-5-14-4-x86_64 Than you must install kernel-headers and kernel-devel for your running version. If you&#8217;re running latest version you can use yum install ...</p>
<p>The post <a href="https://www.lavatelli.it/linux-shadow-copy/">Linux shadow copy</a> appeared first on <a href="https://www.lavatelli.it">IT Blog Site</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="entry">
<p>How to add shadowcopy to linux.</p>
<p>There&#8217;s a software that add shadowcopy to linux; below are instruction for Centos 6</p>
<p>First of all you must download and install the two package below</p>
<p><a href="http://www.lavatelli.it/wp-content/uploads/2016/11/idera-hotcopy-5.14.4.x86_64.rpm">idera-hotcopy-5-14-4-x86_64</a></p>
<p><a href="http://www.lavatelli.it/wp-content/uploads/2016/11/r1soft-setup-5.14.4.x86_64.rpm">r1soft-setup-5-14-4-x86_64</a></p>
<p>Than you must install kernel-headers and kernel-devel for your running version.</p>
<p>If you&#8217;re running latest version you can use</p>
<p><em>yum install kenel-header kernel-devel</em></p>
<p>otherwise you can install directly from vault.centos.org repository as below</p>
<p><em>rpm -ivh http://vault.centos.org/6.6/updates/x86_64/Packages/kernel-devel-2.6.32-504.1.3.el6.x86_64.rpm</em><br />
<em>rpm -ivh http://vault.centos.org/6.6/updates/x86_64/Packages/kernel-headers-2.6.32-504.1.3.el6.x86_64.rpm</em></p>
<p>Now that you have software e kernel-headers you build your specific kernel-module for hcp device.</p>
<p>launch <em>r1soft-setup-old &#8211;get-module</em> to build it</p>
<p>now you can try to create shadow copy with</p>
<p><em>hcp /mnt/snapshot /dev/sda1</em></p>
<p>this will create a shadowcopy of /dev/sda1 on /mnt/snapshot</p>
</div>
<p><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Flinux-shadow-copy%2F&amp;linkname=Linux%20shadow%20copy" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Flinux-shadow-copy%2F&amp;linkname=Linux%20shadow%20copy" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Flinux-shadow-copy%2F&amp;linkname=Linux%20shadow%20copy" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Flinux-shadow-copy%2F&amp;linkname=Linux%20shadow%20copy" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Flinux-shadow-copy%2F&amp;linkname=Linux%20shadow%20copy" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.lavatelli.it%2Flinux-shadow-copy%2F&#038;title=Linux%20shadow%20copy" data-a2a-url="https://www.lavatelli.it/linux-shadow-copy/" data-a2a-title="Linux shadow copy"></a></p><p>The post <a href="https://www.lavatelli.it/linux-shadow-copy/">Linux shadow copy</a> appeared first on <a href="https://www.lavatelli.it">IT Blog Site</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Linux Performance Tools</title>
		<link>https://www.lavatelli.it/linux-performance-tools/</link>
		
		<dc:creator><![CDATA[Franz]]></dc:creator>
		<pubDate>Fri, 16 Sep 2016 14:02:32 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">http://www.lavatelli.it/?p=361</guid>

					<description><![CDATA[<p>The post <a href="https://www.lavatelli.it/linux-performance-tools/">Linux Performance Tools</a> appeared first on <a href="https://www.lavatelli.it">IT Blog Site</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="entry">
<p><a href="http://www.lavatelli.it/wp-content/uploads/2016/09/linux-performance.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-362" src="http://www.lavatelli.it/wp-content/uploads/2016/09/linux-performance.png" alt="linux-performance" width="1024" height="716" /></a></p>
</div>
<p><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Flinux-performance-tools%2F&amp;linkname=Linux%20Performance%20Tools" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Flinux-performance-tools%2F&amp;linkname=Linux%20Performance%20Tools" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Flinux-performance-tools%2F&amp;linkname=Linux%20Performance%20Tools" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Flinux-performance-tools%2F&amp;linkname=Linux%20Performance%20Tools" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Flinux-performance-tools%2F&amp;linkname=Linux%20Performance%20Tools" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.lavatelli.it%2Flinux-performance-tools%2F&#038;title=Linux%20Performance%20Tools" data-a2a-url="https://www.lavatelli.it/linux-performance-tools/" data-a2a-title="Linux Performance Tools"></a></p><p>The post <a href="https://www.lavatelli.it/linux-performance-tools/">Linux Performance Tools</a> appeared first on <a href="https://www.lavatelli.it">IT Blog Site</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>how to update CA root on Centos</title>
		<link>https://www.lavatelli.it/update-ca-root-un-centos/</link>
		
		<dc:creator><![CDATA[Franz]]></dc:creator>
		<pubDate>Tue, 13 Sep 2016 14:54:46 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">http://www.lavatelli.it/?p=359</guid>

					<description><![CDATA[<p>For RHEL 6 or later, you should be using update-ca-trust, as lzap describes in his answer below. &#8212; For older versions of Fedora, CentOS, Redhat: Curl is using the system-default CA bundle is stored in /etc/pki/tls/certs/ca-bundle.crt . Before you change it, make a copy of that file so that you can restore the system default ...</p>
<p>The post <a href="https://www.lavatelli.it/update-ca-root-un-centos/">how to update CA root on Centos</a> appeared first on <a href="https://www.lavatelli.it">IT Blog Site</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="entry">
<div class="post-text">
<p><strong>For RHEL 6 or later</strong>, you should be using <strong>update-ca-trust</strong>, as lzap describes in his answer below.</p>
<p>&#8212; For older versions of Fedora, CentOS, Redhat:</p>
<p>Curl is using the system-default CA bundle is stored in /etc/pki/tls/certs/ca-bundle.crt . Before you change it, make a copy of that file so that you can restore the system default if you need to. You can simply append new CA certificates to that file, or you can replace the entire bundle.</p>
<p>Are you also wondering where to get the certificates? I (and others) recommend curl.haxx.se/ca . In one line:</p>
<pre><code>curl https://curl.haxx.se/ca/cacert.pem -o /etc/pki/tls/certs/ca-bundle.crt
</code></pre>
</div>
</div>
<p><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fupdate-ca-root-un-centos%2F&amp;linkname=how%20to%20update%20CA%20root%20on%20Centos" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fupdate-ca-root-un-centos%2F&amp;linkname=how%20to%20update%20CA%20root%20on%20Centos" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fupdate-ca-root-un-centos%2F&amp;linkname=how%20to%20update%20CA%20root%20on%20Centos" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fupdate-ca-root-un-centos%2F&amp;linkname=how%20to%20update%20CA%20root%20on%20Centos" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fupdate-ca-root-un-centos%2F&amp;linkname=how%20to%20update%20CA%20root%20on%20Centos" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.lavatelli.it%2Fupdate-ca-root-un-centos%2F&#038;title=how%20to%20update%20CA%20root%20on%20Centos" data-a2a-url="https://www.lavatelli.it/update-ca-root-un-centos/" data-a2a-title="how to update CA root on Centos"></a></p><p>The post <a href="https://www.lavatelli.it/update-ca-root-un-centos/">how to update CA root on Centos</a> appeared first on <a href="https://www.lavatelli.it">IT Blog Site</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to solve (some) graphical issues with putty, UTF8, and ncurses</title>
		<link>https://www.lavatelli.it/solve-graphical-issues-putty-utf8-ncurses/</link>
		
		<dc:creator><![CDATA[Franz]]></dc:creator>
		<pubDate>Thu, 30 Jun 2016 08:17:06 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[graphical]]></category>
		<category><![CDATA[ncurses]]></category>
		<category><![CDATA[putty]]></category>
		<category><![CDATA[utf8]]></category>
		<guid isPermaLink="false">http://www.lavatelli.it/?p=353</guid>

					<description><![CDATA[<p>Hello everybody, I’m writing this article to help all those people that may have had problems with text garbled, mismatched or other kind of graphical issues with all those software that uses the famous ncurses libraries (libncurses5). It all started when I was using (via puTTY) my favorite command line log parsing tool: the great  ...</p>
<p>The post <a href="https://www.lavatelli.it/solve-graphical-issues-putty-utf8-ncurses/">How to solve (some) graphical issues with putty, UTF8, and ncurses</a> appeared first on <a href="https://www.lavatelli.it">IT Blog Site</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="entry">
<div class="entry-content">
<p>Hello everybody,</p>
<p>I’m writing this article to help all those people that may have had problems with text garbled, mismatched or other kind of graphical issues with all those software that uses the famous ncurses libraries (libncurses5). It all started when I was using (via puTTY) my favorite command line log parsing tool: the great  multitail (go out there and take it if you don’t know it) I started noticing some odd errors: part of the text was garbled, some of the lines were wrong in size or were substituted by wrong characters, as you can see in the screenshot:</p>
<figure id="attachment_63" class="wp-caption alignnone" data-shortcode="caption"><a href="http://www.lavatelli.it/wp-content/uploads/2016/06/strange-behaviour-e1476277834263.jpg"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-367" src="http://www.lavatelli.it/wp-content/uploads/2016/06/strange-behaviour-e1476277834263.jpg" alt="strange-behaviour" width="387" height="192" /></a><figcaption class="wp-caption-text">multitail in a centOS environment</figcaption></figure>
<p>This problem happened when using puTTY on a CentOS 6.6 system, with locale set on UTF-8,  libncurses version 5.x and multitail at 6.4.1</p>
<p>This is the result of multiple problems and some steps are required to fix all the issues :</p>
<ol>
<li> Download the latest version of puTTY (0.64 as of today)</li>
<li>Make sure that under <em>Windows</em> -&gt; <em>Translation  </em>and <em>Connection </em>-&gt; <em>Data</em> you have everything as in the images :<br />
<a href="http://www.lavatelli.it/wp-content/uploads/2016/06/putty-screenshot1.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-366" src="http://www.lavatelli.it/wp-content/uploads/2016/06/putty-screenshot1.png" alt="putty-screenshot1" width="466" height="449" /></a></p>
<figure id="attachment_67" class="wp-caption alignnone" data-shortcode="caption"><figcaption class="wp-caption-text">Remote character set: UTF-8 and “use Unicode line drawing code points”</figcaption></figure>
<figure id="attachment_68" class="wp-caption alignnone" data-shortcode="caption"><figcaption class="wp-caption-text"><a href="http://www.lavatelli.it/wp-content/uploads/2016/06/screenshot2.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-365" src="http://www.lavatelli.it/wp-content/uploads/2016/06/screenshot2.png" alt="screenshot2" width="466" height="449" /></a>Terminal-type string: putty</figcaption></figure>
</li>
<li>Then, you have to set an environment variable to tell the ncurses libraries to use UTF-8 :</li>
</ol>
<p><em>export NCURSES_NO_UTF8_ACS=1</em></p>
<p>you should also make it stick (<em>echo export NCURSES_NO_UTF8_ACS=1 &gt;&gt; ~/.bashrc</em> )</p>
<p>This should solve all your issues with UTF-8 and the ncurses libraries.</p>
</div>
</div>
<p><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fsolve-graphical-issues-putty-utf8-ncurses%2F&amp;linkname=How%20to%20solve%20%28some%29%20graphical%20issues%20with%20putty%2C%20UTF8%2C%20and%20ncurses" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fsolve-graphical-issues-putty-utf8-ncurses%2F&amp;linkname=How%20to%20solve%20%28some%29%20graphical%20issues%20with%20putty%2C%20UTF8%2C%20and%20ncurses" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fsolve-graphical-issues-putty-utf8-ncurses%2F&amp;linkname=How%20to%20solve%20%28some%29%20graphical%20issues%20with%20putty%2C%20UTF8%2C%20and%20ncurses" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fsolve-graphical-issues-putty-utf8-ncurses%2F&amp;linkname=How%20to%20solve%20%28some%29%20graphical%20issues%20with%20putty%2C%20UTF8%2C%20and%20ncurses" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.lavatelli.it%2Fsolve-graphical-issues-putty-utf8-ncurses%2F&amp;linkname=How%20to%20solve%20%28some%29%20graphical%20issues%20with%20putty%2C%20UTF8%2C%20and%20ncurses" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.lavatelli.it%2Fsolve-graphical-issues-putty-utf8-ncurses%2F&#038;title=How%20to%20solve%20%28some%29%20graphical%20issues%20with%20putty%2C%20UTF8%2C%20and%20ncurses" data-a2a-url="https://www.lavatelli.it/solve-graphical-issues-putty-utf8-ncurses/" data-a2a-title="How to solve (some) graphical issues with putty, UTF8, and ncurses"></a></p><p>The post <a href="https://www.lavatelli.it/solve-graphical-issues-putty-utf8-ncurses/">How to solve (some) graphical issues with putty, UTF8, and ncurses</a> appeared first on <a href="https://www.lavatelli.it">IT Blog Site</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Object Caching 179/183 objects using Redis
Page Caching using Disk: Enhanced 
Lazy Loading (feed)
Minified using Redis

Served from: www.lavatelli.it @ 2026-11-21 09:11:20 by W3 Total Cache
-->