Re: [CentOS] Outliner

2019-04-14 Thread Jussi Hirvi via CentOS

On 14.4.2019 13.42, H wrote:

I would love to find an old-fashionedoutliner, like the ones that
used to exist prior to the modern GUIs. It would make writing
structured documents, or organizing thoughts in general, so much more
convenient, productive and faster. Ideally it should allow saving
files in txt, OO and markdown formats...
Org-mode fits the bill. Emacs org-mode seems to get positive reviews, 
and it has been ported to vim too (many alternative plugins, but 
probably with less features than the original emacs version).


https://en.wikipedia.org/wiki/Org-mode

Org 9.2 was released in December 2018, so the development seems not to 
be dead.


I have no personal experience with any programs of this type. I 
sometimes use the outline mode in MS Word, just because I'm lazy.


- Jussi
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] VPN suggestions centos 6, 7

2016-04-04 Thread Jussi Hirvi

On 4.4.2016 22.01, Eero Volotinen wrote:

And openvpn. Avoid ipsec as it's too complex and pptp is unsecure.


This made me google around a little, and I found some good info here. 
They, too, kind of recommend openvpn.


http://www.howtogeek.com/211329/which-is-the-best-vpn-protocol-pptp-vs.-openvpn-vs.-l2tpipsec-vs.-sstp/

- Jussi
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] VPN suggestions centos 6, 7

2016-04-04 Thread Jussi Hirvi
My partner has been using Openvpn extensively. It looks very reasonable 
and has been quite trustworthy.


It is configured via commandline. The server seems to work on Windows, 
too ("Vista and later"). There are good tutorials for CentOs, for example


https://www.digitalocean.com/community/tutorials/how-to-setup-and-configure-an-openvpn-server-on-centos-7

- Jussi

On 4.4.2016 20.57, david wrote:
(...)

1)  As noted, it should be secure (anti NSA?)
2)  Works on Centos 6 and Centos 7 and Windows 7 (and for the future,
Windows 10)
3)  Can be set up on the server with command line interfaces only (no GUI)


___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Error when installing mysql package

2015-11-15 Thread Jussi Hirvi

I would try

yum --disablerepo=\* --enablerepo=base --enablerepo=updates install mariadb

That would exclude possible conflicts between the base & update repos 
and more exotic software from other repos.


- Jussi
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Backup PC or other solution

2015-05-07 Thread Jussi Hirvi

On 7.5.2015 14.24, Mauricio Tavares wrote:

I admit one think it does miss is having a convenient way to look for
a file, specially if you physically rotate drives. If rdiff-backup
will tell when was the last time a file has been backed up/touched
even if drive with said file is not mounted, I will need to get to
learn more about it.


I don't think rdiff-backup would work with rotated drives - not really. 
You could make it work to some extent with some cumbersome gimmicks, but 
not perfectly. I found this thread on the subject:


http://www.backupcentral.com/phpBB2/two-way-mirrors-of-external-mailing-lists-3/rdiff-backup-23/rdiff-backup-and-rotated-external-drives-122523/

But why rotate drives? Big drives are not very expensive nowadays.

Regards,
Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Backup PC or other solution

2015-05-07 Thread Jussi Hirvi
I wonder why nobody has yet mentioned rdiff-backup. It combines 
browsable directories with multiple versions - the version data is 
stored in a separate rdiff-backup-data subdirectory (one per backup task).


One downside is that rdiff-backup causes a lot of network traffic. For 
that reason I currently use rsync to copy over network, and then I use 
rdiff-backup locally to create a repository with multiple versions.


Another system that we use is rdiffweb. It uses rdiff-backup over 
network and adds a web interface for clients to browse and restore files 
or directories. I did not personally set it up, but it seems to work fine.


- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Hdd maximum size

2015-03-31 Thread Jussi Hirvi

On 31.3.2015 14.43, donais wrote:

Server is a Lenovo RV-340 E2420 build 70AB001VUX   8go
Support for Sata-3  6gbps  and Raid-5
Did someone can tell if it can handle 6tb hard drives?


See this. It depends on the operating system version and filesystem 
(ext4, xfs etc.).


http://wiki.centos.org/About/Product

The page does not directly mention disk sizes, but I imagine it does not 
matter how big the disk is, as long as the max filesystem size is not 
exceeded.


- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] yum upgrade not working

2014-12-22 Thread Jussi Hirvi

This often helps to avoid broken dependencies:

yum --disablerepo=\* --enablerepo=base --enablerepo=updates update

After that, a regular yum update.

- Jussi

On 22.12.2014 17.39, Tim Dunphy wrote:

Removing that libyaml package allowed me to upgrade!

Thanks for the tip!

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Amavisd-new delivers spam emails

2014-09-11 Thread Jussi Hirvi

On 11.9.2014 15.09, Eliezer Croitoru wrote:

I think amavisd-new mailing list is the better place for that.


Ok, I will ask there. Ideas are still welcome via this list, too.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Amavisd-new delivers spam emails

2014-09-11 Thread Jussi Hirvi
I recently noticed that my email server now delivers spam to final 
recipients even though the spam score is more than the 
$sa_kill_level_deflt.


A probable reason is that some amavisd update has introduced new 
configuration variables, which I have not defined in my configuration, 
and the default value of some such variable causes this unwanted behavior.


I tried to go through documentation, but did not find the reason. Has 
anybody else had the same problem?


# amavisd -V
amavisd-new-2.8.0 (20120630)

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] USB thermometer - perl script - problem

2014-03-24 Thread Jussi Hirvi
On 23.3.2014 16.29, Darr247 wrote:
> Do you find a temper-poll script in/usr/local/bin/  ?
> (I found that mentioned athttps://github.com/padelt/temper-python  )

No. That seems to be a different approach in using the thermometer. The 
one I tried was made with perl, temper-poll is python.

I tried the python scripts too, but stumbled on problems there, too. The 
basic problem may be that the thermometer behavior has changed in the 
new models, and the third party scripts have stopped working.

> This isn't really CentOS-specific.
> If you peruse further down the page you linked, one of the commenters
> describes the exact symptoms you're seeing, but they were running Ubuntu
> 12.04 LTS.

Yes, I found the description of symptoms, but no solution was mentioned.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] USB thermometer - perl script - problem

2014-03-23 Thread Jussi Hirvi
Hopefully someone here could help. I need to debug, but I don't know 
much about perl.

I bought a cheap USB thermometer:

http://www.amazon.com/dp/B002VA813U?tag=grepular02-20

And found directions for use (for Linux) here:

https://grepular.com/Using_Linux_to_Monitor_Room_Temperature_Remotely_and_Cheaply

