Re: [CentOS] CentOS to RedHat and vice versa

2010-08-05 Thread Tom Georgoulias
On 08/05/2010 10:24 AM, Kwan Lowe wrote:
 Has anyone ever tried to mass replace installed RedHat RPMS with their
 equivalent CentOS versions or vice versa?

 I've seen posts that RHEL -  CentOS is at least possible. That is,
 take a RHEL system and get it to update via YUM and CentOS
 repositories.  I have not seen the reverse, however.

Check this out, it will point you in the right direction:

http://blog.famillecollet.com/post/2010/04/15/Switch-from-CentOS-5.4-to-RHEL-5.5

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


[CentOS] bogus bond0 device showing up in /proc/net/dev

2010-05-28 Thread Tom Georgoulias
I'm running into a situation where a bogus bonded interface named 
bond0 is being created, in addition to the desired bond2 interface. 
  Can anyone confirm this?  Anyone know why it's happening or what I do 
to get rid of it?  I wanted to start my numbering scheme at 2 instead of 
0, which I didn't think would be a problem.

As you can see, I have no reference to bond0 in any of my configs:

# grep bond /etc/modprobe.conf
alias bond2 bonding

# ifconfig -a | grep bond
bond0 Link encap:Ethernet  HWaddr 00:00:00:00:00:00
bond2 Link encap:Ethernet  HWaddr X

# cat /etc/sysconfig/network-scripts/ifcfg-bond2
DEVICE=bond2
IPADDR=X
NETMASK=
NETWORK=X
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
BONDING_OPTS=mode=1 miimon=100

# cat /etc/sysconfig/network-scripts/ifcfg-eth2
DEVICE=eth2
MASTER=bond2
SLAVE=yes
HWADDR=
ONBOOT=yes
BOOTPROTO=none
USERCTL=no

# cat /etc/sysconfig/network-scripts/ifcfg-eth3
DEVICE=eth3
MASTER=bond2
SLAVE=yes
HWADDR=XX
ONBOOT=yes
BOOTPROTO=none
USERCTL=no

The bond0 interface isn't doing any harm, as far as I can tell, except 
adding bogus data to ifconfig output and extra, useless charts in our 
system performance monitoring tools.

# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.4.0 (October 7, 2008)

Bonding Mode: load balancing (round-robin)
MII Status: down
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0

# cat /proc/net/bonding/bond2
Ethernet Channel Bonding Driver: v3.4.0 (October 7, 2008)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth2
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth2
MII Status: up
Link Failure Count: 0
Permanent HW addr: 

Slave Interface: eth3
MII Status: up
Link Failure Count: 0
Permanent HW addr: XX

Any help is appreciated.

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


[CentOS-virt] unable to get domain status from libvirt KVM

2010-03-11 Thread Tom Georgoulias
I have a python script that monitors the VMs on physical host servers 
running Xen, but the script doesn't work properly on a server I just 
built with KVM.  The script runs as a non-root user (same on all 
servers) and simply gathers some details on the status and names of the 
domains running on the host.

Both Xen and KVM servers are running the same version of libvirt 
(libvirt-0.6.3-20.1.el5_4) and have the same, default 
/etc/libvirt/libvirtd.conf config file.

To troubleshoot, I've been running python interactively.  Here's how my 
Xen servers behave:

$ python
Python 2.4.3 (#1, Sep  3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type help, copyright, credits or license for more information.
   import libvirt
   conn = libvirt.openReadOnly(None)
   domains = conn.listDomainsID()
   print domains
[0, 3, 15, 16, 21, 24, 26, 30, 32, 36, 38, 41, 43, 45, 47, 49, 51, 55, 
63, 67]
  

When I try the same thing on the KVM server:

$ python
Python 2.4.3 (#1, Sep  3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type help, copyright, credits or license for more information.
   import libvirt
   conn = libvirt.openReadOnly(None)
14:33:07.303: error : No vport operation path found for host0
14:33:07.320: error : No vport operation path found for host4
14:33:07.325: error : No vport operation path found for host3
14:33:07.367: error : No vport operation path found for host1
14:33:07.368: error : No vport operation path found for host2
   domains = conn.listDomainsID()
   print domains
[]
  

(The vport stuff is weird, but I found this posting that suggests its 
harmless 
(http://www.mail-archive.com/libvir-l...@redhat.com/msg17477.html) so 
I'm ignoring it.)

However, when logged in as root on the KVM server, it works just like my 
Xen servers:

# python
Python 2.4.3 (#1, Sep  3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type help, copyright, credits or license for more information.
   import libvirt
   conn = libvirt.openReadOnly(None)
   domains = conn.listDomainsID()
   print domains
[1]

Again, on the KVM server, plain old virsh list with the debug level 
set to 2

$ export LIBVIRT_DEBUG=2
$ virsh list
14:21:06.532: error : No vport operation path found for host0
14:21:06.550: error : No vport operation path found for host4
14:21:06.555: error : No vport operation path found for host3
14:21:06.598: error : No vport operation path found for host1
14:21:06.599: error : No vport operation path found for host2
14:21:06.615: info : No security driver available
   Id Name State
--

Permissions in /var/run/libvirt:

# ls -ld /var/run/libvirt/*
srwx-- 1 root root0 Feb  5 08:53 /var/run/libvirt/libvirt-sock
srwxrwxrwx 1 root root0 Feb  5 08:53 /var/run/libvirt/libvirt-sock-ro
drwxr-xr-x 2 root root 4096 Jan 21 14:38 /var/run/libvirt/network
drwxr-xr-x 2 root root 4096 Oct 20 18:50 /var/run/libvirt/qemu

Can someone provide some tips on what else I can check, if this might be 
a bug, or point out any mistakes that I might've made?  Any help is 
appreciated.

Thanks,
Tom
___
CentOS-virt mailing list
CentOS-virt@centos.org
http://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] unable to get domain status from libvirt KVM

2010-03-11 Thread Tom Georgoulias
On 03/11/2010 03:32 PM, Akemi Yagi wrote:
 On Thu, Mar 11, 2010 at 12:19 PM, Tom Georgoulias
 t...@mcclatchyinteractive.com  wrote:

 As test user testu:

 [te...@kvm ~]$ virsh -c qemu:///system list --all
 error: unable to connect to '/var/run/libvirt/libvirt-sock': Permission
 denied
 error: failed to connect to the hypervisor
 [te...@kvm ~]$ virsh -c qemu:///session list --all
 15:04:05.167: error : No vport operation path found for host0
 15:04:05.186: error : No vport operation path found for host4
 15:04:05.192: error : No vport operation path found for host3
 15:04:05.240: error : No vport operation path found for host1
 15:04:05.240: error : No vport operation path found for host2
   Id Name State
 --

 [te...@kvm ~]$

 Doesn't seem like a socket access issue, the perms for the
 libvirt-sock-ro are wide open.

 It says unable to connect to '/var/run/libvirt/libvirt-sock', not to
 'libvirt-sock-ro'.  Try manually changing it to look like:

 srwxrwx--- 1 root testu 0 Mar 11 15:03 libvirt-sock

 [This is how mine is configured]

But isn't that socket used for full domain management?  I'm just using a 
read-only view in the python script (conn = libvirt.openReadOnly(None) 
), which I thought was using /var/run/libvirt/libvirt-sock-ro.

Anyway, in the interest of an experiment, here's the results of changing 
group permissions to libvirt-sock:

[r...@kvm libvirt]# service libvirtd restart
Stopping libvirtd daemon:  [  OK  ]
Starting libvirtd daemon:  [  OK  ]
[r...@kvm libvirt]# ls -l
total 16
srwxrwx--- 1 root testu 0 Mar 11 15:03 libvirt-sock
srwxrwxrwx 1 root testu 0 Mar 11 15:03 libvirt-sock-ro
drwxr-xr-x 2 root root   4096 Mar  8 13:05 network
drwxr-xr-x 2 root root   4096 Mar 11 15:37 qemu

[te...@kvm ~]$ virsh -c qemu:///system list --all
  Id Name State
--
   8 changed  running
  12 changed2 running
   - changed3 shut off


Back to my script:

$ python
Python 2.4.3 (#1, Sep  3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type help, copyright, credits or license for more information.
  import libvirt
  conn = libvirt.openReadOnly(None)
15:43:38.001: error : No vport operation path found for host0
15:43:38.020: error : No vport operation path found for host4
15:43:38.026: error : No vport operation path found for host3
15:43:38.069: error : No vport operation path found for host1
15:43:38.069: error : No vport operation path found for host2
  domains = conn.listDomainsID()
  print domains
[]
 

So the virsh command works as expected, but not when I use python.

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


Re: [CentOS] unable to get domain status from libvirt KVM

2010-03-11 Thread Tom Georgoulias
On 03/10/2010 07:08 PM, Akemi Yagi wrote:

 Can someone provide some tips on what else I can check, if this might be
 a bug, or point out any mistakes that I might've made?  Any help is
 appreciated.

 Well, I am learning / testing kvm myself, so what I write might not be
 precise. But because no one seems to be responding ... :)

I appreciate the feedback.

 Look into /etc/libvirt/libvirtd.conf and check out the section UNIX
 socket access controls and make appropriate adjustment.  [ I created
 group 'libvirt' , added myself to the group, and uncommented the line
 unix_sock_group = libvirt.]  Then adjust also the permission bits
 of the directories and files in /var/run/libvirt to allow access to
 the group libvirt.

I read about that on libvirt.org but chose not to make any changes 
since the Xen server already works with the same config I have on the 
KVM server.  I understood libvirt to be a layer that lets one compatible 
tool work with many different hypervisors, so I didn't think I'd need to 
change my libvirt config to work with KVM if it already works with Xen. 
  That might be a bad assumption, though, and I'm not wedded to it.  :)

 Another hint: you will have a better chance of getting replies by
 posting to the centos-virt mailing list.

I did that and will take the discussion there.

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


[CentOS] unable to get domain status from libvirt KVM

2010-03-10 Thread Tom Georgoulias
I have a python script that monitors the VMs on physical host servers 
running Xen, but the script doesn't work properly on a server I just 
built with KVM.  The script runs as a non-root user and simply gathers 
some details on the status and names of the domains running on the host.

Both Xen and KVM servers are running the same version of libvirt 
(libvirt-0.6.3-20.1.el5_4) and have the same, default 
/etc/libvirt/libvirtd.conf config file.

To troubleshoot, I've been running python interactively.  Here's how my 
Xen servers behave:

$ python
Python 2.4.3 (#1, Sep  3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type help, copyright, credits or license for more information.
  import libvirt
  conn = libvirt.openReadOnly(None)
  domains = conn.listDomainsID()
  print domains
[0, 3, 15, 16, 21, 24, 26, 30, 32, 36, 38, 41, 43, 45, 47, 49, 51, 55, 
63, 67]
 

When I try the same thing on the KVM server:

$ python
Python 2.4.3 (#1, Sep  3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type help, copyright, credits or license for more information.
  import libvirt
  conn = libvirt.openReadOnly(None)
14:33:07.303: error : No vport operation path found for host0
14:33:07.320: error : No vport operation path found for host4
14:33:07.325: error : No vport operation path found for host3
14:33:07.367: error : No vport operation path found for host1
14:33:07.368: error : No vport operation path found for host2
  domains = conn.listDomainsID()
  print domains
[]
 

(The vport stuff is weird, but I found this posting that suggests its 
harmless 
(http://www.mail-archive.com/libvir-l...@redhat.com/msg17477.html) so 
I'm ignoring it.)

However, when logged in as root on the KVM server, it works just like my 
Xen servers:

# python
Python 2.4.3 (#1, Sep  3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type help, copyright, credits or license for more information.
  import libvirt
  conn = libvirt.openReadOnly(None)
  domains = conn.listDomainsID()
  print domains
[1]

Again, on the KVM server, plain old virsh list with the debug level 
set to 2

$ export LIBVIRT_DEBUG=2
$ virsh list
14:21:06.532: error : No vport operation path found for host0
14:21:06.550: error : No vport operation path found for host4
14:21:06.555: error : No vport operation path found for host3
14:21:06.598: error : No vport operation path found for host1
14:21:06.599: error : No vport operation path found for host2
14:21:06.615: info : No security driver available
  Id Name State
--

Permissions in /var/run/libvirt:

# ls -ld /var/run/libvirt/*
srwx-- 1 root root0 Feb  5 08:53 /var/run/libvirt/libvirt-sock
srwxrwxrwx 1 root root0 Feb  5 08:53 /var/run/libvirt/libvirt-sock-ro
drwxr-xr-x 2 root root 4096 Jan 21 14:38 /var/run/libvirt/network
drwxr-xr-x 2 root root 4096 Oct 20 18:50 /var/run/libvirt/qemu

Can someone provide some tips on what else I can check, if this might be 
a bug, or point out any mistakes that I might've made?  Any help is 
appreciated.

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


Re: [CentOS] kexec for CentOS 4?

2010-03-02 Thread Tom Georgoulias
On 03/02/2010 05:10 AM, Tony Mountifield wrote:
 I have a remote CentOS 4 machine on a network where I can't put a DHCP
 or PXE server, and I want to do a complete reinstall. So what I want to
 do is, from the currently-running system, to invoke an installation
 kernel and initrd in just the same way that GRUB would, giving it a boot
 command line that specifies a remote kickstart file, installation tree,
 and other required info.

 If not, are there any other ways to achieve what I've described?

I would use cobbler and koan for this.  Once you have a cobbler server 
setup for the kickstart (which is super easy to do), you can use koan 
with the --replace-self and -k options and do exactly what you want.

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


Re: [CentOS] kexec for CentOS 4?

2010-03-02 Thread Tom Georgoulias
On 03/02/2010 10:04 AM, Tony Mountifield wrote:
 In article4b8d1650.1060...@mcclatchyinteractive.com,
 Tom Georgouliast...@mcclatchyinteractive.com  wrote:
 On 03/02/2010 05:10 AM, Tony Mountifield wrote:
 I have a remote CentOS 4 machine on a network where I can't put a DHCP
 or PXE server, and I want to do a complete reinstall. So what I want to
 do is, from the currently-running system, to invoke an installation
 kernel and initrd in just the same way that GRUB would, giving it a boot
 command line that specifies a remote kickstart file, installation tree,
 and other required info.

 If not, are there any other ways to achieve what I've described?

 I would use cobbler and koan for this.  Once you have a cobbler server
 setup for the kickstart (which is super easy to do), you can use koan
 with the --replace-self and -k options and do exactly what you want.

 Can this be done even if I can't put the cobbler server on the same
 network as the box I want to re-install? The information I found on
 cobbler suggested to me that it was a tying together of DHCP, PXE,
 kickstart and install tree. As I understand it, the DHCP and PXE/TFTP
 servers have to be local, and also I have to have the box able to perform
 a PXE boot. So if the box in question is remote and on a network that
 I don't control or have any other boxes on, I suspect cobbler and koan
 wouldn't work.

 I could well have misunderstood - I found very little detail about koan
 apart from the command line options.

You can use cobbler and install clients without DHCP/PXE.  When you run 
koan, you pass in all of the normal kickstart options you would use to 
configure a static network interface (ip, netmask, gateway, dns, 
ksdevice, etc.).  Koan will download the kickstart config and 
initrd/vmlinuz images you need to boot up, plus add all of the grub 
entries you need to automatically get into the kickstart after a reboot. 
  On your next reboot, it will choose that entry in grub, immediately go 
into kickstart mode, and follow the config in the ks.cfg file that it 
pulled from the cobbler server.

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


Re: [CentOS] kexec for CentOS 4?

2010-03-02 Thread Tom Georgoulias
On 03/02/2010 11:20 AM, Tony Mountifield wrote:

 You can use cobbler and install clients without DHCP/PXE.  When you run
 koan, you pass in all of the normal kickstart options you would use to
 configure a static network interface (ip, netmask, gateway, dns,
 ksdevice, etc.).  Koan will download the kickstart config and
 initrd/vmlinuz images you need to boot up, plus add all of the grub
 entries you need to automatically get into the kickstart after a reboot.
On your next reboot, it will choose that entry in grub, immediately go
 into kickstart mode, and follow the config in the ks.cfg file that it
 pulled from the cobbler server.

 Cool, that makes sense - thanks! It hadn't occurred to me that I could
 add a new kernel and initrd to grub.conf with the required append line,
 and then just reboot. Obvious when you think about it!

Also, look into Joshua's reply for setting up the same thing that koan 
does up w/o the cobbler server part.  If you are just going to do this a 
single time and don't think you'd want cobbler or have something else 
for kickstarts, his advice is great.

Good luck.

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


[CentOS] /proc/mounts always shows nobarrier option for xfs, even when mounted with barrier

2010-01-21 Thread Tom Georgoulias
Ran into a confusing situation today.  When I mount an xfs filesystem on 
a server running centos 5.4 x86_64 with kernel 2.6.18-164.9.1.el5, the 
barrier/nobarrier mount option as displayed in /proc/mounts is always 
set to nobarrier

Here's an example:
[r...@host ~]# mount -o nobarrier /dev/vg1/homexfs /mnt
[r...@host ~]# grep xfs /proc/mounts
/dev/vg1/homexfs /mnt xfs rw,attr2,nobarrier,noquota 0 0
[r...@host ~]# mount | grep xfs
/dev/mapper/vg1-homexfs on /mnt type xfs (rw,nobarrier)

[r...@host ~]# mount -o barrier /dev/vg1/homexfs /mnt
[r...@host ~]# grep xfs /proc/mounts
/dev/vg1/homexfs /mnt xfs rw,attr2,nobarrier,noquota 0 0
[r...@host ~]# mount | grep xfs
/dev/mapper/vg1-homexfs on /mnt type xfs (rw,barrier)

Can anyone else confirm this behavior?

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


Re: [CentOS] /proc/mounts always shows nobarrier option for xfs, even when mounted with barrier

2010-01-21 Thread Tom Georgoulias
On 01/21/2010 04:13 PM, Ross Walker wrote:
 On Jan 21, 2010, at 4:04 PM, Tom Georgouliast...@mcclatchyinteractive.com
 wrote:

 Ran into a confusing situation today.  When I mount an xfs
 filesystem on
 a server running centos 5.4 x86_64 with kernel 2.6.18-164.9.1.el5, the
 barrier/nobarrier mount option as displayed in /proc/mounts is always
 set to nobarrier

 Can anyone else confirm this behavior?

 LVM doesn't support barriers.

Good to know, looks like I'm getting the right info from /proc/mounts 
after all.

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


Re: [CentOS] 8-15 TB storage: any recommendations?

2010-01-12 Thread Tom Georgoulias
On 01/12/2010 12:20 PM, JohnS wrote:

 On Mon, 2010-01-11 at 16:16 -0500, Tom Georgoulias wrote:

 CentOS 5.4 x86_64 works fine on the x4540s, I've installed it myself and
 didn't have to do anything special to see and use all of the disks.

 In my testing, the IO was faster and the storage easier to administer
 with when using Solaris and ZFS rather than with CentOS and software
 raid.  That kind of box is just made for ZFS.

 Interesting, was the CentOS Box Tuned in any way?

Not really, everything was just setup using the defaults.  I had a x4540 
with 48 1TB drives and tried to recreate the raidz2 setup that I had 
tested with Solaris/zfs.  I created six 6-disk RAID6 md devices, then 
added them into a single volume group and created a huge (5TB) logical 
volume with an XFS filesystem.  I tried use one disk from each 
controller in each md device (as indicated by the hdtool that sun 
provides).  I ran a variety of tests using tools like dd, iozone, 
tiobench, and sysbench and just watched how the server behaved.
 From what I could tell, the IO wasn't evenly spread across the disks in 
the md devices, just a subset.

I probably could've tweaked it some more, but I didn't have too much 
time to spend on it at the time.  The Sun Storage 7000 series servers 
were a better fit for that project anyway.

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


Re: [CentOS] 8-15 TB storage: any recommendations?

2010-01-11 Thread Tom Georgoulias
On 01/11/2010 09:42 AM, Rainer Duffner wrote:
 Am 11.01.2010 15:26, schrieb Pasi Kärkkäinen:

 X4540 uses LSI SATA controllers, that are supported.



 Indeed:

 http://www.sun.com/servers/x64/x4540/os.jsp

 5.3+ is needed.

 Of course, for a true Solaris-admin, this would be a big waste.
 ;-)
 But if you have an application that runs on Linux (but not Solaris) or
 runs much more stable on Linux, this is a viable option.

CentOS 5.4 x86_64 works fine on the x4540s, I've installed it myself and 
didn't have to do anything special to see and use all of the disks.

In my testing, the IO was faster and the storage easier to administer 
with when using Solaris and ZFS rather than with CentOS and software 
raid.  That kind of box is just made for ZFS.

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