On a CentOS 6 machine, I have connected the USB device (it shows here as 
"Microdia":

[root@farm2 scripts]# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 006: ID 0c45:7401 Microdia

With CPAN, I installed the  Perl module 
Device::USB::PCSensor::HidTEMPer, as directed. That seemed to be 
successful.

Now my perl script (as copied from grepular.com, see above) gives no 
error messages about missing modules. But I should get a temperature 
reading as output. Instead, I get no output at all.

When I add to the script this:
print $pcsensor;
I get this as output:
Device::USB::PCSensor::HidTEMPer=HASH(0x14d8900)
But this:
$pcsensor->list_devices();
gives no output.

How could I debug this?

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Memory leak - how to investigate

2014-02-04 Thread Jussi Hirvi
On 3.2.2014 19.58, m.r...@5-cent.us wrote:
> That's a*lot*  of apache. Is that really correct? Do you really need that
> many threads? How heavily is the webserver used?

Is this a good measure? At least it's exact. :-)
# du -sh /var/log/httpd
261M/var/log/httpd

Those logs are rotated with default settings, 5 logs kept. The activity 
went up recently, when a new, quite complex Wordpress site was launched. 
That might have a lot to do with the crashes.

> Also, I see mysql running - does the website use it?

Many websites on that host use MySQL, yes.

On 3.2.2014 21.44, Kwan Lowe wrote:
 >>Mem:   1361564k total
 > That doesn't look like a lot of memory.. Possible to
 > add another .5G or so?

Ok, I added RAM (remember, this is a VM). Now I got
Mem:   2365180k total
Swap:  3014648k total

This might help me some way. My experiences so far indicate that a 
webserver/nameserver should be ok with 2 gigs RAM plus some swap. I am 
not sure how much it depends on the amount of traffic.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Memory leak - how to investigate

2014-02-03 Thread Jussi Hirvi
My web & name server runs out of memory from time to time, to the point 
where it's completely unresponsive to anything. At that point reset is 
the only alternative. (Or, as this is a virtual guest, I just say "virsh 
destroy").

But why this happens - I would like to know.

The host in question is a KVM guest, and runs CentOS 6.4.

 From "top" (situation now):
Mem:   1361564k total,  1264324k used,97240k free, 8428k buffers
Swap:  3014648k total,64852k used,  2949796k free,   358676k cached

At or before the last crash I got a long error message on the console. 
"Oom-killer" was called repeatedly by httpd and named.

I paste below the first error message, which is long. There were several 
long entries like this. I

- Jussi

[root@ns1 ~]# httpd invoked oom-killer: gfp_mask=0x280da, order=0, 
oom_adj=0, oom_score_adj=0
httpd cpuset=/ mems_allowed=0
Pid: 2962, comm: httpd Not tainted 2.6.32-358.23.2.el6.x86_64 #1
Call Trace:
  [] ? cpuset_print_task_mems_allowed+0x91/0xb0
  [] ? dump_header+0x90/0x1b0
  [] ? __delayacct_freepages_end+0x2e/0x30
  [] ? security_real_capable_noaudit+0x3c/0x70
  [] ? oom_kill_process+0x82/0x2a0
  [] ? select_bad_process+0xe1/0x120
  [] ? out_of_memory+0x220/0x3c0
  [] ? __alloc_pages_nodemask+0x8ac/0x8d0
  [] ? alloc_pages_vma+0x9a/0x150
  [] ? handle_pte_fault+0x76b/0xb50
  [] ? ext4_check_acl+0x29/0x90 [ext4]
  [] ? current_fs_time+0x27/0x30
  [] ? handle_mm_fault+0x23a/0x310
  [] ? __do_page_fault+0x139/0x480
  [] ? do_mmap_pgoff+0x33a/0x380
  [] ? do_page_fault+0x3e/0xa0
  [] ? page_fault+0x25/0x30
Mem-Info:
Node 0 DMA per-cpu:
CPU0: hi:0, btch:   1 usd:   0
Node 0 DMA32 per-cpu:
CPU0: hi:  186, btch:  31 usd:  89
active_anon:201535 inactive_anon:68173 isolated_anon:3424
  active_file:130 inactive_file:284 isolated_file:160
  unevictable:0 dirty:0 writeback:245 unstable:0
  free:14234 slab_reclaimable:2891 slab_unreclaimable:13218
  mapped:239 shmem:14 pagetables:28858 bounce:0
Node 0 DMA free:8252kB min:340kB low:424kB high:508kB active_anon:2168kB 
inactive_anon:4624kB active_file:4kB inactive_file:144kB unevictable:0kB 
isolated(anon):0kB isolated(file):0kB present:15348kB mlocked:0kB 
dirty:0kB writeback:28kB mapped:8kB shmem:0kB slab_reclaimable:12kB 
slab_unreclaimable:128kB kernel_stack:8kB pagetables:376kB unstable:0kB 
bounce:0kB writeback_tmp:0kB pages_scanned:1424 all_unreclaimable? no
lowmem_reserve[]: 0 1956 1956 1956
Node 0 DMA32 free:48684kB min:44712kB low:55888kB high:67068kB 
active_anon:803972kB inactive_anon:268068kB active_file:516kB 
inactive_file:992kB unevictable:0kB isolated(anon):13696kB 
isolated(file):640kB present:2003828kB mlocked:0kB dirty:0kB 
writeback:888kB mapped:948kB shmem:56kB slab_reclaimable:11552kB 
slab_unreclaimable:52744kB kernel_stack:3344kB pagetables:115056kB 
unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:7552 
all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 25*4kB 11*8kB 6*16kB 3*32kB 9*64kB 3*128kB 1*256kB 3*512kB 
1*1024kB 2*2048kB 0*4096kB = 8252kB
Node 0 DMA32: 977*4kB 401*8kB 320*16kB 179*32kB 58*64kB 63*128kB 
32*256kB 7*512kB 3*1024kB 0*2048kB 1*4096kB = 48684kB
21463 total pagecache pages
20882 pages in swap cache
Swap cache stats: add 1523887, delete 1503005, find 201987/297332
Free swap  = 0kB
Total swap = 3014648kB
511996 pages RAM
43605 pages reserved
66036 pages shared
446256 pages non-shared
[ pid ]   uid  tgid total_vm  rss cpu oom_adj oom_score_adj name
[  449] 0   449 26750   0 -17 -1000 udevd
[ 1080] 0  1080 69096   0 -17 -1000 auditd
[ 1105] 0  1105622711   0   0 0 rsyslogd
[ 1142]25  114240455  262   0   0 0 named
[ 1184] 0  1184165630   0 -17 -1000 sshd
[ 1195] 0  1195130360   0   0 0 vsftpd
[ 1231] 0  1231270411   0   0 0 mysqld_safe
[ 1333]27  1333   187111 4825   0   0 0 mysqld
[ 1430] 0  143020216   21   0   0 0 master
[ 1438]89  143820236   18   0   0 0 pickup
[ 1439]89  143920279   22   0   0 0 qmgr
[ 1440] 0  144079250  368   0   0 0 httpd
[ 1448] 0  144829313   34   0   0 0 crond
[ 1459]48  145988738  727   0   0 0 httpd
[ 1460]48  146089244  494   0   0 0 httpd
[ 1461]48  146189729  803   0   0 0 httpd
[ 1462]48  146288987 1055   0   0 0 httpd
[ 1463]48  146389796 2560   0   0 0 httpd
[ 1464]48  146491371 3558   0   0 0 httpd
[ 1465]48  146588596 1283   0   0 0 httpd
[ 1466]48  146690794 1253   0   0 0 httpd
[ 1469] 0  1469   106619  198   0   0  

Re: [CentOS] Amavisd start - SOLVED

2013-12-23 Thread Jussi Hirvi
On 23.12.2013 13.17, Jitse Klomp wrote:
> You should turn SELinux back on and run 'restorecon /etc/amavisd.conf' to
> (re)set the correct SELinux context.

Thanks, maybe I will try that.

I have never learned to use SELinux, and most tutorials on the net - for 
example on how to install a mail server system on CentOS 6 - include no 
directions at all for SELinux, so the tutorials only work if one turns 
SELinux off.

So it looks like I am not the only lazy person around. :-)

- Jussi

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Amavisd start - SOLVED

2013-12-22 Thread Jussi Hirvi
This was connected with SELinux. I disabled SELinux and rebooted 
(naughty me), and things are back to normal.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Amavisd start

2013-12-22 Thread Jussi Hirvi
This is CentOS 6. Why can it be that when I try to run
/etc/init.d/amavisd start
... I get this error:
Starting Mail Virus Scanner (amavisd): Config file "/etc/amavisd.conf" 
is inaccessible: Permission denied, at /usr/sbin/amavisd line 2085.
[FAILED]

But when I use sh:
sh /etc/init.d/amavisd start
...it starts ok.

This is connected to the fact that my amavisd.conf is from another 
machine (CentOS 5). If I replace amavisd.conf with the default conf 
(that came with yum install amavisd-new), the starting problem goes away.

I would like to debug this, but I don't know where to look.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] htaccess is not working

2013-02-13 Thread Jussi Hirvi
Check that you have something like this in the Apache conf for that 
directory:


AllowOverride All


Override there means that .htpasswd file can override the main Apache conf.

It does not really need to be "AllowOverride All", only some options are 
needed. But if you have "AllowOverride None", then .htpassword will have 
no effect at all.

- Jussi

On 13.2.2013 17.18, Carmelo Ingrao wrote:
> Hello,
>
> I'm new here, and after trying by myself, I'm looking for some help ...
>
> I have installed webalizer, on my CentOS 6 server. Root path for webalizer is 
> /var/www/usage/
>
> It's working, but after putting a .htaccess in /var/www/usage/ and the 
> appropriate .htpasswd in /var/www/html/auth/ there is no password asked.
>
> Here are my files :
>
> .htacess :
>
> AuthName “Veuillez vous identifier”
> AuthType Basic
> AuthUserFile ”/var/www/html/auth/.htpasswd”
>
>
> .htpasswd :
>
> carmelo:myencryptedpassword(with htpasswd)
>
> Can you please help me ?
>
> Thanks,
>
> Carmelo
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Monitoring VM loads

2012-09-13 Thread Jussi Hirvi
I am using CentOS 5, and kvm virtualization.

My VM stack (about 10 v-machines) now often gets painfully slow, 
probably because of IO limitations. How could I find out where the load 
comes from?

virt-top on the host only shows the processor load. For this situation, 
it is not very useful.

It would be more useful to see on the host a list of VM "load averages", 
because load average at least contains IO, in addition to CPU load. Is 
this possible?

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Monitoring VM loads

2012-09-13 Thread Jussi Hirvi
I am using CentOS 5, and kvm virtualization.

My VM stack (about 10 v-machines) now often gets painfully slow, 
probably because of IO limitations. How could I find out where the load 
comes from?

virt-top on the host only shows the processor load. For this situation, 
it is not very useful.

It would be more useful to see on the host a list of VM "load averages", 
because load average at least contains IO, in addition to CPU load. Is 
this possible?

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] DNS DoS attack

2012-08-17 Thread Jussi Hirvi
On 17.8.2012 15.04, John Doe wrote:
> Maybe it is this:
> http://arstechnica.com/business/2012/03/how-anonymous-plans-to-use-dns-as-a-weapon/

Interesting idea. In that case the ip's in my logs would point to the 
targets of the attact. I checked a few of them, and they look more like 
hijacked victims, or ns query mediators like me. I don't see a common 
factor.

...icon.com (Ricoh, Japanese office machines)
...unum.com (employee insurances, I think)
sexy-lingerie.uk.com
mnet04-40.austin.datafoundry.com
...netmagicians.com
ns1.p10.dynect.net
www.macsales.com
66-226-73-103.dedicated.codero.net
ns.rackspace.com
ns1.clt.peak-10.com (their webpage: "We're rock solid"!)

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] DNS DoS attack

2012-08-17 Thread Jussi Hirvi
On 17.8.2012 8.18, John R Pierce wrote:
> meh, if its coming from lots of random hosts, then fail2ban style
> techniques won't work.  I assume this is an authoritative name server?
> does it have recursive queries disabled so it can only return results
> for the domain(s) its authoritative for ?

Yes, it is authoritative. Recursive queries were open very widely. That 
may be why I started to get plenty of requests. But I think that 240 per 
second is not normal anymore, it must me malicious.

I believe my name server was used as a mediator only, and the real 
target (through recursive queries) was some other public nameserver.

This morning I restricted recursive queries to trusted networks only. 
The load dropped slowly to 20 % of what it was before.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] DNS DoS attack

2012-08-16 Thread Jussi Hirvi
Looks like one of my name servers (CentOS 5) gets a lot of malicious 
queries. The cpu load is constantly about 3 %. I put on stricter limits 
on who is allowed recursive queries, but this does not affect the CPU 
load. I also updated bind.

I temporarily turned on querylog (command: rndc querylog), and noticed 
that I get over 200 queries like this per second:

> Aug 17 07:41:38 mx2 named[6873]: client 205.145.64.200#53: query (cache) 
> 'ripe.net/ANY/IN' denied
> Aug 17 07:41:38 mx2 named[6873]: client 204.10.45.5#53: query (cache) 
> 'ripe.net/ANY/IN' denied
> Aug 17 07:41:38 mx2 named[6873]: client 78.40.35.212#53: query (cache) 
> 'ripe.net/ANY/IN' denied
> Aug 17 07:41:38 mx2 named[6873]: client 207.207.3.126#53: query (cache) 
> 'ripe.net/ANY/IN' denied

Are there any ways to mitigate this, or do I just have to wait?

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Sendmail problem - baffled

2012-05-15 Thread Jussi Hirvi
On 16.5.2012 2.42, Jussi Hirvi wrote:
> Now I just have to fix the sendmail ("rx" instance) config so that it
> really sends the email to localhost (where amavis is listening), instead
> of trying to send directly to the final destination.

Ok, I found it, and it is *so* obvious. Still it took me hours to find it.

I had this in my config for the "rx" instance of sendmail.

FEATURE(`mailertable', `hash /etc/mail/mailertable.db')

And my mailertable contained static routing for all domains that are 
local to our primary mail server. Example:

greenspot.fiesmtp:[mail.greenspot.fi]

So sendmail was only following orders. Solution: comment out the 
mailertable line from the sendmail config.

Thanks to everyone, and especially to Alexander for reading so carefully 
my emails and giving the breakthrough tip. I love you!

- Jussi
4.55 AM local time
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Sendmail problem - baffled

2012-05-15 Thread Jussi Hirvi
On 16.5.2012 1.03, Alexander Dalloz wrote:
>> define(`ESMTP_MAILER_ARGS',`TCP $h 10024')dnl

> Right, here you modify the target port of that Sendmail instance. And I
> bet $1.000 that if you tcpdump on the main mail server you will see the
> sending attempt to come in there at port 10024 and thus Sendmail (this
> one here) gets a connection refused.

Looks like you are right - and that's a breakthrough! I checked on the 
primary mail server using simply
tcpdump host 83.143.217.179
and I noticed connections to port 10024.

I should have used tcpdump earlier in this process - but better late 
than never.

Now I just have to fix the sendmail ("rx" instance) config so that it 
really sends the email to localhost (where amavis is listening), instead 
of trying to send directly to the final destination. So far no luck. A 
similar setup works ok on the primary mail server, so I don't know why 
this one does not work.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Sendmail problem - baffled

2012-05-15 Thread Jussi Hirvi
On 16.5.2012 0.37, Frank Cox wrote:
> What's the point of that?  (Genuine question.)
>
> One server here, one across town,  or even two separate boxes in a single room
> -- sure.  But in the same box?  If the the box is on fire, now you're out both
> your main and your backup server.
>
> I must be missing something; what is it?

No, you are right. However, two servers still are better than one. There 
are cases when one of them is down but not the other. And later, if I 
get another box, I can move the vm there easily.

However, let's not get sidetracked too deep in this.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Sendmail problem - baffled

2012-05-15 Thread Jussi Hirvi
On 15.5.2012 23.54, Alexander Dalloz wrote:
> So there must be "sm-mta-rx" be defined somewhere.

Just in case, here is my conf for the rx instance. To repeat, this 
sendmail instance sends everything to amavisd at port 10024.
- Jussi

divert(-1)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`MTA-RX jh-2012-05')dnl
OSTYPE(`linux')dnl
define(`confSMTP_LOGIN_MSG', `$j Sendmail; $b')dnl
define(`confLOG_LEVEL', `19')dnl # default: 9
INPUT_MAIL_FILTER(`greylist',`S=local:/var/milter-greylist/milter-greylist.sock')
define(`confDEF_USER_ID', ``8:12'')dnl
define(`confTO_INITIAL', `6m')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTO_HELO', `5m')dnl
define(`confTO_HOSTSTATUS', `2m')dnl
define(`confTO_DATAINIT', `6m')dnl
define(`confTO_DATABLOCK', `60m')dnl
define(`confTRY_NULL_MX_LIST', `True')dnl
define(`confDONT_PROBE_INTERFACES', `True')dnl
define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl
define(`UUCP_MAILER_MAX', `200')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', 
`authwarnings,novrfy,noexpn,noverb,needmailhelo,needexpnhelo,needvrfyhelo,restrictqrun,restrictmailq')dnl
define(`confAUTH_OPTIONS', `A')dnl
define(`confCRL', `/etc/mail/certs/revoke.crl')dnl
define(`confTO_QUEUEWARN', `5m')dnl
define(`confTO_QUEUERETURN', `2d')dnl
define(`confDELAY_LA', `12')dnl  added by jh, see batbook 1002
define(`confREFUSE_LA', `20')dnl upped by jh from 18
define(`confTO_IDENT', `0')dnl   0 = ident disabled
define(`confTO_RESOLVER_RETRANS_FIRST', `2')dnl
define(`confTO_RESOLVER_RETRANS_NORMAL', `10')dnl
define(`confTO_RESOLVER_RETRY_FIRST', `2')dnl
define(`confTO_RESOLVER_RETRY_NORMAL', `5')dnl
FEATURE(`no_default_msa', `dnl')dnl
FEATURE(`smrsh', `/usr/sbin/smrsh')dnl
FEATURE(`mailertable', `hash /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable', `hash /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(nocanonify)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
define(`confMAX_DAEMON_CHILDREN', `130')dnl
define(`confMIN_FREE_BLOCKS', `1')dnl   added by jh (see dual-readme)
define(`confCONNECTION_RATE_THROTTLE', `3')dnl
FEATURE(local_procmail, `', `procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db', `hash -T -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
FEATURE(`greet_pause',`1000')dnl
FEATURE(`compat_check')dnl
EXPOSED_USER(`root')dnl
FEATURE(`dnsbl', `blackholes.mail-abuse.org', `"550 Email rejected due 
to sending server misconfiguration - see 
http://blackholes.mail-abuse.org/faq/#why_rejected";')dnl
FEATURE(`dnsbl', `bl.spamcop.net', `"550 Email rejected due to sending 
server misconfiguration - see: 
http://spamcop.net/bl.shtml?"$&{client_addr}')dnl
DAEMON_OPTIONS(`Port=smtp,Name=MTA25-RX,M=SA')dnl
FEATURE(`accept_unresolvable_domains')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
define(`confPID_FILE', `/var/run/sendmail-rx.pid')dnl
define(`STATUS_FILE', `/etc/mail/stat-rx')dnl
define(`QUEUE_DIR', `/var/spool/mqueue-rx')dnl
define(`confQUEUE_SORT_ORDER', `Modification')dnl
QUEUE_GROUP(`mqueue',``P=/var/spool/mqueue-rx,R=4,F=f'')dnl
FEATURE(stickyhost)dnl Keep env addr "u...@local.host" when fwd to MAIL_HUB
define(`MAIL_HUB',   `esmtp:[127.0.0.1]')dnl  fw all local mail to amavisd
define(`SMART_HOST', `esmtp:[127.0.0.1]')dnl  fw all other mail to amavisd
define(`LOCAL_RELAY',`esmtp:[127.0.0.1]')dnl
define(`confDELIVERY_MODE',`q')dnl a must, if u want to specify nr of q 
runners
define(`ESMTP_MAILER_ARGS',`TCP $h 10024')dnl
define(`SMTP_MAILER_MAXMSGS',`10')dnl  Max no. of msgs in a single 
connection
define(`ALIAS_FILE', `/etc/aliases')dnl
dnl # three undefines for dual-sendmail setup - jh
undefine(`UUCP_RELAY')dnl
undefine(`BITNET_RELAY')dnl
undefine(`DECNET_RELAY')dnl
MAILER(smtp)dnl

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Sendmail problem - baffled

2012-05-15 Thread Jussi Hirvi
On 16.5.2012 0.24, m.r...@5-cent.us wrote:
> Hmmm... dumb question: is anything out of disk space?

There are no dumb questions here. :-) The culprit has to be something 
simple like that. However, df shows that there is still room.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Sendmail problem - baffled

2012-05-15 Thread Jussi Hirvi
On 16.5.2012 0.18, John Hinton wrote:
> A couple of things to check. I don't know if these servers are in the
> same location or not but it is possible if not, that your provider
> blocks port 25. Here are two configs to check.

Thanks for input. I can make the contact from the backup-mailserver to 
the primary mailserver manually using telnet (details in previous 
posts), which proves that 25 is not blocked.

BTW, the two servers are virtual machines in one and the same physical box.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Sendmail problem - baffled

2012-05-15 Thread Jussi Hirvi
On 15.5.2012 23.54, Alexander Dalloz wrote:
> What is the content of the submit.mc? Your previous log snipplet showed
>
>> >  May 15 22:21:41 mx2 sm-mta-rx[8674]: q4FIhPij007483: makeconnection

> So there must be "sm-mta-rx" be defined somewhere.

Yes. In a dual sendmail setup there are two instances of sendmail. The 
receiving one ("rx") dumps all email to amavis (TCP 10024), and then 
amavis hauls everything back again to the other instance ("tx") (using 
TCP 10025), which sends it away over net or piles it up in local mailboxes.

My conf for the "rx" instance is probably not important, as the "rx" 
instance does not actually contact anything outside localhost. The 
submit conf is for mail submission, so it is probably not used here.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Sendmail problem - baffled

2012-05-15 Thread Jussi Hirvi
On 15.5.2012 23.33, m.r...@5-cent.us wrote:
> Is there any chance that your sendmail is sending an invalid id?

Uh, what do you mean by id? Domain name? I assume that comes from
/etc/sysconfig/network. which correctly says
 > HOSTNAME=mx2.greenspot.fi

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Sendmail problem - baffled

2012-05-15 Thread Jussi Hirvi
On 15.5.2012 23.22, Alexander Dalloz wrote:
> It is technically impossible that the telnet to target port 25 succeeds
> from the same system on which the Sendmail gets a connection refused,
> unless Sendmail is configured to use a non-standard target port.

That is why I am baffled. :-/

I could use a way to see what port sendmail is actually using to make 
the contact. My assumption is that when the log entry (see my orig post) 
says "mailer=esmtp,", it implies port 25 - but then it really does not 
make sense that the connection is refused.

On the primary mail server (which I try in vain to contact) I see 
*nothing* about the failed connections in the maillog, even though I 
raised log_level to 19.

Below is my thishost-tx.mc. It looks totally ok to me, but maybe 
somebody else spots something there. This is a dual-sendmail setup, and 
this is the conf for the transmitting sendmail instance.

- Jussi

divert(-1)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`MTA-TX jh-2012-05')dnl
OSTYPE(`linux')dnl
define(`confSMTP_LOGIN_MSG', `$w.tx.$m Sendmail $v/$Z; $b')dnl MTA-TX
define(`confLOG_LEVEL', `19')dnl
define(`confDEF_USER_ID', ``8:12'')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST', `True')dnl
define(`confDONT_PROBE_INTERFACES', `True')dnl
define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/var/log/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `200')dnl
define(`confUSERDB_SPEC', 
`/etc/mail/userdb.db')dnldefine(`confPRIVACY_FLAGS', 
`authwarnings,novrfy,noexpn,restrictqrun,restrictmai
lq')dnl
define(`confAUTH_OPTIONS', `A')dnl
define(`confTO_QUEUEWARN', `2h')dnl
define(`confTO_QUEUERETURN', `2d')dnl
define(`confREFUSE_LA', `999')dnl disabled; limiting belongs to MTA-RX
define(`confTO_IDENT', `0')dnl
FEATURE(`no_default_msa', `dnl')dnl
FEATURE(`nocanonify')dnl host/dom names considered caninical at MTA-TX
FEATURE(`smrsh', `/usr/sbin/smrsh')dnl
FEATURE(`mailertable', `hash /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable', `hash /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl (= local-host-names)
FEATURE(use_ct_file)dnl
define(`confMAX_DAEMON_CHILDREN', `0') dnl disabled; limiting belongs to 
MTA-RX
FEATURE(local_procmail, `', `procmail -t -Y -a $h -d $u')dnl
EXPOSED_USER(`root')dnl
DAEMON_OPTIONS(`Addr=127.0.0.1,Port=10025,Name=MTA-TX')dnl
FEATURE(`accept_unresolvable_domains')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
LOCAL_DOMAIN(`[127.0.0.1]')dnl
LOCAL_DOMAIN(`127.0.0.1')dnl
MAILER(smtp)dnl
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Sendmail problem - baffled

2012-05-15 Thread Jussi Hirvi
Some more info. Below is a more complete telnet session from backup mail 
server (mx2.greenspot.fi) to primary mail server (mail.greenspot.fi).

It only proves that sending mail works fine from command-line. But my 
sendmail setup cannot do the same.

I wrote that MAILER-DAEMON can get mail through. I am not actually sure 
about that. (One warning message did come through, but maybe it was 
because something I changed in the config - not sure anymore.)

Here's the successful telnet session:

[root@mx2 ~]# telnet mail.greenspot.fi 25
Trying 83.143.217.182...
Connected to mail.greenspot.fi (83.143.217.182).
Escape character is '^]'.
220 mail.greenspot.fi ESMTP Sendmail; Tue, 15 May 2012 23:17:59 +0300
HELO mx2.greenspot.fi
250 mail.greenspot.fi Hello mx2.greenspot.fi [83.143.217.179], pleased 
to meet you
MAIL FROM: m...@domain.com
250 2.1.0 m...@domain.com... Sender ok
RCPT TO: m...@domain.com
250 2.1.5 m...@domain.com... Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
Testing testing
.
250 2.0.0 q4FKHxf7012785 Message accepted for delivery
QUIT
221 2.0.0 mail.greenspot.fi closing connection
Connection closed by foreign host.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Sendmail problem - baffled

2012-05-15 Thread Jussi Hirvi
Our backup mail server (which I have just re-configured) tries to 
contact the primary mail server, and fails. My log shows repeatedly 
"connection refused":

May 15 22:21:41 mx2 sm-mta-rx[8674]: q4FIhPij007483: makeconnection 
(mail.greenspot.fi. [83.143.217.182]) failed: Connection refused by 
mail.greenspot.fi.
May 15 22:21:41 mx2 sm-mta-rx[8674]: q4FIhPij007483: 
to=, delay=00:38:16, xdelay=00:00:00, mailer=esmtp, 
pri=10021795, relay=mail.greenspot.fi. [83.143.217.182], dsn=4.0.0, 
stat=Deferred: Connection refused by mail.greenspot.fi.

But yet I can successfully telnet that host:

# telnet mail.greenspot.fi 25
Trying 83.143.217.182...
Connected to mail.greenspot.fi (83.143.217.182).
Escape character is '^]'.
220 mail.greenspot.fi ESMTP Sendmail; Tue, 15 May 2012 22:34:22 +0300

Also, the mailer-daemon *can* send automatic warning messages to 
mail.greenspot.fi just fine.

So, the error probably is in my sendmail configuration.

The error appeared as I today reconfigured the backup mail server to use 
a "dual sendmail" setup with amavis and greylisting. How could I proceed?

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Geographic filtering for Sendmail on CentOS 5

2012-05-14 Thread Jussi Hirvi
On 14.5.2012 11.13, Alexander Dalloz wrote:
> You are best served if you use a milter. You may find a better suiting
> milter onhttps://www.milter.org/, but I think there is no better
> flexible choice than MIMEDefanghttp://www.mimedefang.org/  (available
> through EPEL). If you speak Perl, you are able to implement what you
> describe and even more.

Regrettably, my Perl skill is really elementary. But maybe there are 
recipes on the net.
- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Geographic filtering for Sendmail on CentOS 5

2012-05-13 Thread Jussi Hirvi
I tried to google, but find no directions for configuring this. I would 
like to

1) limit greylisting only for messages that come from other countries
2) give higher spam level to these messages (preferably only for certain 
receiving email addresses)

I already have installed geoip.x86_64 (1.4.6-1.el5.rf).

How to proceed? Or should I move to CentOS 6 for this?

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] your advice on backup procedure

2012-03-24 Thread Jussi Hirvi
For MySQL backups, I think nobody mentioned doing nightly backups with 
mysqldump and then backing them up with rsync or other tools. That is 
what I do. No need to stop any services even for a second.

I have a two-tier backup solution, where I first backup things with 
rsync to "backup 1" and then use rdiff-backup to construe an incremental 
archive on "backup 2" (in other location).

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Constant disk activity

2012-03-22 Thread Jussi Hirvi
On 22.3.2012 8.35, Woodchuck wrote:
> I believe the sequence of commands would be  Gf5r3ZZ

Just a sidenote: what vi/vim command is ZZ? I notice that it saves and 
quits, but why? I usually to :wq for that.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] C6.2 on DELL E6520

2012-03-02 Thread Jussi Hirvi
On 2.3.2012 15.59, Bernd Bartmann wrote:
> The only problem is that the system hangs after
> entering "reboot". I can see that several services get stopped, but
> after some seconds the screen is just black and nothing happens
> anymore.

Does it hang after the shutdown process is totally complete, or 
somewhere in between? (If so, what is the last thing you see on screen?) 
How long have you waited for it to proceed?

How much RAM? On startup it will be checking the RAM, and possible other 
things, and I think this happens right at the beginning of startup 
sequence.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Strange queries in httpd log

2012-02-24 Thread Jussi Hirvi
On 24.2.2012 12.22, Markus Falb wrote:
> It was a check for proxy.
> you can try something like this:
>
> $ telnetwww.my_real_domain.com  80
> Trying ...
> Connected towww.my_real_domain.com.
> Escape character is '^]'.
> GEThttp://financeande.com/feed/feed.php  HTTP/1.1
> host:www.my_real_domain.com
> [double enter]

Thanks. It's good to know, even though I was pretty sure already it's 
not a vulnerability.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Strange queries in httpd log

2012-02-24 Thread Jussi Hirvi
On 24.2.2012 10.27, John R Pierce wrote:
> On 02/24/12 12:10 AM, Jussi Hirvi wrote:
>> ...when the DNS shows that the domain financeande.com is hosted
>> elsewhere? What kind of query can they have used?
>
> a forged one with a bogus vhost.

I get almost similar entry, if I hit this on the browser:

http://www.my_real_domain.com/http://bogus.com

It shows like this in the log:

 > (...) - - [24/Feb/2012:11:12:27 +0200] "GET /http://bogus.com 
HTTP/1.1" 404 292 "-" (...)

Only here it starts with a slash (/http...), but in the original log 
entry there was no slash. I'm still curious to know how this log entry 
was born:

 > "GET http://financeande.com/feed/feed.php HTTP/1.1" 404 291 (...)

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Strange queries in httpd log

2012-02-24 Thread Jussi Hirvi
How is it possible that I get this kind of queries on my webserver 
(extract from httpd access log):

58.218.199.250 - - [22/Feb/2012:15:23:06 +0200] "GET 
http://financeande.com/feed/feed.php HTTP/1.1" 404 291 "-" "Mozilla/4.0 
(compatible; MSIE 6.0; Windows NT 5.1)"

...when the DNS shows that the domain financeande.com is hosted 
elsewhere? What kind of query can they have used?

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Key auth question

2012-02-12 Thread Jussi Hirvi
On 12.2.2012 11.51, Eero Volotinen wrote:
> Check logs for sshd deamon first. It usually gives explanation about issue.

Damn, that was simple. /var/log/secure tells it in plain language:
> Authentication refused: bad ownership or modes for directory /var/www/railsdev

(that is the home dir for the user git). The perms were:
$ ls -ld /var/www/railsdev
drwxrws--- 5 git apache 4096 Feb 12 10:52 railsdev/

I did chmod g-w, and the key auth started to work! Thanks.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Key auth question

2012-02-12 Thread Jussi Hirvi
I have a problem getting key authentication to work with one remote user 
(git), even though it works fine for the remote user "root". The remote 
file .ssh/authorized_keys is identical for both users - I cp'ed it from 
the root account to the git home dir.

On local machine (OS X, by the way) I have:
$ cd
$ ls -l .ssh
-rw---  1 jussihirvi  staff   668 Aug 24 16:13 id_rsa
(the rest is omitted)

On remote machine (as root):
$ cd
$ ls -ld .ssh
drwxr-xr-x 2 root root 4096 Feb 11 17:45 .ssh
$ ls -l .ssh
total 8
-rw--- 1 root root 1768 Feb 11 17:45 authorized_keys
-rw-r--r-- 1 root root  631 Feb 11 12:30 known_hosts

On remote machine (as git):
$ cd
$ ls -ld .ssh
drwxr-xr-x 2 git git 4096 Feb 12 11:15 .ssh
$ ls -l .ssh
total 8
-rw--- 1 git git 1768 Feb 12 10:52 authorized_keys
-rw-r--r-- 1 git git  631 Feb 12 11:05 known_hosts

When, on local machine, I do:
$ ssh root@remotehost
I get in without a password. But when I do
$ ssh git@remotehost
I will be asked for a password.

What should I check?

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Key auth question

2012-02-12 Thread Jussi Hirvi
I have a problem getting key authentication to work with one remote user 
(git), even though it works fine for the remote user "root". The remote 
file .ssh/authorized_keys is identical for both users - I cp'ed it from 
the root account to the git home dir.

On local machine (OS X, by the way) I have:
$ cd
$ ls -l .ssh
-rw---  1 jussihirvi  staff   668 Aug 24 16:13 id_rsa
(the rest is omitted)

On remote machine (as root):
$ cd
$ ls -ld .ssh
drwxr-xr-x 2 root root 4096 Feb 11 17:45 .ssh
$ ls -l .ssh
total 8
-rw--- 1 root root 1768 Feb 11 17:45 authorized_keys
-rw-r--r-- 1 root root  631 Feb 11 12:30 known_hosts

On remote machine (as git):
$ cd
$ ls -ld .ssh
drwxr-xr-x 2 git git 4096 Feb 12 11:15 .ssh
$ ls -l .ssh
total 8
-rw--- 1 git git 1768 Feb 12 10:52 authorized_keys
-rw-r--r-- 1 git git  631 Feb 12 11:05 known_hosts

When, on local machine, I do:
$ ssh root@remotehost
I get in without a password. But when I do
$ ssh git@remotehost
I will be asked for a password.

What should I check?

- Jussi

-- 
Jussi Hirvi * Green Spot
Suvilahdenkatu 1 B 78 * 00500 Helsinki * Finland
Tel. +358 9 493 981 * Mobile +358 40 771 2098 (only sms)
jussi.hi...@greenspot.fi * http://www.greenspot.fi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Htaccess management with GUI

2012-01-31 Thread Jussi Hirvi
On 31.1.2012 16.25, n...@li.nux.ro wrote:
> webmin

I was thinking about that, as I use webmin myself. I think, however, 
that webmin is overkill in this case. At the moment I am testing 
DirectoryPass

http://www.DirectoryPass.com/

...and it looks like nearly perfect for me, except it cannot actually 
create directories. But I think my client can do without. The important 
thing is that DirectoryPass supports multiple directories.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Htaccess management with GUI

2012-01-31 Thread Jussi Hirvi
My webhotel client wants to be able to manage password protection of 
their website with GUI. They need to create and destroy directories, set 
.htaccess authentication, and create usernames and passwords.

There seem to be a number of tools that do this, more or less:

http://www.debianhelp.co.uk/htaccessweb.htm

However, I have not found any good comparisons or reviews. Has anyone 
tested this kind of tools?

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Postfix mail server procedure

2011-11-09 Thread Jussi Hirvi
On 9.11.2011 14.04, Jussi Hirvi wrote:
> Looks like there is no similar "dual" setup for postfix. This postfix
> tutorial does not look bad:
>
> http://www.wowtutorial.org/tutorial/169.html

Uh, now I read some more of this thread and saw some (other) bad 
tutorials. This one is not so good either:

> Install Amavisd-new
>
> #cd /usr/ports/security/amavisd-new
> #make config
> #make install clean

No need for that, when you can do "yum install amavisd-new"! So please 
ignore "wowtutorial". :-)

- Jussi

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Postfix mail server procedure

2011-11-09 Thread Jussi Hirvi
On 9.11.2011 13.23, Adam Tauno Williams wrote:
> For CLAMAV you need to have clamd running and a milter.  I'm not certain
> what milter's are current - when I set one up they were all had equally
> stale documentation.  Does CentOS currently ship a working clamav
> milter?

Hope this is relevant. I use a "dual Sendmail" setup with and 
amavisd-new - no milter at all, except greylist. The incoming mail is 
first processed by sendmail, then sent to amavisd-new on port 10024. 
Amavis handles spamassassin and clamd calls (and in my case, also 
f-secure virus checks as a backup) and returns the email (port 10025) to 
*another* sendmail instance, which then either sends the mail or files 
it in a local inbox.

http://www.ijs.si/software/amavisd/README.sendmail-dual.txt

Looks like there is no similar "dual" setup for postfix. This postfix 
tutorial does not look bad:

http://www.wowtutorial.org/tutorial/169.html

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Fwd: L9 - what is true?

2011-10-19 Thread Jussi Hirvi
Uh, again I posted on the wrong list - sorry!
- Jussi

 Original Message 
Subject: L9 - what is true?
Date: Wed, 19 Oct 2011 15:01:59 +0300
From: Jussi Hirvi 
To: CentOS mailing list 

This code:

boolean(null);   ', ';
boolean(string); ', ';
boolean(integer);', ';
boolean(array);  ', ';
boolean(map);', ';

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] L9 - what is true?

2011-10-19 Thread Jussi Hirvi
This code:

boolean(null);   ', ';
boolean(string); ', ';
boolean(integer);', ';
boolean(array);  ', ';
boolean(map);', ';

gives:
false, false, false, true, true

This is different from L8. Is this intentional? If so, why?

This has consequences which I think are counterintuitive:

if(array(1) -> find('whatever'));

This evaluates as true.

- Jussi

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] L9 - what is a value

2011-10-17 Thread Jussi Hirvi
This code:

var('i') = string;
boolean($i); '';
var('i') = array;
boolean($i); '';

gives:

> false
> true

So an empty array gives "true" but an empty string "false".
This is different from L8. Is this intentional? If so, why?

This has consequences which I think are counterintuitive:

var('i') = array(1);
if($i -> find('whatever'));
i   'true'; '';
$i -> find('whatever'); '';
/if;

The if clause evaluates as true and gives as output:
true
array()

- Jussi

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] SORRY - L9 - what is a value

2011-10-17 Thread Jussi Hirvi
Sorry, wrong list! This is Lasso code.

- Jussi

On 17.10.2011 15.04, Jussi Hirvi wrote:
> This code:
>
> var('i') = string;
> boolean($i); '';
> var('i') = array;
> boolean($i); '';
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] L9 - what is a value

2011-10-17 Thread Jussi Hirvi
This code:

var('i') = string;
boolean($i); '';
var('i') = array;
boolean($i); '';

gives:

 > false
 > true

So an empty array gives "true" but an empty string "false".
This is different from L8. Is this intentional? If so, why?

- Jussi

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Why are all repos < 5.6 listed?

2011-07-23 Thread Jussi Hirvi
On 23.7.2011 21.58, Ljubomir Ljubojevic wrote:
> I just enabled all repos on my system, to enable me to find
>>  a particular package. This is the first time I have noticed
>>  all the Centos repos<  5.6 being listed.
>>
>>  Is this a new feature, to include all repos pre 5.6 now?
>>

I have these repos listed in a separate file in /etc/yum.repos.d. The 
file is called CentOS-Vault.repo. I think this appeared automatically 
with "yum update".

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Recommended mailing list manager for CentOS 5.6

2011-07-20 Thread Jussi Hirvi
On 20.7.2011 4.32, Les Mikesell wrote:
> One feature you are likely to miss, though, is a good search for the archives.
> If it is open to the public I suppose you can let google index it for you.

+1

If someone knows a fix, please share.

Mailman 3 will most probably have searchable archives, but who knows 
when it will be out.

https://launchpad.net/mailman/3.0

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Diskdevstat

2011-07-07 Thread Jussi Hirvi
On 7.7.2011 19.46, Giovanni Tirloni wrote:
> There are more details about diskdevstat and netdevstat here:
> http://goo.gl/pA8Yt
>
> Since they depend on SystemTap, check this:
> http://sourceware.org/systemtap/wiki/SystemTapOnCentOS
>
> I couldn't find the tuned-utils package for CentOS 5.x but, if there aren't
> huge changes to SystemTap in CentOS 6.x, you could try to download the
> scripts from their repository and try them:https://fedorahosted.org/tuned/

Ok, thanks. I will check those.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Diskdevstat

2011-07-06 Thread Jussi Hirvi
 > Red Hat Enterprise Linux 6 also introduces diskdevstat for monitoring
 > disk operations and netdevstat for monitoring network operations.

How could I monitor disk operations under CentOS 5?

The quote is from RHEL 6 release notes
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/6.0_Release_Notes/powermanagement.html

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Power-outage

2011-07-02 Thread Jussi Hirvi
On 1.7.2011 18.49, m.r...@5-cent.us wrote:
> ah, the smell of fresh plastic outgassing, factory
> air from China :(((

Probably more the smell of fire prevention chemicals outgassing. Be 
careful! As for me, I am sensitized to that smell.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Power-outage

2011-07-02 Thread Jussi Hirvi
On 1.7.2011 18.49, m.r...@5-cent.us wrote:
> ah, the smell of fresh plastic outgassing, factory
> air from China :(((

Probably more the smell of fire prevention chemicals outgassing. Be 
careful! I am sensitized to that smell.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Kernel Errors

2011-06-29 Thread Jussi Hirvi
>> Is there any mention of a floppy in output of "mount"?
> Hello Jussi.
>
On 29.6.2011 20.51, Keith Roberts wrote:
> None at all using 'mount' or 'df -h'

Here is somebody having the same problem, though on Suse:

http://www.linuxquestions.org/questions/linux-software-2/linux-kernel-end_request-i-o-error-dev-fd0-sector-0-a-319629/

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Kernel Errors

2011-06-29 Thread Jussi Hirvi
On 29.6.2011 20.37, Keith Roberts wrote:
> Checking my daily logwatch file, I see the following kernel
> error:
>
>- Kernel Begin 
>
>WARNING:  Kernel Errors Present
>   end_request: I/O error, dev fd0, sector ...:  1 Time(s)
>
>-- Kernel End -
>
>
> The thing is I have not used a floppy disk for weeks.
>
> Any ideas what's happening please?

Is there any mention of a floppy in output of "mount"?

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] yum bug...

2011-06-29 Thread Jussi Hirvi
On 29.6.2011 12.56, John Doe wrote:
> I noticed a difference between it and a simple 'yum':
>
># yum udpate
>Loaded plugins: fastestmirror, priorities
>usage: yum [options] COMMAND
>
>
># yum
>Loaded plugins: fastestmirror, priorities
>You need to give some command
>usage: yum [options] COMMAND

Not a bug - only misspelled word. It's "update", not "udpate". :-)

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Vim scripting - cursor motion

2011-06-11 Thread Jussi Hirvi
On 11.6.2011 19.08, Alain Péan wrote:
> I hope not to begin a flame war, but I would recommend Python. It can do
> the same things as Perl (regexp ansd so on), but is easier and faster to
> learn, and the code is also much more readeable...

In practice, any language you know well enough... This is a simple task.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Vim scripting - cursor motion

2011-06-11 Thread Jussi Hirvi
On 10.6.2011 21.42, Les Mikesell wrote:
> I thought the point of using vim instead of something more appropriate
> for scripting was that you already knew how to use it.

I only wrote that I know vim *better* than sed, awk or perl. Obviously 
there is a lot about vim that I don't know.

 > Why not do:
> vim -W script testfile
> and go through the motions you know (which can include 1G to go to the
> 1st line and G to go to the last).
> Then run
> vim -s script realfile
> to do the same actions again.

Ok, that helped me along. For some reason the motions (like 1G0 for 
beginning of file, or G$ for last char in file) work, when the script is 
called from command-line with -s flag (vim -s myscript myfile). But they 
don't work when the script is called from inside vim (:source myscript). 
I wonder why.

However, this script does more or less what I want - transforms a 
tab-text file to a comma-separated (CVS) file:

:% s/\t/","/g
:% s/\r\n/\r/g
:% s/\n/"),\r("/g
1G0I("^[
Gdd
G$xa;^[
:w

Comments to lines:
1) replace tabs
2) make line endings regular
3) insert quotes and brackets to end & beginning fo each line
4) handle the beginning of file
5) remove the last line (created by this script)
(the command G works, but it rings the bell for some reason)
6) handle the end of file
7) write file

So this was my first-ever vim script. So far I am not convinced about 
vim scripting (ok, I was warned, too)... Test cycle is slow (modify 
script, quit the realfile, open realfile again with vim -s script). 
Verbal error messages would be useful. There is supposed to be 
"integrated debugger". I would like to know more.

- Jussi

-- 
Jussi Hirvi * Green Spot
Suvilahdenkatu 1 B 78 * 00500 Helsinki * Finland
Tel. +358 9 493 981 * Mobile +358 40 771 2098 (only sms)
jussi.hi...@greenspot.fi * http://www.greenspot.fi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Vim scripting - cursor motion

2011-06-10 Thread Jussi Hirvi
On 10.6.2011 18.39, flapecc...@gmail.com wrote:
> There is a good article on vimscript here:
> http://www.ibm.com/developerworks/linux/library/l-vimscript-1/index.html)

Sorry there was a typo, the correct URL is:
http://www.ibm.com/developerworks/linux/library/l-vim-script-1/index.html

Thanks, I found that already, and it is a good one. But it didn't help 
me solve my problem about cursor motions.

Maybe my question is wrong - maybe I should just use line ranges in 
commands, for example for the first line:
:1,1s/foo/bar/g
and for the last line:
:$,$s/foo/bar/g

- Jussi
-- 
Jussi Hirvi * Green Spot
Suvilahdenkatu 1 B 78 * 00500 Helsinki * Finland
Tel. +358 9 493 981 * Mobile +358 40 771 2098 (only sms)
jussi.hi...@greenspot.fi * http://www.greenspot.fi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Vim scripting - cursor motion

2011-06-09 Thread Jussi Hirvi
On 9.6.2011 18.01, m.r...@5-cent.us wrote:
> Why do vim scripting? That's what sed, or awk, or perl, are for. The
> latter two, of course, are much easier to comprehend the logic, too.

Maybe just because I know vim better than sed, awk or perl, which I 
haven't used at all. :-)

The practical purpose is to turn a tabtext file into CSV 
(comma-separated) to be used in a SQL insert statement.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Vim scripting - cursor motion

2011-06-09 Thread Jussi Hirvi
I am working on my first vim script. The script is supposed to do some 
find/replace on a file, then save the file with a new name and quit vim.

I will save the script in a file and then call it from a bash script 
like this:

vim path-to-the-file -s path-to-my-script

Maybe I have not found the right resources. I can find/replace with 
expressions that are similar to those I use manually, for example:

:% s/\t/","/g

Then I should add something to the beginning of file (line 1, char 1).
And append something to the end of the file (last line, last char). But 
I cannot find a way to do this. Should I move the cursor (and how?), or 
what?

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] hard disk install failure

2011-06-07 Thread Jussi Hirvi
On 7.6.2011 1.19, Timothy Murphy wrote:
> But I'm not sure what "image #2" is? Or where it should be put?
>
images/stage2.img ??

  -Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] virt-install hell: how to *force* a local CD-ROM install?

2011-06-01 Thread Jussi Hirvi
On 1.6.2011 19.52, Robert Heller wrote:
> I have a CentOS 5.6 system with a AMD Sempron(tm) Processor LE-1300
> (which does not provide hardware virtualization support, so I can't use
> the --cdrom option) and I am *trying* to install FC15 as a guest O/S
> using a local FC15 DVD-ROM image.  Everything work until the installer
> *insists* on firing up the network to get the repo data, etc.  I have a
> *dial-up* Internet connection and this is a *desktop* machine and is
> thus pretty much anchored where it is. I have googled this, but it
> seems no one uses local DVD images.  (Of cource *everyone* in the world,
> except for rural America, has broadband.)
>
> I was able to install FC15 on a old IDE disk connected via a USB port
> after booting a burned copy of the DVD.  *Everything* needed to install
> the *minimual* system I want to install is there on the DVD, but I can't
> seem to get the FC15 installer to believe that.  I *don't* want or need
> the updates at this time (maybe later).
>
> Oh, and the virt-viewer is chopping off the right third of the graphical
> display. Is there any way to fix that?  It would let me resize the
> viewer window and does not provide scroll bars, etc.  Or is the FC15
> installer having a stupid idea of the virtual machine virtual monitor
> size? Can *that* be changed (the virtual machine's virtual monitor size)?
>
> The command line I am using is:
>
> sudo virt-install --name=fc15guest --ram=1024 --os-type=linux \
>   --os-variant=fedora12 \
>   --location=/distrocds/Fedora/Fedora-15-x86_64-DVD.iso \
>   --disk="path=/dev/sauron/fc15guest"

I never could do a virt-install using only optical media, and I tried 
many times (couple of months ago). Also I could not get the --connect 
clause to work for me.

This kind of procedure did work:

# first, mount the DVD:
mount -o loop /root/centos56_64.iso /mnt/centos56

# then...
virt-install --name mail \
--os-variant rhel5.4 --ram 1024 \
--vcpus 2  --accelerate \
--nographics -v \
--location /mnt/centos56/  --network bridge:br0 \
--disk path=/kvmail/mail.img,size=290 \
--extra-args "console=ttyS0";

# and when the installer asks, select "http" and a repo

You can create a local http repo on the host itself and give that to the 
installer, for example http://127.0.0.1/centos/etc...

Maybe you could build a local repo using the materials on the DVD. I 
think I did not try that.

Http install with the CentOS 4 installer was *very* strict and quirky 
about slashes in the http repo address. Not sure about FC. Check this 
thread:

http://forum.nginx.org/read.php?24,193648,194173#msg-194173

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] OT: Why VM?

2011-05-29 Thread Jussi Hirvi
It has been a long thread, but one point that has been mentioned only in 
passing (VMWares "top 5 reasons") is cutting the electricity 
consumption. Maybe this is obvious.

I recently consolidated 8 hardware servers to a single 1U Dell, which 
runs KVM virtualization. The power bill was cut to a fraction! Do the 
same on a bigger scale, and it will be a significant saving. Also it 
reflects on cooling costs. Good for the planet, too.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] xferlog not rotating.

2011-05-21 Thread Jussi Hirvi
On 21.5.2011 20.43, R P Herrold wrote:
> early in the thread, it was clear from a reply's content that
> a locally installed 'ftpd' and not the CentOS vsftpd was
> being used

I think you are inadvertently confusing the issue. ftpd is mentioned in 
this file (see below), but still vsftpd is used:

[root@mx2 logrotate.d]# cat vsftpd.log
/var/log/vsftpd.log {
 # ftpd doesn't handle SIGHUP properly
 nocompress
 missingok
}

/var/log/xferlog {
 # ftpd doesn't handle SIGHUP properly
 nocompress
 missingok
}

As for me, vsftpd is logging to xferlog, and it is rotated normally 
(CentOS 5.6) with the following settings in vsftpd.conf:

# The target log file can be vsftpd_log_file or xferlog_file.
# This depends on setting xferlog_std_format parameter
xferlog_enable=YES
# Switches between logging into vsftpd_log_file and xferlog_file files.
# NO writes to vsftpd_log_file, YES to xferlog_file
xferlog_std_format=YES

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] xferlog not rotating.

2011-05-21 Thread Jussi Hirvi
On 21.5.2011 19.02, Lamar Owen wrote:
> Now, one of my C5.6 boxen is set up with /etc/vsftpd/vsftpd.conf:
> # The name of log file when xferlog_enable=YES and xferlog_std_format=YES
> # WARNING - changing this filename affects /etc/logrotate.d/vsftpd.log
> #xferlog_file=/var/log/xferlog
> #
> which matches observed behavior.
>

The important parameter in vsftpd.conf, if I read you right, is this:
# Switches between logging into vsftpd_log_file and xferlog_file files.
# NO writes to vsftpd_log_file, YES to xferlog_file
xferlog_std_format=YES

That is where you choose the log file. What do you have for 
xferlog_std_format?

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Feed a list of filenames to vim

2011-05-18 Thread Jussi Hirvi
On 18.5.2011 16.54, Bowie Bailey wrote:
> You can also do this:
>
> $ vim `ls -1 *.txt`

That one can be accomplished in a simpler way:

vim *.txt

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Feed a list of filenames to vim

2011-05-17 Thread Jussi Hirvi
On 17.5.2011 19.36, Bowie Bailey wrote:
> Try this:
>
> vim `cat list`

Thanks, this really works! I tried it with all my combinations:

OS X workstation by itself
OS X workstation -> ssh -> CentOS 4
OS X workstation -> ssh -> CentOS 5

BTW, with the xargs command, all of these combinations give some 
problems. The cause may have something to do with my terminal settings. 
Anyway, now I can use `cat list`.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Feed a list of filenames to vim

2011-05-17 Thread Jussi Hirvi
There are some googlable ways to feed a list of filenames to vim, but I 
stumble on weird results.

With my filelist, I try to do

cat list | xargs vim

...to edit the files listed in the file "list". Here's what happens:

[root@lasso2 tempdir]# ls -l
total 8
-rw-r--r--  1 root root  0 May 17 18:28 a
-rw-r--r--  1 root root  0 May 17 18:28 b
-rw-r--r--  1 root root  3 May 17 18:31 c
-rw-r--r--  1 root root 12 May 17 18:43 list
[root@lasso2 tempdir]# cat list
./a
./b
./c
[root@lasso2 tempdir]# cat list | xargs vim
3 files to edit
Vim: Warning: Input is not from a terminal

Ok, so far, so good. And after this, the file a opens, as expected. 
However, the contents show as all uppercase. And everything I write is 
uppercase too. I can move to the next file (:n) even though the command 
shows as uppercase (:N). I cannot quit vim, however. When I do ":q", I 
get blank screen, and I have to close the terminal window.

If I do instead
cat list | xargs less
...it works as expected.

And with
cat list | xargs vi
...(in a fresh terminal window), the editing goes just perfect, but when 
I quit vi, the terminal will not show the commands I write, and the 
display gets garbled (no newlines etc.).

What is happening?

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Identifying physical disks

2011-05-03 Thread Jussi Hirvi
On 3.5.2011 22.05, Andy Holt wrote:
> ls -l /dev/disk/by-id
>
> which on my system gives me:
>
> lrwxrwxrwx 1 root root  9 Mar  6 14:34 
> scsi-SATA_SAMSUNG_HD154UIS1XWJ1BZ900317 ->  ../../sdc
> lrwxrwxrwx 1 root root  9 Mar  6 14:34 
> scsi-SATA_SAMSUNG_HD154UIS1XWJ1BZ900318 ->  ../../sdb
> lrwxrwxrwx 1 root root  9 Mar  6 14:34 
> scsi-SATA_SAMSUNG_HD154UIS1XWJ9CZA00454 ->  ../../sdd
>
> which are my three identical Samsung HD154UI disks.  Their serial numbers are 
> the S1XWJ... bits at the end.

Hei,

That is cool! Thanks.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] With kickstart (Re: Install CentOS as KVM guest)

2011-04-30 Thread Jussi Hirvi
> On Thu, 28 Apr 2011, Jussi Hirvi wrote:
>
>> >  BTW, can guests be installed on raw (unformatted or formatted)
>> >  partitions (not images)? Can virt-install do that? I tried it and had no
>> >  luck.
>> >
>> >  - Jussi
> You can install them to logical volumes...
>
On 28.4.2011 21.29, Jim Wildman wrote:
> Season to taste
> virt-install -p -n test_phys -r 512 --arch=x86_64 --os-type=linux
> --os-variant=rhel5 -lhttp://192.168.200.2/c5u5_x86_64  -x
> ks=http://192.168.200.2/buildhost.ks  -f /dev/vg_tosh/lv_phys -b virbr0

It took me some time to get the kickstart file load at all, because I 
also had to fit in the console specification, to get a text-based 
installation. This is what the script now looks (only name and ip changed):

virt-install --name myvm \
--os-variant rhel5.4 --ram 512 \
--vcpus 1  --accelerate \
--nographics -v \
--location /mnt/centos56/  --network bridge:br0 \
--disk path=/kv2/myvm.img,size=15 \
--extra-args "ks=http://12.34.56.78/anaconda-ks.ks console=ttyS0";

There is a mounted CentOS 5.6 DVD at /mnt/centos56. The kickstart file 
specifies the URL for http installation of CentOS 5.6.

It worked just beautifully, and fast too. The installer only asked me if 
I am sure that I want to format the virtual sisk. Otherwise it was all 
automatic. What a pleasure!

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Identifying physical disks

2011-04-30 Thread Jussi Hirvi
On 30.4.2011 12.34, Eero Volotinen wrote:
> take look at serial number using smartctl
>
> http://www.techrepublic.com/blog/opensource/using-smartctl-to-get-smart-status-information-on-your-hard-drives/1389
>
Thanks, I did. I am sure they will help me when it is time to actually 
replace the drive.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Identifying physical disks

2011-04-30 Thread Jussi Hirvi
I am sure this is really simple.

I have a setup of 2 disks (sda, sdb) which are outwardly identical, and 
are mirrors of each other. Together they form 3 raid1 devices. Both 
disks can boot.

Now sda has bad sectors, and I should replace it. But which one of the 
physical disks is sda??

The machine boots fine from either one of the disks, (and the booting 
disk of course is always called sda).

In the messages log I see entries like this:

Apr 29 02:21:07 a134-224 kernel: ata2: SATA link up 3.0 Gbps (SStatus 
123 SControl 300)

By noticing which SATA link (ata1, ata2) is up and which is down, I can 
find out which physical disk is connected to ata1 and which to ata2.

If both disks are connected, will the hd in ata1 become sda, and the hd 
in ata2 become sdb??

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Switching to php53

2011-04-30 Thread Jussi Hirvi
I would try to first "yum erase php", and then install the php53 version.

- Jussi

On 30.4.2011 9.29, Dave Cross wrote:
> I have a Centos 5.6 server which is using the default php packages.
> These currently contain PHP 5.1.6.
>
> My main use of PHP on the server is to support an installation of
> WordPress. I currently had WP 3.1.2 installed, but the WP developers
> have announced that from WP 3.2 they will only support PHP 5. and
> greater.
>
> So I investigated and found that the Centos repo contains a series of
> php53 packages. I tried to install php53 using yum but got the
> following error:
>
>Resolving Dependencies
>-->  Running transaction check
>--->  Package php53.x86_64 0:5.3.3-1.el5_6.1 set to be updated
>-->  Processing Dependency: php53-cli = 5.3.3-1.el5_6.1 for package: php53
>-->  Processing Dependency: php53-common = 5.3.3-1.el5_6.1 for package: 
> php53
>-->  Running transaction check
>--->  Package php53-cli.x86_64 0:5.3.3-1.el5_6.1 set to be updated
>--->  Package php53-common.x86_64 0:5.3.3-1.el5_6.1 set to be updated
>-->  Processing Conflict: php53-common conflicts php-common
>-->  Finished Dependency Resolution
>php53-common-5.3.3-1.el5_6.1.x86_64 from updates has depsolving problems
>  -->  php53-common conflicts with php-common
>Error: php53-common conflicts with php-common
> You could try using --skip-broken to work around the problem
> You could try running: package-cleanup --problems
>package-cleanup --dupes
>rpm -Va --nofiles --nodigest
>
> I would have thought that the new php53-common package would have
> obsoleted php-common rather than conflicting with it.
>
> Is there a clean way to replace php with php53? Or should I just wait
> and hope that Centos 6 is released before WP 3.2 :)
>
> Thanks,
>
> Dave...
>


-- 
Jussi Hirvi * Green Spot
Suvilahdenkatu 1 B 78 * 00500 Helsinki * Finland
Tel. +358 9 493 981 * Mobile +358 40 771 2098 (only sms)
jussi.hi...@greenspot.fi * http://www.greenspot.fi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Install CentOS as KVM guest

2011-04-28 Thread Jussi Hirvi
On 28.4.2011 20.29, Tru Huynh wrote:
> does that mean that you volonteer to add some pages to wiki.centos.org
> (->  centos-docs mailing list for more) ? ;P
>
Maybe I could, How could that be done? Though I should have started to 
think about that earlier, now the big install hassle starts to be over 
already. But at least I have a rudimentary roadmap for installing CentOS 
4 or 5 guests text-based.

BTW, can guests be installed on raw (unformatted or formatted) 
partitions (not images)? Can virt-install do that? I tried it and had no 
luck.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Install CentOS as KVM guest

2011-04-28 Thread Jussi Hirvi
On 28.4.2011 18.58, Emmanuel Noobadmin wrote:
> like anaconda not seeing the "dvd"
> (mounted ISO specified using --location) that it just booted from.

That's ok, once you know that... But I agree, it is frustrating, because 
of lack of documentation. How much time wasted!

I found an interesting series of tutorials, looks pretty much 
up-to-date. Here is one:

http://www.cyberciti.biz/faq/kvm-virt-install-install-freebsd-centos-guest/

I never tried handing the install media over with the --connect (-c) 
flag like there:

virt-install...
-c /nfsclient/iso/FreeBSD-7.3-RELEASE-amd64-disc1.iso \

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Install CentOS as KVM guest

2011-04-28 Thread Jussi Hirvi
> On 4/28/11, Jussi Hirvi  wrote:
>>>  Try virt-install without creating the image first.

On 28.4.2011 9.17, Emmanuel Noobadmin wrote:
> I'll give that a spin next, although the disks file I created are RAW
> as well. The problem wth using virt-install to create files is that it
> takes forever, I've no idea why.

For me creating the images does not take any noticeable time. Only when 
the installer formats the "disk" to ext3 (or others), it will take some 
time. Probably your syntax does not work. Try the syntax in my example, like

--disk path=/kvmail/mail.img,size=290 \

(making sure that the image does not exist beforehand).

>> >  No, I definitely did not do that. I don't know why that would be needed.
> That's what I'm puzzling over. But reading up so far seems to imply
> that it acts as a way for qemu/KVM to receive and inject network
> traffic into the kernel network stack.

You are probably reading some outdated howtos. No wonder, because where 
are the up-to-date howtos?? Red Hat Virtualization Guide is a nice book, 
but only an overview - it does not go into the gritty details.

>> >  The double slash does not look good... On next try, try it with no slash
>> >  at the end of ip, and no slash at the beginning of path. (But keep the
>> >  last slash.):-)
> The installer adds that double slash, it was one of the first oddity I
> noted. But googling indicates that this was normal and testing it,
> indicates that the URL was valid. I suppose it just meant root of root
> which is still root :D

I just got the double slash too on one installation try. I believe the 
double slash is an error of the error messaging. :-) If so, it only 
shows the level of "sophistication" of virt-install.

> Anyway I tried out different variations just to be safe, but whether I
> used /Centos56 or Centos56 or Centos56/, the same url comes up. The
> installer apparently does some basic sanitization of the parameters.

So it should. But that only "sanitizes" the error message, and 
erroneously (producing a double slash). :-)

I am just installing CentOS 4. I tried it first without a trailing slash 
in the path, and I got instantly "unable to get the image" or so. After 
that I could not get the image again, whatever I did. I had to restart 
the install from scratch, and then, after being sure to add the trailing 
slash, I got the image at once.

If this is problem in Anaconda or virt-install, I am not sure.

> As for the httpd log you mentioned in another email, that's also one
> of the reason I keep suspecting that networking is the issue. There
> are no entries in the httpd logs for the guest, but I can see my
> external access entries.

Ok, that could be the case.

- Jussi
-- 
Jussi Hirvi * Green Spot
Suvilahdenkatu 1 B 78 * 00500 Helsinki * Finland
Tel. +358 9 493 981 * Mobile +358 40 771 2098 (only sms)
jussi.hi...@greenspot.fi * http://www.greenspot.fi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Install CentOS as KVM guest

2011-04-27 Thread Jussi Hirvi
On 28.4.2011 8.11, Emmanuel Noobadmin wrote:
> So this is where my installation halts. I will get the message unable
> to retrievehttp://12.34.56.78//Centos56/images/stage2.img
>
You could check your httpd log to see if there is anything, like 404 
errors. And if problems persist, you could stop iptables for the time of 
install. (Don't blame me... But I don't consider it a big risk in normal 
circumstances.)

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Install CentOS as KVM guest

2011-04-27 Thread Jussi Hirvi
>> >  Here is one of my install commands that worked:
>> >  virt-install --name mail \
>> >  --os-variant rhel5.4 --ram 1024 \
>> >  --vcpus 2  --accelerate \
>> >  --nographics -v \
>> >  --location /mnt/centos56/  --network bridge:br0 \
>> >  --disk path=/kvmail/mail.img,size=290 \
>> >  --extra-args "console=ttyS0";

On 28.4.2011 8.11, Emmanuel Noobadmin wrote:
> I have pretty much the same thing except the names are slightly
> different and I've already created the disk with qemu-img so the size
> was omitted.

I tried it too, didn't work. Try virt-install without creating the image 
first. Virt-install will create the image (type "raw") on the go. If you 
want qcow2, you can convert the image later. Qcow2 has some special 
features but is slower than raw.

> Did you have to configure an additional tap interface? It seems like
> it might be necessary but all the guides just involve giving some
> command to create a temporary tap... which doesn't sound very safe if
> I want it to persist after a reboot. But I couldn't find any
> instructions on how a tap could be defined using a file like
> /etc/sysconfig/network-scripts/if_tap1.

No, I definitely did not do that. I don't know why that would be needed.

> I did this too, although my path was just centos56/
> Just in case the guest VM was connecting in an around about manner and
> iptables was blocking what appears to be an external connection. I
> tested that it was accessible from both a VNC session on the host
> itself, as well as from external network.
>
> So this is where my installation halts. I will get the message unable
> to retrievehttp://12.34.56.78//Centos56/images/stage2.img
>
> Just to be sure it was not just accessible but downloadable, I tried
> to download this exact URL including the double slash and it works.

The double slash does not look good... On next try, try it with no slash 
at the end of ip, and no slash at the beginning of path. (But keep the 
last slash.) :-)

> So it seems to me that the VM's networking is wrong somehow.
> Especially since the assigned IP is not pingable during this point.
> But I can't be sure if that's just because the OS is still being
> installed.

I would not expect ping to work at that point. I would do
virsh destroy myvm
virsh undefine myvm
virt-install again...

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Install CentOS as KVM guest

2011-04-27 Thread Jussi Hirvi
I understand you so well, I have been so frustrated too with 
virt-install. Virt-manager is probably an easier way to install, but 
text-based virt-install is very cranky (my experience). Maybe the devs 
concentrate on the GUI side. Hope not.

Anyway, to know what is wrong, more info would be needed... Especially, 
at what point does the installation stall.

Here is one of my install commands that worked:
virt-install --name mail \
--os-variant rhel5.4 --ram 1024 \
--vcpus 2  --accelerate \
--nographics -v \
--location /mnt/centos56/  --network bridge:br0 \
--disk path=/kvmail/mail.img,size=290 \
--extra-args "console=ttyS0";

So I boot the installer from a mounted DVD, then in the dialog I say 
"http install", and give it my local http "repo".

No other bridge is necessary - I think it would only make things messy.
In the installer let it configure interface with dhcp, if applicable, or 
give it a free ip.

In giving the http repo remember the slash after the subdirectory, for 
example (I noticed it is necessary)
address: 12.34.56.78
directory: centos/4.9/os/i386/

This would be http://12.34.56.78/pub/mirrors/centos.org/4.9/os/i386/
Check in your browser that the path works. The stage2 image should 
appear in seconds from a local repo!

Once I did a net install with
--location http://ftp.funet.fi/pub/mirrors/centos.org/4.9/os/i386/
But on another try it did not seem to work anymore. Not sure about that. 
Anyway the mounted ISO works every time. And a local repo is very fast.

- Jussi


On 26.4.2011 23.57, Emmanuel Noobadmin wrote:
> Unfortunately, things still don't work.
>
> 
> It's just ridiculous that the installer under KVM does not detect the
> cdrom drive it was booted from. Trying to do a net-install doesn't
> work, maybe I messed up the networking even though br0 and eth0 is
> working on the host.
>
> Nevermind, let's install apache and use the mounted ISO. Verified
> apache is working and the CentOS folder is accessible via web browser.
> But, still the guest installer cannot seem to access the installation
> files.
>
> OK, so maybe I messed up the networking, after all I am the noob...
> maybe specifying --network=bridge:br0 isn't enough. There was
> something about a tap or tunnel when initially reading up on bridged
> networking. Looking up more on this, there are several resources
> (sorry KVM FAQ leads to a page that no longer exist) which like many
> other instructions, give the commands without really explaining
> what/why.
>
> So I have to run some tunctl command and scripts to add a bridge and
> tunnel/tap... but wait, I already made my bridge, will running the
> script kill my networking by creating a second bridge? Especially the
> warning about temporarily loosing connectivity due to ifcfg1 being
> reset.
>
> And if I need to run this script everytime in order to activate the
> bridge and tunnel, doesn't that mean all my guest OS are screwed if
> the host reboots while I'm not around? Shouldn't these things go into
> permanent files like if-tun0 or something?
>
> Every year, I get a little closer to not using VMWare but it seems
> like this year is going to be victory for VMWare again.
>
> CC to kvm mailing list but I expect, like my previous request for help
> to the list, it will be rejected by mailman or a moderator.
> 
>
> Just damn frustrated, even if it's probably just me being too stupid
> to know how to use KVM.


-- 
Jussi Hirvi * Green Spot
Suvilahdenkatu 1 B 78 * 00500 Helsinki * Finland
Tel. +358 9 493 981 * Mobile +358 40 771 2098 (only sms)
jussi.hi...@greenspot.fi * http://www.greenspot.fi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Rsync 3 from rpmforge

2011-04-27 Thread Jussi Hirvi
Thanks for a triple answer. :-) Now I remember - like I said, I solved 
this problem once already. Hm, I should document better what I do...

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Rsync 3 from rpmforge

2011-04-27 Thread Jussi Hirvi
My brain must be on knots somehow.

I try to install rsync 3.x, which I know is in rpmforge repo for my 
architecture:

https://www.centos.org/modules/newbb/viewtopic.php?topic_id=22214

http://packages.sw.be/rsync/

But yum does not find it, however I try.

I have installed yum-priorities. Rpmforge is low priority. But still...

yum erase rsync  # erase v2.6 from base repo

yum --disablerepo=\* --enablerepo=rpmforge install rsyn\*
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
  * rpmforge: ftp-stud.fht-esslingen.de
Setting up Install Process
No package rsyn* available.
Nothing to do

I managed to do this a couple of days ago, but now I cannot.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] mdraid woes (missing superblock?)

2011-04-26 Thread Jussi Hirvi
I have a raid1 array which is somehow faulty. There is 1,5 TB of stuff, 
I would not want to lose it (though I have full backup).

The array cannot be mounted on startup (error message was "missing 
superblock"). I had to boot from DVD with linux rescue and remove the 
array from fstab.

Here is some info - I am a little dumbfounded.

[root@a134-224 log]# cat /proc/mdstat
(...)
md5 : active raid1 sdb1[0] sdd1[1]
   1562505856 blocks [2/2] [UU]


## mdadm examine - I believe the following output indicates that there 
really *is* a superblock

[root@a134-224 log]# mdadm --examine /dev/sdb1

/dev/sdb1:
   Magic : a92b4efc
 Version : 0.90.00
UUID : 194e7fdc:2a288e87:c03d8b24:c0120803
   Creation Time : Sat Apr 23 20:41:08 2011
  Raid Level : raid1
   Used Dev Size : 1562505856 (1490.12 GiB 1600.01 GB)
  Array Size : 1562505856 (1490.12 GiB 1600.01 GB)
Raid Devices : 2
   Total Devices : 2
Preferred Minor : 5

 Update Time : Tue Apr 26 11:48:35 2011
   State : clean
  Active Devices : 2
Working Devices : 2
  Failed Devices : 0
   Spare Devices : 0
Checksum : 657d7a24 - correct
  Events : 14


   Number   Major   Minor   RaidDevice State
this 0   8   170  active sync   /dev/sdb1

0 0   8   170  active sync   /dev/sdb1
1 1   8   491  active sync   /dev/sdd1


# examine the other partition/dev/sdd1:
   Magic : a92b4efc
 Version : 0.90.00
UUID : 194e7fdc:2a288e87:c03d8b24:c0120803
   Creation Time : Sat Apr 23 20:41:08 2011
  Raid Level : raid1
   Used Dev Size : 1562505856 (1490.12 GiB 1600.01 GB)
  Array Size : 1562505856 (1490.12 GiB 1600.01 GB)
Raid Devices : 2
   Total Devices : 2
Preferred Minor : 5

 Update Time : Tue Apr 26 11:48:35 2011
   State : clean
  Active Devices : 2
Working Devices : 2
  Failed Devices : 0
   Spare Devices : 0
Checksum : 657d7a46 - correct
  Events : 14


   Number   Major   Minor   RaidDevice State
this 1   8   491  active sync   /dev/sdd1

0 0   8   170  active sync   /dev/sdb1
1 1   8   491  active sync   /dev/sdd1



[root@a134-224 log]# mdadm --examine --scan
(...)
ARRAY /dev/md5 level=raid1 num-devices=2 
UUID=194e7fdc:2a288e87:c03d8b24:c0120803


[root@a134-224 log]# mdadm --stop /dev/md5
mdadm: stopped /dev/md5

[root@a134-224 log]# mdadm --assemble /dev/md5
mdadm: /dev/md5 has been started with 2 drives.

# but it cannot be mounted:

[root@a134-224 log]# mount /dev/md5 /kvbck/
mount: you must specify the filesystem type
[root@a134-224 log]# mount -t ext3 /dev/md5 /kvbck/
mount: wrong fs type, bad option, bad superblock on /dev/md5,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail  or so

[root@a134-224 log]# tail /var/log/messages
Apr 26 17:14:09 localhost kernel: md: unbind
Apr 26 17:14:09 localhost kernel: md: export_rdev(sdb1)
Apr 26 17:14:09 localhost kernel: md: unbind
Apr 26 17:14:09 localhost kernel: md: export_rdev(sdd1)
Apr 26 17:14:17 localhost kernel: md: md5 stopped.
Apr 26 17:14:17 localhost kernel: md: bind
Apr 26 17:14:17 localhost kernel: md: bind
Apr 26 17:14:17 localhost kernel: raid1: raid set md5 active with 2 out 
of 2 mirrors
Apr 26 17:14:56 localhost kernel: hfs: unable to find HFS+ superblock
Apr 26 17:15:05 localhost kernel: VFS: Can't find ext3 filesystem on dev 
md5.

# Why does the log complain about HFS+ superblock? The fs should be ext3.

- Jussi

-- 
Jussi Hirvi * Green Spot
Suvilahdenkatu 1 B 78 * 00500 Helsinki * Finland
Tel. +358 9 493 981 * Mobile +358 40 771 2098 (only sms)
jussi.hi...@greenspot.fi * http://www.greenspot.fi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Install CentOS as KVM guest

2011-04-25 Thread Jussi Hirvi
On 26.4.2011 0.47, Emmanuel Noobadmin wrote:
> I'm having problems trying to install CentOS as a KVM guest despite
> following the wikis and howtos.

I succeeded with this howto:

http://sysadminman.net/blog/2011/kvm-virtualization-text-centos-guest-install-2098

Except I skipped the lvcreate part, as I don't use LVM.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Migrating standalone systems to KVM

2011-04-24 Thread Jussi Hirvi
> On Sun, 24 Apr 2011, Jussi Hirvi wrote:
>> >  Does anyone have the .iso image of virt-p2v? It is not available anymore
>> >  through that link. The source is available, but building it requires a
>> >  *lot*  of packages, some of which seem to be hard to find.

Good idea, but I begin to be short of time... I would be grateful to 
have your copy, if you don't have any scruples about that - though the 
Clonezilla method is probably viable too.

http://pve.proxmox.com/wiki/Migration_of_servers_to_Proxmox_VE#Physical_server_to_Proxmox_VE_.28KVM.29_using_Clonezilla_Live_CDs

RJ's website says he is (was?) in the process of rewriting virt-p2v.

> I have a copy in my archive, but how about contacting Richard
> Jones, and asking him for an update or replacement?

- Jussi

-- 
Jussi Hirvi * Green Spot
Suvilahdenkatu 1 B 78 * 00500 Helsinki * Finland
Tel. +358 9 493 981 * Mobile +358 40 771 2098 (only sms)
jussi.hi...@greenspot.fi * http://www.greenspot.fi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Migrating standalone systems to KVM

2011-04-24 Thread Jussi Hirvi
> Jussi Hirvi writes:
>
>> >  A while ago I got great instructions from Pasi for migrating standalone
>> >  systems to*xen*. However, now I have decided to use KVM instead, which
>> >  raises a new question:
>> >
>> >  How to migrate a standalone system to*KVM*?
>> >
>> >  I know a two-step way to do it:
>> >standalone system ->  xen pv guest
>> >xen pv guest ->  KVM pv guest
>> >
>> >  I read that xen ->  KVM migration is trivially easy.
>> >
>> >  But is there an easier (one-step) way to do this?
>> >
>> >  - Jussi
> Hi,

On 31.3.2011 12.42, n...@li.nux.ro wrote:
> Check this out:
> http://people.redhat.com/~rjones/virt-p2v/virt-p2v.1.html

Does anyone have the .iso image of virt-p2v? It is not available anymore 
through that link. The source is available, but building it requires a 
*lot* of packages, some of which seem to be hard to find.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] KVM, virsh attach-disk error

2011-04-23 Thread Jussi Hirvi
On 23.4.2011 13.31, Kai Schaetzl wrote:
> FYI: there is a list centos-virt.

Thanks for the tip! I am going to cross-post (sorry) my current 
questions, but I still welcome answers on this list.

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] KVM, virsh attach-disk error

2011-04-23 Thread Jussi Hirvi
Now I could attach a disk to the KVM guest, using a virtio driver:

> [root@113 info]# virsh attach-disk test1 /dev/sdd1 vdb
> --driver virtio --mode shareable
 > Disk attached successfully

I have not seen any mention anywhere about using virtio drivers like this.

Here /dev/sdd is a separate disk, not used directly by either kvm host 
or guests. Before the operation, sdd1 was created with fdisk as a Linux 
partition. After the operation, I did mkfs.ext3 on the guest and then 
mounted the new filesystem.

But the Bonnie benchmark results for the KVM guest are not promising - 
they are about the same for the new external partition and for the 
guest's native filesystem.

Reads are in fact much slower on the external partition (27500 vs. 7 
k/s). (CPU load 4 vs. 12 %.)
Writes are faster (121000 vs 98000 k/s).  (CPU load 12 vs. 10 %.)

If these results are weighed with the cpu load, the differences even out.

Maybe the evennes is because the external partition is used with virtio 
drivers, same as the guest's native disk image.

So why bother? I think I will give each guest one disk image to run on, 
and that's it. Unless I find a better way to attach partitions to guests.

- Jussi

-- 
Jussi Hirvi * Green Spot
Suvilahdenkatu 1 B 78 * 00500 Helsinki * Finland
Tel. +358 9 493 981 * Mobile +358 40 771 2098 (only sms)
jussi.hi...@greenspot.fi * http://www.greenspot.fi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] can not install CentOS as VM in KVM

2011-04-23 Thread Jussi Hirvi
On 6.4.2011 15.44, Michael Zoet wrote:
> I am trying to install CentOS 5.5 as VM on a KVM server running Ubuntu
> 10.04. The Problem: the installer does not find the iso image. (Direct
> copy from website downlod.) I can start CentOS from the iso and can even
> do some disk checks. But when I go further the installer says "no CDROm
> found". Pretty weird. I tried all CentOS 5.5. image available (Live CD,
> net install, bin 1 of 8, 32 bit and 64 bit).
> Other installation (Debin, Ubuntu, SLES, Windows XP, Windows 7, Windows
> Server 2008) worked fine.
>
> Perhaps somebody can help me in setting things up for that.

Did you already solve this?

I do text-based installations with virt-install, and follow this procedure:

- if you are going to do several VM installations, then before you 
install, copy the directories you need (for example 
centos/5.6/os/x86_64/) from a CentOS mirror to /var/www/html on the host
- start httpd on the host, check in the browser that you can access the 
CentOS files

- from a CentOS mirror, download any bootable iso (netinstall cd, or 
installer cd #1 do fine) to the host
- mount the iso using "mount -o loop"

- do virt-install
- for "location", use the mounted iso
- do a "http" installation using your local http "repo" (refer to the 
host with its public ip number; 10.0.2.2 did not work for me)

- Jussi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] KVM, virsh attach-disk error

2011-04-22 Thread Jussi Hirvi
I found another post (2009, on fedora-virt list), which is relevant:

http://www.redhat.com/archives/fedora-virt/2009-December/msg00032.html

> I have a CentOS 5.4 guest x86_64.
> If I remember well
(...)
 > hot add of scsi disk should
> work if there is already a scsi disk into the guest (and if the guest
> supports it).

Well, in my system there is no scsi disk on the guest (the guest only 
sees the img on which it runs), and I don't know how I could get one 
there. :-/

- Jussi

-- 
Jussi Hirvi * Green Spot
Suvilahdenkatu 1 B 78 * 00500 Helsinki * Finland
Tel. +358 9 493 981 * Mobile +358 40 771 2098 (only sms)
jussi.hi...@greenspot.fi * http://www.greenspot.fi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] KVM, virsh attach-disk error

2011-04-22 Thread Jussi Hirvi
I try to add a fresh, unformatted disk partition to a KVM guest. I
follow the directions given here:

http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html-single/Virtualization/index.html#proc-Virtualization-Adding_storage_devices_to_guests-Adding_physical_block_devices_to_virtualized_guests

First I check that the module acpiphp is present on the guest. It is.

On the host I write:

virsh attach-disk test1 /dev/sdb1 sda --driver tap --mode shareable

- test1 is my guest domain
- /dev/sdb1 is the name of the unformatted partition on the host
- sda is what it is supposed to be called on the guest (the name is
unused on the guest)
- the example in RHEL Virtualization guide says "--mode readonly". This
does not sound right for a hard disk; hence I try "--mode shareable";
the error (see below) however is the same, whichever I use

Now, the command above produces this error. I find no google results
with this error text. Can someone tell, what causes the error?

> error: Failed to attach disk error: operation failed: adding scsi
> disk controller failed: type scsi not a hotpluggable PCI device.
> failed to add if=scsi

- Jussi

-- 
Jussi Hirvi * Green Spot
Suvilahdenkatu 1 B 78 * 00500 Helsinki * Finland
Tel. +358 9 493 981 * Mobile +358 40 771 2098 (only sms)
jussi.hi...@greenspot.fi * http://www.greenspot.fi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] KVM virt-install on disk image - "no space"

2011-04-21 Thread Jussi Hirvi
On 21.4.2011 23.17, Jussi Hirvi wrote:
> I wonder if the disk image will be of type
> qcow2. I guess I will soon find out.

Nope. Command "qemu-img info.." tells me that the image type is "raw". 
But I don't think I need any of the qcow2 specialties.

- Jussi

-- 
Jussi Hirvi * Green Spot
Suvilahdenkatu 1 B 78 * 00500 Helsinki * Finland
Tel. +358 9 493 981 * Mobile +358 40 771 2098 (only sms)
jussi.hi...@greenspot.fi * http://www.greenspot.fi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] KVM virt-install on disk image - "no space"

2011-04-21 Thread Jussi Hirvi
On 21.4.2011 19.04, Paul Heinlein wrote:
> In my experience, virt-install will create the disk image when passed
> a filename via --disk="path=/path/to/nonexistent/disk.dsk,size=15"
>
> In other words, I'd suggest skipping the disk-creation step...

Thanks Paul - it works! I wonder if the disk image will be of type 
qcow2. I guess I will soon find out.

- Jussi

-- 
Jussi Hirvi * Green Spot
Suvilahdenkatu 1 B 78 * 00500 Helsinki * Finland
Tel. +358 9 493 981 * Mobile +358 40 771 2098 (only sms)
jussi.hi...@greenspot.fi * http://www.greenspot.fi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


  1   2   3   >