Re: [CentOS] httpd stopped working under SELinux so I had to turn SELinux off. libxml2.so.2: failed to map segment from shared object: Permission denied

2010-03-25 Thread A. Kirillov
> CentOS 5.4 64-bit with SELinux, happily running for over a year, suddenly
> httpd fails to start up, getting an error message like:
> 
> Starting httpd: Syntax error on line X of /etc/httpd/conf.d/php.conf:
> Cannot load /etc/httpd/modules/libphp5.so into server: libxml2.so.2:
> failed to map segment from shared object: Permission denied
> 
> I turned off SELinux and was able to start httpd.
> 
> But what went wrong?  And how to fix it and turn SELinux back on?
> 
> SElinux labels on libxml.so.2.6.26 are OK ( system_u:object_r:lib_t )
> and "restorecon -n libxml.so.2.6.26" does not return anything.
> 
> No recent AVC denied entries in /var/log/audit/audit.log or /var/log/messages.

Try to turn off the dontaudit rules for domains
that are in the base policy:

semodule -b /usr/share/selinux/targeted/enableaudit.pp

Then you might see the denials in the logs and fix the problem
in your local policy.

HTH


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


Re: [CentOS] find /etc -size -1G return only empty files

2010-03-25 Thread Nicolas Thierry-Mieg
Ala1n Sp1neu8 wrote:
> Hello
> find /etc -size -1G
>
> should return all files less than 1Giga byte in /etc, but return a
> list of empty file (size=0)
>
> find /etc -size -2G
>
> work fine and return all the files
>
> This works the same  on my fedora11 and my centos 5 !
>
> Did I miss something or is it a bug ?

not sure, but:
-1  strictly less than one, being an int that has got to be zero.
G   unit is GB.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] find /etc -size -1G return only empty files

2010-03-25 Thread Nicolas Thierry-Mieg
Nicolas Thierry-Mieg wrote:
> Ala1n Sp1neu8 wrote:
>> Hello
>> find /etc -size -1G
>>
>> should return all files less than 1Giga byte in /etc, but return a
>> list of empty file (size=0)
>>
>> find /etc -size -2G
>>
>> work fine and return all the files
>>
>> This works the same  on my fedora11 and my centos 5 !
>>
>> Did I miss something or is it a bug ?
>
> not sure, but:
> -1  strictly less than one, being an int that has got to be zero.
> G   unit is GB.

I'm sure now, a simple test confirms this.
+n : >=n, so behaves as expected
-n : http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] find /etc -size -1G return only empty files

2010-03-25 Thread Mike McCarty
Nicolas Thierry-Mieg wrote:
> Nicolas Thierry-Mieg wrote:
>> Ala1n Sp1neu8 wrote:
>>> Hello
>>> find /etc -size -1G
>>>
>>> should return all files less than 1Giga byte in /etc, but return a
>>> list of empty file (size=0)
>>>
>>> find /etc -size -2G
>>>
>>> work fine and return all the files
>>>
>>> This works the same  on my fedora11 and my centos 5 !
>>>
>>> Did I miss something or is it a bug ?
>> not sure, but:
>> -1  strictly less than one, being an int that has got to be zero.
>> G   unit is GB.
> 
> I'm sure now, a simple test confirms this.
> +n : >=n, so behaves as expected
> -n :  when you have a G behind that n.

Interesting. The man page is somewhat ambiguous on this point, but
does hint at that when it mentions that it references a number of
units, the unit being changeable, and defaults to 512 bytes.

So, then,

-size -1024M

should do what he wants, up to within 1MB blocks, but still
doesn't reference bytes. To do it exactly by the byte, one would
need
-size -1073741824b

Mike
-- 
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
Oppose globalization and One World Governments like the UN.
This message made from 100% recycled bits.
You have found the bank of Larn.
I speak only for myself, and I am unanimous in that!
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] find /etc -size -1G return only empty files

2010-03-25 Thread Nicolas Thierry-Mieg
Mike McCarty wrote:
> Nicolas Thierry-Mieg wrote:
>> Nicolas Thierry-Mieg wrote:
>>> Ala1n Sp1neu8 wrote:
 Hello
 find /etc -size -1G

 should return all files less than 1Giga byte in /etc, but return a
 list of empty file (size=0)

 find /etc -size -2G

 work fine and return all the files

 This works the same  on my fedora11 and my centos 5 !

 Did I miss something or is it a bug ?
>>> not sure, but:
>>> -1  strictly less than one, being an int that has got to be zero.
>>> G   unit is GB.
>>
>> I'm sure now, a simple test confirms this.
>> +n :>=n, so behaves as expected
>> -n :> when you have a G behind that n.
>
> Interesting. The man page is somewhat ambiguous on this point, but
> does hint at that when it mentions that it references a number of
> units, the unit being changeable, and defaults to 512 bytes.
>
> So, then,
>
>   -size -1024M
>
> should do what he wants, up to within 1MB blocks, but still
> doesn't reference bytes. To do it exactly by the byte, one would
> need
>   -size -1073741824b

nitpicking, that should be -1073741825b

and should be identical to -1025M

or just use -2G: that's "up to 1GB", should be the same
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Kickstart 8TB partition limit?

2010-03-25 Thread lhecking

 I found a kickstart installation with

part pv.10 --size=1 --grow
volgroup vol0 pv.10

 creates a partition with a size of 8TB even though more than 9TB is available.
 I need to go in manually with gdisk to destroy the partition and recreate it
 with all available space.

 No filesystem is specified be cause want to use xfs, which kickstart does not
 support out of the box. This is under 5.2, but the 5.3/5.4 relnotes do not
 indicate that this problem has been fixed. Or has it?



---
This message and any attachments may contain Cypress (or its
subsidiaries) confidential information. If it has been received
in error, please advise the sender and immediately delete this
message.
---

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


Re: [CentOS] Kickstart 8TB partition limit?

2010-03-25 Thread nate
lheck...@users.sourceforge.net wrote:

>  No filesystem is specified be cause want to use xfs, which kickstart does
> not
>  support out of the box. This is under 5.2, but the 5.3/5.4 relnotes do not
>  indicate that this problem has been fixed. Or has it?

partition manually using %pre or %post ?

nate


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


Re: [CentOS] mysql-python

2010-03-25 Thread JohnS

On Thu, 2010-03-25 at 14:14 +0800, Christopher Chan wrote:
> Is it me or does the MySQLdb module in Centos not support python's DBAPI 
> 2.0

---
Well you give no clue to the code your using.  Post what type your
using,

It uses cursors so it it is compliant as far as I see.

I get you installed it and it is dbapi 2.

What does your python code look like?

db = MySQLdb.connect (dsn='192.168.0.1:your_db',
  user='root', password='password')
##
def addEntry(names):

cursor.initialize()
cursor = db.cursor ()
###

I think a good idea would be to drop it and go to postgres, and import
pgdb.

John 

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


[CentOS] /mnt/sysimage/dev folder in rescue mode

2010-03-25 Thread Mogens Kjaer
If I boot C5 from DVD in rescue mode,
chroot to /mnt/sysimage, and try to do a
grub-install /dev/sda it will fail because
the /dev folder is empty (in the chroot environment).

Until now I've then created the missing nodes manually,
but is there a smarter way of doing this? Some devfs
that needs to be mounted on top of /dev?

Mogens
-- 
Mogens Kjaer, Carlsberg A/S, Computer Department
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Mobile: +45 22 12 53 25
Email: m...@crc.dk Homepage: http://www.crc.dk
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] /mnt/sysimage/dev folder in rescue mode

2010-03-25 Thread Nicolas Thierry-Mieg
Mogens Kjaer wrote:
> If I boot C5 from DVD in rescue mode,
> chroot to /mnt/sysimage, and try to do a
> grub-install /dev/sda it will fail because
> the /dev folder is empty (in the chroot environment).
>
> Until now I've then created the missing nodes manually,
> but is there a smarter way of doing this? Some devfs
> that needs to be mounted on top of /dev?
>

won't this work?
grub-install --root-directory=/mnt/sysimage
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] /mnt/sysimage/dev folder in rescue mode

2010-03-25 Thread Dan Burkland
> -Original Message-
> From: centos-boun...@centos.org [mailto:centos-boun...@centos.org] On
> Behalf Of Nicolas Thierry-Mieg
> Sent: Thursday, March 25, 2010 8:55 AM
> To: CentOS mailing list
> Subject: Re: [CentOS] /mnt/sysimage/dev folder in rescue mode
> 
> Mogens Kjaer wrote:
> > If I boot C5 from DVD in rescue mode,
> > chroot to /mnt/sysimage, and try to do a
> > grub-install /dev/sda it will fail because
> > the /dev folder is empty (in the chroot environment).
> >
> > Until now I've then created the missing nodes manually,
> > but is there a smarter way of doing this? Some devfs
> > that needs to be mounted on top of /dev?
> >
> 
> won't this work?
> grub-install --root-directory=/mnt/sysimage
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos

Once fully booted into the rescue environment I do the following:

a) mount /dev/sda1 /mnt/sysimage/ (replace /dev/sda1 with your root partition 
or logvol)
b) mount -o bind /dev /mnt/sysimage/dev
c) mount -o bind /sys /mnt/sysimage/sys
d) mount -o bind /proc /mnt/sysimage/proc
e) chroot /mnt/sysimage

Regards,

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


Re: [CentOS] Kickstart 8TB partition limit?

2010-03-25 Thread Jeff Hefner
hopefully this helps I have quite a few systems in the same boat.
really large volume formated as xfs for storing backup data. Here is a
simplified snippet from my kickstart files.


part pv.2 --noformat --ondisk=sdb --size=1 --grow
volgroup lg_largevol --pesize=32768 pv.2

%packages

kmod-xfs
xfsprogs
xfsdump

%post

mkdir /mnt/largevol
lvcreate -l 100%FREE -n lv_largevol lg_largevol
/sbin/mkfs.xfs /dev/lg_largevol/lv_largevol
echo "/dev/lg_largevol/lv_largevol /mnt/largevol  xfs
defaults,allocsize=256m1 2" >> /etc/fstab


On Thu, Mar 25, 2010 at 8:02 AM, nate  wrote:
>
> lheck...@users.sourceforge.net wrote:
>
> >  No filesystem is specified be cause want to use xfs, which kickstart does
> > not
> >  support out of the box. This is under 5.2, but the 5.3/5.4 relnotes do not
> >  indicate that this problem has been fixed. Or has it?
>
> partition manually using %pre or %post ?
>
> nate
>
>
> ___
> 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


Re: [CentOS] /mnt/sysimage/dev folder in rescue mode

2010-03-25 Thread Mogens Kjaer
On 03/25/2010 02:55 PM, Nicolas Thierry-Mieg wrote:
...
> won't this work?
> grub-install --root-directory=/mnt/sysimage

/sbin/grub: Not found

Mogens

-- 
Mogens Kjaer, Carlsberg A/S, Computer Department
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Mobile: +45 22 12 53 25
Email: m...@crc.dk Homepage: http://www.crc.dk
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] /mnt/sysimage/dev folder in rescue mode

2010-03-25 Thread Mogens Kjaer
On 03/25/2010 03:23 PM, Dan Burkland wrote:
...
> a) mount /dev/sda1 /mnt/sysimage/ (replace /dev/sda1 with your root partition 
> or logvol)
> b) mount -o bind /dev /mnt/sysimage/dev
> c) mount -o bind /sys /mnt/sysimage/sys
> d) mount -o bind /proc /mnt/sysimage/proc
> e) chroot /mnt/sysimage

This works for me as well: Thanks!

Mogens

-- 
Mogens Kjaer, Carlsberg A/S, Computer Department
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Mobile: +45 22 12 53 25
Email: m...@crc.dk Homepage: http://www.crc.dk
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] generate certiciate help

2010-03-25 Thread adrian kok
Hi

I try to use "cd /etc/pki/tls/certs; make sendmail.pem" or cd 
/usr/share/ssl/certs; make sendmail.pem
to make certificate 

but I don't have this path /usr/share/ssl/

I check I have openssl rpm installed

How can I do it?

Thank you




Send instant messages to your online friends http://uk.messenger.yahoo.com 
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] generate certiciate help

2010-03-25 Thread Miguel Medalha
Maybe this will help:

http://www.ibm.com/developerworks/lotus/library/ls-Certification_Authority/index.html

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


Re: [CentOS] generate certiciate help

2010-03-25 Thread m . roth
> Maybe this will help:
>
> http://www.ibm.com/developerworks/lotus/library/ls-Certification_Authority/index.html

Or maybe


   mark

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


Re: [CentOS] generate certiciate help

2010-03-25 Thread John Doe
From: adrian kok 

> I try to use "cd /etc/pki/tls/certs; make sendmail.pem" or cd 
> /usr/share/ssl/certs; make sendmail.pem
> to make certificate but I 
> don't have this path /usr/share/ssl/
> I check I have openssl rpm installed

Strange, I do have /etc/pki/tls/certs
# rpm -qf /etc/pki/tls/certs
openssl-0.9.8e-12.el5_4.1

JD


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


Re: [CentOS] generate certiciate help

2010-03-25 Thread Dan Burkland
> -Original Message-
> From: centos-boun...@centos.org [mailto:centos-boun...@centos.org] On
> Behalf Of Miguel Medalha
> Sent: Thursday, March 25, 2010 10:57 AM
> To: CentOS mailing list
> Subject: Re: [CentOS] generate certiciate help
> 
> Maybe this will help:
> 
> http://www.ibm.com/developerworks/lotus/library/ls-
> Certification_Authority/index.html
> 
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos

CentOS provides a wrapper script that allows a user to easily create their own 
CA. To create your own CA perform the following steps:

1) /etc/pki/tls/misc/CA -newca (respond to all prompts)
2) Now that your CA is created, you can now generate cert requests by 
performing the following command: /etc/pki/tls/misc/CA -newreq 
3) With the request now created, sign it by running /etc/pki/tls/misc/CA -sign

Move the newly created key & cert files to the designated directory and 
reference their location in your app configuration.

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


[CentOS] centralized user authentication

2010-03-25 Thread Steve Glasser
> Apart from ipa are there any other good tools out there for centralised user
> auth?

I am currently testing LDAP (openldap) combined with nss_ldap,
configured with authconfig.

I would start by testing IPA.  Redhat is building out a set of
enterprise management tools which include cobbler and spacewalk; I
would think IPA will eventually be integrated into their mgt tools.

That said, if you want to use Ldap + Kerberos, here are two good howtos:
http://aput.net/~jheiss/krbldap/howto.html
http://www-theorie.physik.unizh.ch/~dpotter/howto/kerberos

The "current" centos rpms for Ldap are quite old; you should consider
rebuilding the latest fedora rpms for your system.


-- 
Steve Glasser
sgla9...@gmail.com
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] centos Installation on Multiple machines

2010-03-25 Thread kalinix
On Wed, 2010-03-24 at 09:26 -0400, Tom Diehl wrote:

> On Wed, 24 Mar 2010, premr...@digilink.in wrote:
> 
> > Hi,
> >
> > I want to install customized centos on multiple systems. Can PXE boot do
> > that ?
> > Apart from this is there any other way of doing image copy of centos OS
> > and installing it on several client machines through network. I used
> > clonezilla, but after image cloning, i will again have to use the
> > clonezilla LIVE CD on client machine to do a image restore.
> >
> > I want to make a clone of centos OS and store it in a server and keeping
> > installing it on multiple machines with same hardware features from
> > network. Is this possible ?
> 
> You should look at https://fedorahosted.org/cobbler/ and kickstart. This will
> give repeatable automated installs over a variety of hardware.
> 
> Regards,
> 


Perhaps FOG [1]? Didn't use it, but it looks like the tool for your
need.

1. http://www.fogproject.org/wiki/index.php?title=FOGUserGuide#Overview



Calin

Key fingerprint = 37B8 0DA5 9B2A 8554 FB2B 4145 5DC1 15DD A3EF E857

=
The hearing ear is always found close to the speaking tongue, a custom
whereof the memory of man runneth not howsomever to the contrary, nohow.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] centralized user authentication

2010-03-25 Thread Les Mikesell
On 3/25/2010 12:04 PM, Steve Glasser wrote:
>> Apart from ipa are there any other good tools out there for centralised user
>> auth?
>
> I am currently testing LDAP (openldap) combined with nss_ldap,
> configured with authconfig.
>
> I would start by testing IPA.  Redhat is building out a set of
> enterprise management tools which include cobbler and spacewalk; I
> would think IPA will eventually be integrated into their mgt tools.
>
> That said, if you want to use Ldap + Kerberos, here are two good howtos:
> http://aput.net/~jheiss/krbldap/howto.html
> http://www-theorie.physik.unizh.ch/~dpotter/howto/kerberos
>
> The "current" centos rpms for Ldap are quite old; you should consider
> rebuilding the latest fedora rpms for your system.

Has anyone tried using the default setup in ClearOS (a disto based on 
Centos) as the LDAP server for all their other machines?

-- 
   Les Mikesell
lesmikes...@gmail.com
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] RAID 5 setup?

2010-03-25 Thread Slack-Moehrle

Can anyone provide a tutorial or advice on how to configure a software RAID 5 
from the command-line (since I did not install Gnome)?

I have 8 x 1.5tb Drives.

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


Re: [CentOS] RAID 5 setup?

2010-03-25 Thread Les Mikesell
On 3/25/2010 2:24 PM, Slack-Moehrle wrote:
>
> Can anyone provide a tutorial or advice on how to configure a software RAID 5 
> from the command-line (since I did not install Gnome)?
>
> I have 8 x 1.5tb Drives.


Make matching partitions on each disk with fdisk, setting the type to FD 
(raid autodetect), then 'mdadm create ...' to specify the options and 
start it. See the create section in 'man mdadm'. You'll need at least 
--raid-level=  --raid-devices=  --auto=yes.

Then you'll probably want to add an entry in /etc/fstab to mount the new 
md device somewhere.

-- 
   Les Mikesell
lesmikes...@gmail.com
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] RAID 5 setup?

2010-03-25 Thread Robert Heller
At Thu, 25 Mar 2010 12:24:57 -0700 (PDT) CentOS mailing list 
 wrote:

> 
> 
> Can anyone provide a tutorial or advice on how to configure a software RAID 5 
> from the command-line (since I did not install Gnome)?
> 
> I have 8 x 1.5tb Drives.

mdadm --create /dev/md0 --level=5 --raid-devices=7 /dev/sd[abcdefg]1

The above will create a level 5 RAID named /dev/md0 of /dev/sda1
/dev/sdb1 /dev/sda1 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1, with
hot-spare /dev/sdg1

Note: RAID5 is not really recomended for such large disks.  You run the
risk of a complete data loss if one disk fails and the another disk
fails during the rebuild.


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

-- 
Robert Heller -- 978-544-6933
Deepwoods Software-- Download the Model Railroad System
http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
hel...@deepsoft.com   -- http://www.deepsoft.com/ModelRailroadSystem/
   
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] RAID 5 setup?

2010-03-25 Thread James Bensley
I used this guide for my first RAID on an Ubuntu box, its very straight
forward. Its all command line based so everything here I have used in CentOS
(apart from the writer sets the RAID flag on his drives via the GParted GUI
but this can be done via terminal);

http://bfish.xaedalus.net/2006/11/software-raid-5-in-ubuntu-with-mdadm/

-- 
Regards,
James.

http://www.jamesbensley.co.cc/
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] file/data server running CentOS

2010-03-25 Thread Boris Epstein
Hi all,

I am trying to build a file server providing about 10 TB of effective
RAID5/6 storage. Any recommendations as far as hardware,
configuration, etc. - preferably based on recent experience - would be
most welcome.

Thanks in advance.

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


Re: [CentOS] RAID 5 setup?

2010-03-25 Thread Boris Epstein
On Thu, Mar 25, 2010 at 3:36 PM, Robert Heller  wrote:
> At Thu, 25 Mar 2010 12:24:57 -0700 (PDT) CentOS mailing list 
>  wrote:
>
>>
>>
>> Can anyone provide a tutorial or advice on how to configure a software RAID 
>> 5 from the command-line (since I did not install Gnome)?
>>
>> I have 8 x 1.5tb Drives.
>
> mdadm --create /dev/md0 --level=5 --raid-devices=7 /dev/sd[abcdefg]1
>
> The above will create a level 5 RAID named /dev/md0 of /dev/sda1
> /dev/sdb1 /dev/sda1 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1, with
> hot-spare /dev/sdg1
>
> Note: RAID5 is not really recomended for such large disks.  You run the
> risk of a complete data loss if one disk fails and the another disk
> fails during the rebuild.
>
>
>>
>> -Jason
>> ___
>> CentOS mailing list
>> CentOS@centos.org
>> http://lists.centos.org/mailman/listinfo/centos
>>
>>
>
> --
> Robert Heller             -- 978-544-6933
> Deepwoods Software        -- Download the Model Railroad System
> http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
> hel...@deepsoft.com       -- http://www.deepsoft.com/ModelRailroadSystem/
>
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>

Robert,

Why is the size a factor here? Why would this be OK with smaller
disks? How would you partition this instead?

Thanks.

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


Re: [CentOS] RAID 5 setup?

2010-03-25 Thread Hakan Koseoglu
On Thu, Mar 25, 2010 at 9:07 PM, Boris Epstein  wrote:
>> Note: RAID5 is not really recomended for such large disks.  You run the
>> risk of a complete data loss if one disk fails and the another disk
>> fails during the rebuild.
> Why is the size a factor here? Why would this be OK with smaller
> disks? How would you partition this instead?
As the disks get bigger, rebuild time also increases and the
performance of the disks don't increase linearly with their storage.
This means that when you are rebuilding a disk, the chances of one of
your other disks failing becomes significantly large. Most suggest
RAID6 these days as a minimum, mirroring and striping appears to be
the most popular.

-- 
Hakan (m1fcj) - http://www.hititgunesi.org
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] RAID 5 setup?

2010-03-25 Thread Rainer Duffner


Am 25.03.2010 um 22:07 schrieb Boris Epstein:





Robert,

Why is the size a factor here? Why would this be OK with smaller
disks? How would you partition this instead?

Thanks.

Boris.




This has been discussed before.

The root of the problem lies in the fact that when a disk fails, you  
have to read-out the data from the other disks to re-build the RAID.

Reads from disks have a certain probability to contain an error.
The larger the disk and the larger the array, the more probable it is  
to encounter such an error while rebuilding the RAID (and if that  
happens, you're RAID is just a piece of scrap-metal)


http://www.google.com/search?q=the+end+of+raid

RAID5 works OK-ish for a couple of 146GB SAS-disks.



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


Re: [CentOS] RAID 5 setup?

2010-03-25 Thread Boris Epstein
On Thu, Mar 25, 2010 at 5:27 PM, Hakan Koseoglu  wrote:
> On Thu, Mar 25, 2010 at 9:07 PM, Boris Epstein  wrote:
>>> Note: RAID5 is not really recomended for such large disks.  You run the
>>> risk of a complete data loss if one disk fails and the another disk
>>> fails during the rebuild.
>> Why is the size a factor here? Why would this be OK with smaller
>> disks? How would you partition this instead?
> As the disks get bigger, rebuild time also increases and the
> performance of the disks don't increase linearly with their storage.
> This means that when you are rebuilding a disk, the chances of one of
> your other disks failing becomes significantly large. Most suggest
> RAID6 these days as a minimum, mirroring and striping appears to be
> the most popular.
>
> --
> Hakan (m1fcj) - http://www.hititgunesi.org
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>

Hakan,

You surely do have a point there. However, it is still not all that
likely that a disk will fail during the rebuild time in question (what
are we talking? some hours max?)

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


Re: [CentOS] RAID 5 setup?

2010-03-25 Thread Slack-Moehrle

>As the disks get bigger, rebuild time also increases and the
>performance of the disks don't increase linearly with their storage.
>This means that when you are rebuilding a disk, the chances of one of
>your other disks failing becomes significantly large. Most suggest
>RAID6 these days as a minimum, mirroring and striping appears to be
>the most popular.

I looked up RAID6 and see the addition or a parity bit.

http://en.wikipedia.org/wiki/Standard_RAID_levels#RAID_6

RAID 10 is also something I looked at. Striped, then Mirrored

So:

8 x 1.5tb = 12tb

RAID 5 = 12tb - 1.5tb for parity data = 10.5tb space available

RAID 10 = 4 x 1.5 = 6tb - 1.5tb for parity data = 4.5tb per stripe then mirror 
it.

but with RAID 10, data is safe after many types of failures.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] RAID 5 setup?

2010-03-25 Thread Les Mikesell
On 3/25/2010 4:43 PM, Boris Epstein wrote:
> On Thu, Mar 25, 2010 at 5:27 PM, Hakan Koseoglu  wrote:
>> On Thu, Mar 25, 2010 at 9:07 PM, Boris Epstein  wrote:
 Note: RAID5 is not really recomended for such large disks.  You run the
 risk of a complete data loss if one disk fails and the another disk
 fails during the rebuild.
>>> Why is the size a factor here? Why would this be OK with smaller
>>> disks? How would you partition this instead?
>> As the disks get bigger, rebuild time also increases and the
>> performance of the disks don't increase linearly with their storage.
>> This means that when you are rebuilding a disk, the chances of one of
>> your other disks failing becomes significantly large. Most suggest
>> RAID6 these days as a minimum, mirroring and striping appears to be
>> the most popular.
>>
>
>
> You surely do have a point there. However, it is still not all that
> likely that a disk will fail during the rebuild time in question (what
> are we talking? some hours max?)

The common problem is that there are unused portions of the drives that 
go bad but are unnoticed for a long time.  Then one fails badly enough 
to get kicked out of the raid. Then when you rebuild, you have to 
reconstruct parity for even the unused parts of the drive and you hit 
previously unnoticed bad spots in the process.  I think the last Centos 
update added some sort of raid scan as a cron job that might detect bad 
spots earler, but I'm not sure what it actually does.

-- 
   Les Mikesell
lesmikes...@gmail.com
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] RAID 5 setup?

2010-03-25 Thread Robert Heller
At Thu, 25 Mar 2010 22:27:56 +0100 CentOS mailing list  
wrote:

> 
> 
> 
> 
> Am 25.03.2010 um 22:07 schrieb Boris Epstein:
> >>
> >>
> >
> > Robert,
> >
> > Why is the size a factor here? Why would this be OK with smaller
> > disks? How would you partition this instead?
> >
> > Thanks.
> >
> > Boris.
> 
> 
> 
> This has been discussed before.
> 
> The root of the problem lies in the fact that when a disk fails, you  
> have to read-out the data from the other disks to re-build the RAID.
> Reads from disks have a certain probability to contain an error.
> The larger the disk and the larger the array, the more probable it is  
> to encounter such an error while rebuilding the RAID (and if that  
> happens, you're RAID is just a piece of scrap-metal)

Or as was done recently at the Wendell Free Library, your disks become
raw materials for an after school art project... :-)

> 
> http://www.google.com/search?q=the+end+of+raid
> 
> RAID5 works OK-ish for a couple of 146GB SAS-disks.

More than a couple of disks for RAID5 -- at least 3 are needed for RAID5.

> 
> 
> 
> Rainer
> MIME-Version: 1.0
> 
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
> 
>   

-- 
Robert Heller -- 978-544-6933
Deepwoods Software-- Download the Model Railroad System
http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
hel...@deepsoft.com   -- http://www.deepsoft.com/ModelRailroadSystem/

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


Re: [CentOS] RAID 5 setup?

2010-03-25 Thread Robert Heller
At Thu, 25 Mar 2010 17:07:47 -0400 CentOS mailing list  
wrote:

> 
> On Thu, Mar 25, 2010 at 3:36 PM, Robert Heller  wrote:
> > At Thu, 25 Mar 2010 12:24:57 -0700 (PDT) CentOS mailing list 
> >  wrote:
> >
> >>
> >>
> >> Can anyone provide a tutorial or advice on how to configure a software 
> >> RAID 5 from the command-line (since I did not install Gnome)?
> >>
> >> I have 8 x 1.5tb Drives.
> >
> > mdadm --create /dev/md0 --level=5 --raid-devices=7 /dev/sd[abcdefg]1
> >
> > The above will create a level 5 RAID named /dev/md0 of /dev/sda1
> > /dev/sdb1 /dev/sda1 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1, with
> > hot-spare /dev/sdg1
> >
> > Note: RAID5 is not really recomended for such large disks.  You run the
> > risk of a complete data loss if one disk fails and the another disk
> > fails during the rebuild.
> >
> >
> >>
> >> -Jason
> >> ___
> >> CentOS mailing list
> >> CentOS@centos.org
> >> http://lists.centos.org/mailman/listinfo/centos
> >>
> >>
> >
> > --
> > Robert Heller             -- 978-544-6933
> > Deepwoods Software        -- Download the Model Railroad System
> > http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
> > hel...@deepsoft.com       -- http://www.deepsoft.com/ModelRailroadSystem/
> >
> > ___
> > CentOS mailing list
> > CentOS@centos.org
> > http://lists.centos.org/mailman/listinfo/centos
> >
> 
> Robert,
> 
> Why is the size a factor here? Why would this be OK with smaller
> disks? How would you partition this instead?

There was a thread some time back (a few weeks? Couple of months?) about
how as disk size got so much larger, the error rate hasn't really gotten
much better.  With such large disks, the number of I/O operations needed
to do a rebuild of a RAID 5 array is so large that one will be
increasingly likely to hit an error, at which point all bets are off. 
(There are some papers talking about this -- I don't have the links, but
I think they are in the list archives.)

The prefered way to go would be RAID10 (RAID1 (mirror) + RAID0 (stripe)).
Form pairs as RAID1, then strip the pairs.  With 8 disks, this would 4
pairs, 1.5TB/pair = 1.5*4 = 6TB total.

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

-- 
Robert Heller -- 978-544-6933
Deepwoods Software-- Download the Model Railroad System
http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
hel...@deepsoft.com   -- http://www.deepsoft.com/ModelRailroadSystem/

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


Re: [CentOS] RAID 5 setup?

2010-03-25 Thread John R Pierce
Boris Epstein wrote:
> You surely do have a point there. However, it is still not all that
> likely that a disk will fail during the rebuild time in question (what
> are we talking? some hours max?)
>   

8 disks is about the upper limit I'd suggest for a single raid group on 
any sort of system.

rebuilding a 8x1.5TB raid5 could easily take a full day or more will 
you have an online hotspare?  if not, then the rebuild time includes how 
long it takes you to realize there's a bad drive, procure and install 
the replacement, /AND/ the umpteen hours for the rebuild.

personally, I prefer using raid10 or 1+0 (more or less the same thing), 
and for anything above a 2 disk mirror, I prefer to use a proper 
hardware raid controller... for 8+ disks, I'd likely be looking at 
external storage arrays such as the IBM DS3000 family.


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


Re: [CentOS] RAID 5 setup?

2010-03-25 Thread John R Pierce
Slack-Moehrle wrote:
> RAID 10 = 4 x 1.5 = 6tb - 1.5tb for parity data = 4.5tb per stripe then 
> mirror it.
>   

no -1.5 on that.   you don't have parity when you are mirroring.  
8x1.5TB raid10 is simply 4*1.5 = 6TB I'd still want hot spare.  

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


Re: [CentOS] RAID 5 setup?

2010-03-25 Thread Mike McCarty
Robert Heller wrote:
> At Thu, 25 Mar 2010 22:27:56 +0100 CentOS mailing list  
> wrote:
[...]

> 
>> The root of the problem lies in the fact that when a disk fails, you  
>> have to read-out the data from the other disks to re-build the RAID.
>> Reads from disks have a certain probability to contain an error.
>> The larger the disk and the larger the array, the more probable it is  
>> to encounter such an error while rebuilding the RAID (and if that  
>> happens, you're RAID is just a piece of scrap-metal)
> 
> Or as was done recently at the Wendell Free Library, your disks become
> raw materials for an after school art project... :-)

It depends on how redundant the array is. With enough
redundancy, one can rebuild even if more than one disc
fails. RAID is essentially indistinguishable from ECC.
If the number of errors (failed reads from discs) does
not exceed the correction ability of the code used
(usualy a Reed-Solomon BCH style code) then the reconstruction
can proceed.

Mike
-- 
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
Oppose globalization and One World Governments like the UN.
This message made from 100% recycled bits.
You have found the bank of Larn.
I speak only for myself, and I am unanimous in that!
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] how to automount usb drive

2010-03-25 Thread Bazooka Joe
I have a server with no desktop - just cli that i need to have a user
plug in a usb hd and would like it to automount to a consistent
directory so I can schedule a backup.  The user can rotate the usb
drives and it all just works.

Any ideas how automate so that say /media/backup mounts to any usb
harddrive and unmounts cleanly?

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


Re: [CentOS] file/data server running CentOS

2010-03-25 Thread Joseph L. Casale
>Hi all,
>
>I am trying to build a file server providing about 10 TB of effective
>RAID5/6 storage. Any recommendations as far as hardware,
>configuration, etc. - preferably based on recent experience - would be
>most welcome.

XFS for sure, what type of controller and discs? If you go r5 over huge
discs keep in mind that while degraded, as you wait a looong time for it
to rebuild any new failure tanks the whole thing. I'd go r6 w/o a doubt.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] centralised user authentication

2010-03-25 Thread Jobst Schmalenbach

http://en.wikipedia.org/wiki/Network_Information_Service

it used to be called "yp" or "yellow pages".
it works with samba too.

jobst


On Wed, Mar 24, 2010 at 03:17:04PM +, Tom Brown (t...@ng23.net) wrote:
> Apart from ipa are there any other good tools out there for centralised user
> auth?
> 
> thanks

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


-- 
When the Pope visits a country he really likes, does he french kiss the 
ground?

  | |0| |   Jobst Schmalenbach, jo...@barrett.com.au, General Manager
  | | |0|   Barrett Consulting Group P/L & The Meditation Room P/L
  |0|0|0|   +61 3 9532 7677, POBox 277, Caulfield South, 3162, Australia
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] centos Installation on Multiple machines

2010-03-25 Thread Karanbir Singh
On 03/24/2010 02:04 PM, Bazy wrote:
> Take a look at 
> http://www.howtoforge.com/setting-up-a-pxe-install-server-for-multiple-linux-distributions-on-debian-lenny.
> You can perform the same DHCP/tftp configurations on a CentOS machine
> and deploy multiple machines over the network.


why waste your time and effort doing all this when cobbler will handle 
all these things plus a lot more for you - and its a lot easier to learn 
and work with than all the individual tools

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


Re: [CentOS] find /etc -size -1G return only empty files

2010-03-25 Thread Jobst Schmalenbach
On Thu, Mar 25, 2010 at 07:45:14AM +0100, Ala1n Sp1neu8 (aspin...@gmail.com) 
wrote:
> Hello
> find /etc -size -1G

Very interesting way of finding all files with a file size of 0 ;-)

Jobst


> 
> should return all files less than 1Giga byte in /etc, but return a
> list of empty file (size=0)
> 
> find /etc -size -2G
> 
> work fine and return all the files
> 
> This works the same  on my fedora11 and my centos 5 !
> 
> Did I miss something or is it a bug ?
> 
> Regards
> 
> -- 
> Alain Spineux |  aspineux gmail com
> Your email 100% available |  http://www.emailgency.com
> ntbackup and tar frontend sending mail report |
> http://www.magikmon.com/mkbackup/
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos

-- 
"She said she loved my mind, though by most accounts I had already lost it."

  | |0| |   Jobst Schmalenbach, jo...@barrett.com.au, General Manager
  | | |0|   Barrett Consulting Group P/L & The Meditation Room P/L
  |0|0|0|   +61 3 9532 7677, POBox 277, Caulfield South, 3162, Australia
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] how to automount usb drive

2010-03-25 Thread Jobst Schmalenbach

adjust the following to your needs

  /dev/sdd1 /mnt/usb ext3 dev,auto,nouser,rw,sync   0 0


Just be careful on boot up, I had trouble on boot when the drive 
was already connected ... it wasnt recognized. I had to put up a boot
delay onto the kernel command line to make sure the drivers
where all awake when the mounts occur.

Jobst




On Thu, Mar 25, 2010 at 03:52:29PM -0700, Bazooka Joe (fastf...@gmail.com) 
wrote:
> I have a server with no desktop - just cli that i need to have a user
> plug in a usb hd and would like it to automount to a consistent
> directory so I can schedule a backup.  The user can rotate the usb
> drives and it all just works.
> 
> Any ideas how automate so that say /media/backup mounts to any usb
> harddrive and unmounts cleanly?
> 
> -thx
> bazooka
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos

-- 
Programmer - an organism that turns coffee into software !

  | |0| |   Jobst Schmalenbach, jo...@barrett.com.au, General Manager
  | | |0|   Barrett Consulting Group P/L & The Meditation Room P/L
  |0|0|0|   +61 3 9532 7677, POBox 277, Caulfield South, 3162, Australia
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] find /etc -size -1G return only empty files

2010-03-25 Thread Les Mikesell
On 3/25/2010 6:07 PM, Jobst Schmalenbach wrote:
> On Thu, Mar 25, 2010 at 07:45:14AM +0100, Ala1n Sp1neu8 (aspin...@gmail.com) 
> wrote:
>> Hello
>> find /etc -size -1G
>
> Very interesting way of finding all files with a file size of 0 ;-)

What's interesting is that the program doesn't do the unit scale 
multiply as the first math operation. I'd call that a bug.

-- 
   Les Mikesell
lesmike...@gmail.com

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


Re: [CentOS] centralized user authentication

2010-03-25 Thread Scott Silva
on 3-25-2010 10:22 AM Les Mikesell spake the following:
> On 3/25/2010 12:04 PM, Steve Glasser wrote:
>>> Apart from ipa are there any other good tools out there for centralised user
>>> auth?
>> I am currently testing LDAP (openldap) combined with nss_ldap,
>> configured with authconfig.
>>
>> I would start by testing IPA.  Redhat is building out a set of
>> enterprise management tools which include cobbler and spacewalk; I
>> would think IPA will eventually be integrated into their mgt tools.
>>
>> That said, if you want to use Ldap + Kerberos, here are two good howtos:
>> http://aput.net/~jheiss/krbldap/howto.html
>> http://www-theorie.physik.unizh.ch/~dpotter/howto/kerberos
>>
>> The "current" centos rpms for Ldap are quite old; you should consider
>> rebuilding the latest fedora rpms for your system.
> 
> Has anyone tried using the default setup in ClearOS (a disto based on 
> Centos) as the LDAP server for all their other machines?
> 
I was just planning a deployment when my management decided they want to go to
Active Directory and move to an exchange server...



signature.asc
Description: OpenPGP digital signature
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] centos Installation on Multiple machines

2010-03-25 Thread Jobst Schmalenbach


You do not "really" need any utils to do this!
Just install it on one machine onto ONE disk, do the "yum update" plus
all the packages you need for the clones.

Then use "rsync -avH source target" to make yourself the other 
copies (using THAT disk) preferable AFTER you booted into RESCUE mode
on the target machine so you have your raid or whatever available.

You can create the partitions while you are in that mode to copy
the stuff into the correct locations or overwrite old directories.

Fix up /etc/fstab to make up for the new partitions on the 
target machine.

Reboot into rescure mode again and do a "mkinitrd PARMS" to setup
the correct boot process and use grub-install to do the same.

done, i do this all the time, new, old and upgrades.

You can do the same with upgrades. Copy the OLD machine onto ONE disk
reflecting the new fstab on THAT disk, put it into another machine
and go into rescue mode to do the "mkinitrd", reboot, boot into 
rescue mode, chroot and do the upgrade. fix up all the errors. 
down the OLD machine, rsync everything you just update across.
reboot into recue mode and do a mkintird and grub-install. done



On Wed, Mar 24, 2010 at 06:24:02PM +0530, premr...@digilink.in 
(premr...@digilink.in) wrote:
> Hi,
> 
> I want to install customized centos on multiple systems. Can PXE boot do 
> that ? 
> Apart from this is there any other way of doing image copy of centos OS 
> and installing it on several client machines through network. I used 
> clonezilla, but after image cloning, i will again have to use the 
> clonezilla LIVE CD on client machine to do a image restore.
> 
> I want to make a clone of centos OS and store it in a server and keeping 
> installing it on multiple machines with same hardware features from 
> network. Is this possible ?
> 
> Thanks, 
> Premraj M
>  
>  
> Disclaimer : This message is proprietary to Smartlink Network Systems Limited 
> and is intended solely for the use of the individual to whom it is addressed. 
> It may contain privileged or confidential information and should not be 
> circulated or used for any purpose other than for what it is intended. If you 
> have received this message in error, please notify the originator 
> immediately. If you are not the intended recipient, you are notified that you 
> are strictly prohibited from using, copying, altering, or disclosing the 
> contents of this message. Smartlink Network Systems Ltd. accepts no 
> responsibility for loss or damage arising from the use of the information 
> transmitted by this email including damage from virus.
> 
> 
> __
> 
> This email has been scrubbed for your protection by SecureMX.
> For more information visit http://securemx.in
> __
> 

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


-- 
"XP: If you are nine years old you are just going to love it.  If you're a few 
years older you'll resent the choking paternalistic atmosphere of vapid 
gee-whiz kiddie entertainment (babysitting), euphemism and fake-friendly 
bullying."

  | |0| |   Jobst Schmalenbach, jo...@barrett.com.au, General Manager
  | | |0|   Barrett Consulting Group P/L & The Meditation Room P/L
  |0|0|0|   +61 3 9532 7677, POBox 277, Caulfield South, 3162, Australia
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] find /etc -size -1G return only empty files

2010-03-25 Thread Jobst Schmalenbach

Its not a bug, its a feature ... and this is not a joke.

You [de|re]fine the search with the suffices you supply making it
possible to hand "find" a granularity mechanism that indeed makes
find a very powerful utilitiy.


Jobst
s

On Thu, Mar 25, 2010 at 06:16:40PM -0500, Les Mikesell (lesmikes...@gmail.com) 
wrote:
> On 3/25/2010 6:07 PM, Jobst Schmalenbach wrote:
> > On Thu, Mar 25, 2010 at 07:45:14AM +0100, Ala1n Sp1neu8 
> > (aspin...@gmail.com) wrote:
> >> Hello
> >> find /etc -size -1G
> >
> > Very interesting way of finding all files with a file size of 0 ;-)
> 
> What's interesting is that the program doesn't do the unit scale 
> multiply as the first math operation. I'd call that a bug.
> 
> -- 
>Les Mikesell
> lesmike...@gmail.com
> 
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos

-- 
It took the power of 3 Commodore 64's to go to the moon, but it takes a 2GHz 
Pentium 4 to run XP... Something is desperately wrong here!

  | |0| |   Jobst Schmalenbach, jo...@barrett.com.au, General Manager
  | | |0|   Barrett Consulting Group P/L & The Meditation Room P/L
  |0|0|0|   +61 3 9532 7677, POBox 277, Caulfield South, 3162, Australia
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] how to automount usb drive

2010-03-25 Thread Jobst Schmalenbach

As for the mouting (and unmouting) you're backup script needs to 
make sure the drive is UN-mounted at the end, e.g.

# flush the buffers
sync
# unmount
umount /mnt/usb



On Thu, Mar 25, 2010 at 03:52:29PM -0700, Bazooka Joe (fastf...@gmail.com) 
wrote:
> I have a server with no desktop - just cli that i need to have a user
> plug in a usb hd and would like it to automount to a consistent
> directory so I can schedule a backup.  The user can rotate the usb
> drives and it all just works.
> 
> Any ideas how automate so that say /media/backup mounts to any usb
> harddrive and unmounts cleanly?
> 
> -thx
> bazooka
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos

-- 
A computer without Microsoft is like chocolate cake without ketchup!

  | |0| |   Jobst Schmalenbach, jo...@barrett.com.au, General Manager
  | | |0|   Barrett Consulting Group P/L & The Meditation Room P/L
  |0|0|0|   +61 3 9532 7677, POBox 277, Caulfield South, 3162, Australia
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] mysql-python

2010-03-25 Thread Christopher Chan
On Thursday, March 25, 2010 09:11 PM, JohnS wrote:
>
> On Thu, 2010-03-25 at 14:14 +0800, Christopher Chan wrote:
>> Is it me or does the MySQLdb module in Centos not support python's DBAPI
>> 2.0
>
> ---
> Well you give no clue to the code your using.  Post what type your
> using,
>
> It uses cursors so it it is compliant as far as I see.
>
> I get you installed it and it is dbapi 2.
>
> What does your python code look like?

The same as everything below except for the initialize() call.


>
> db = MySQLdb.connect (dsn='192.168.0.1:your_db',
>user='root', password='password')
> ##
> def addEntry(names):
>
>  cursor.initialize()
>  cursor = db.cursor ()
> ###
>
> I think a good idea would be to drop it and go to postgres, and import
> pgdb.


I would love to were it not for the fact that one of the target clients 
runs OpenSolaris and does not package a postgresql module for python. Grr...

Thanks, I will give this another shot before I give up on learning 
python and go back to perl or php land.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] awk global replacement only after keyword

2010-03-25 Thread Joseph L. Casale
Trying to avoid a perl script which wouldn't be hard, but I am looking
for an awk one liner that does a replacement, but only after it sees a
key word on some line.

Anyone know of that's easy to do?

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


Re: [CentOS] mysql-python

2010-03-25 Thread Ray Van Dolson
On Fri, Mar 26, 2010 at 08:23:26AM +0800, Christopher Chan wrote:
> On Thursday, March 25, 2010 09:11 PM, JohnS wrote:
> >
> > On Thu, 2010-03-25 at 14:14 +0800, Christopher Chan wrote:
> >> Is it me or does the MySQLdb module in Centos not support python's DBAPI
> >> 2.0
> >
> > ---
> > Well you give no clue to the code your using.  Post what type your
> > using,
> >
> > It uses cursors so it it is compliant as far as I see.
> >
> > I get you installed it and it is dbapi 2.
> >
> > What does your python code look like?
> 
> The same as everything below except for the initialize() call.
> 
> 
> >
> > db = MySQLdb.connect (dsn='192.168.0.1:your_db',
> >user='root', password='password')
> > ##
> > def addEntry(names):
> >
> >  cursor.initialize()
> >  cursor = db.cursor ()
> > ###
> >
> > I think a good idea would be to drop it and go to postgres, and import
> > pgdb.
> 
> 
> I would love to were it not for the fact that one of the target clients 
> runs OpenSolaris and does not package a postgresql module for python. Grr...
> 
> Thanks, I will give this another shot before I give up on learning 
> python and go back to perl or php land.

db = MySQLdb.connect()
cursor = db.cursor()

cursor.execute("SELECT")
results = cursor.fetchall()

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


Re: [CentOS] RAID 5 setup?

2010-03-25 Thread Christopher Chan
On Friday, March 26, 2010 05:52 AM, Slack-Moehrle wrote:
>
>> As the disks get bigger, rebuild time also increases and the
>> performance of the disks don't increase linearly with their storage.
>> This means that when you are rebuilding a disk, the chances of one of
>> your other disks failing becomes significantly large. Most suggest
>> RAID6 these days as a minimum, mirroring and striping appears to be
>> the most popular.
>
> I looked up RAID6 and see the addition or a parity bit.
>
> http://en.wikipedia.org/wiki/Standard_RAID_levels#RAID_6

RAID6 allows you to survive failure of any two disks in the array at the 
cost of two disks of space.


>
> RAID 10 is also something I looked at. Striped, then Mirrored

They recommend that you mirror and then stripe the mirrors. But that is 
probably old school now with Neil Brown's raid10 personality. Does 
anyone do nested raid1+0 setups anymore?

>
> but with RAID 10, data is safe after many types of failures.

Except for the case when a mirror dies after which the whole thing is 
toast but in theory you can survive up to four disks going down.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] awk global replacement only after keyword

2010-03-25 Thread Craig White
On Fri, 2010-03-26 at 00:36 +, Joseph L. Casale wrote:
> Trying to avoid a perl script which wouldn't be hard, but I am looking
> for an awk one liner that does a replacement, but only after it sees a
> key word on some line.
> 
> Anyone know of that's easy to do?
> 
> Thanks!

sounds more like a reason to use sed

man sed or tell us exactly what you are trying to do

Craig


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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


Re: [CentOS] mysql-python

2010-03-25 Thread Christopher Chan
On Friday, March 26, 2010 08:52 AM, Ray Van Dolson wrote:
> On Fri, Mar 26, 2010 at 08:23:26AM +0800, Christopher Chan wrote:
>> On Thursday, March 25, 2010 09:11 PM, JohnS wrote:
>>>
>>> On Thu, 2010-03-25 at 14:14 +0800, Christopher Chan wrote:
 Is it me or does the MySQLdb module in Centos not support python's DBAPI
 2.0
>>>
>>> ---
>>> Well you give no clue to the code your using.  Post what type your
>>> using,
>>>
>>> It uses cursors so it it is compliant as far as I see.
>>>
>>> I get you installed it and it is dbapi 2.
>>>
>>> What does your python code look like?
>>
>> The same as everything below except for the initialize() call.
>>
>>
>>>
>>> db = MySQLdb.connect (dsn='192.168.0.1:your_db',
>>> user='root', password='password')
>>> ##
>>> def addEntry(names):
>>>
>>>   cursor.initialize()
>>>   cursor = db.cursor ()
>>> ###
>>>
>>> I think a good idea would be to drop it and go to postgres, and import
>>> pgdb.
>>
>>
>> I would love to were it not for the fact that one of the target clients
>> runs OpenSolaris and does not package a postgresql module for python. Grr...
>>
>> Thanks, I will give this another shot before I give up on learning
>> python and go back to perl or php land.
>
> db = MySQLdb.connect()
> cursor = db.cursor()

 >>> con=MySQLdb.connection(...)
 >>> con.ping()
 >>> curs = con.cursor()
Traceback (most recent call last):
   File "", line 1, in ?
AttributeError: cursor


>
> cursor.execute("SELECT")
> results = cursor.fetchall()

However:

 >>> con.query("SELECT SF.MOBILE FROM SF")
 >>> res=con.store_result()
 >>> res.fetch_row()

Will work.

Unless you want to tell me that things are slightly different when 
running the script and doing things interactively...
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] RAID 5 setup?

2010-03-25 Thread John R Pierce
Christopher Chan wrote:
>> but with RAID 10, data is safe after many types of failures.
>> 
>
> Except for the case when a mirror dies after which the whole thing is 
> toast but in theory you can survive up to four disks going down.
>   

if you have a 8 drive raid1+0, and a random drive fails, you can survive 
any other drive failing *except* the mirror of the failed one.   so if a 
second drive fails, there's only a 1 in 7 chance that its the 'fatal' 
one.   on a 4 drive raid10, its a 1 in 3 chance.   meanwhile, a raid10 
can rebuild from a hotspare in like an hour, if the system isn't busy, 
and a few hours in the background if its busy and active.




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


Re: [CentOS] mysql-python

2010-03-25 Thread Ray Van Dolson
On Fri, Mar 26, 2010 at 09:03:11AM +0800, Christopher Chan wrote:
> On Friday, March 26, 2010 08:52 AM, Ray Van Dolson wrote:
> > On Fri, Mar 26, 2010 at 08:23:26AM +0800, Christopher Chan wrote:
> >> On Thursday, March 25, 2010 09:11 PM, JohnS wrote:
> >>>
> >>> On Thu, 2010-03-25 at 14:14 +0800, Christopher Chan wrote:
>  Is it me or does the MySQLdb module in Centos not support python's DBAPI
>  2.0
> >>>
> >>> ---
> >>> Well you give no clue to the code your using.  Post what type your
> >>> using,
> >>>
> >>> It uses cursors so it it is compliant as far as I see.
> >>>
> >>> I get you installed it and it is dbapi 2.
> >>>
> >>> What does your python code look like?
> >>
> >> The same as everything below except for the initialize() call.
> >>
> >>
> >>>
> >>> db = MySQLdb.connect (dsn='192.168.0.1:your_db',
> >>> user='root', password='password')
> >>> ##
> >>> def addEntry(names):
> >>>
> >>>   cursor.initialize()
> >>>   cursor = db.cursor ()
> >>> ###
> >>>
> >>> I think a good idea would be to drop it and go to postgres, and import
> >>> pgdb.
> >>
> >>
> >> I would love to were it not for the fact that one of the target clients
> >> runs OpenSolaris and does not package a postgresql module for python. 
> >> Grr...
> >>
> >> Thanks, I will give this another shot before I give up on learning
> >> python and go back to perl or php land.
> >
> > db = MySQLdb.connect()
> > cursor = db.cursor()
> 
>  >>> con=MySQLdb.connection(...)
>  >>> con.ping()
>  >>> curs = con.cursor()
> Traceback (most recent call last):
>File "", line 1, in ?
> AttributeError: cursor
> 
> 
> >
> > cursor.execute("SELECT")
> > results = cursor.fetchall()
> 
> However:
> 
>  >>> con.query("SELECT SF.MOBILE FROM SF")
>  >>> res=con.store_result()
>  >>> res.fetch_row()
> 
> Will work.
> 
> Unless you want to tell me that things are slightly different when 
> running the script and doing things interactively...

Strange.  I've always done it exactly the way I shared in my code
snippet.  Have many scripts coded that way...

Where'd you get your MySQLdb module from?

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


Re: [CentOS] how to automount usb drive

2010-03-25 Thread Robert Heller
At Fri, 26 Mar 2010 10:14:59 +1100 CentOS mailing list  
wrote:

> 
> 
> adjust the following to your needs
> 
>   /dev/sdd1 /mnt/usb ext3 dev,auto,nouser,rw,sync   0 0
> 
> 
> Just be careful on boot up, I had trouble on boot when the drive 
> was already connected ... it wasnt recognized. I had to put up a boot
> delay onto the kernel command line to make sure the drivers
> where all awake when the mounts occur.

The OP might also want to label the file system and use the 'LABEL='
option instead of /dev/sd -- this will allow things to work
properly in the event that the USB drive gets mapped to a different
SCSI id for some reason (maybe someone put in a thumb drive or camera
or something).

> 
> Jobst
> 
> 
> 
> 
> On Thu, Mar 25, 2010 at 03:52:29PM -0700, Bazooka Joe (fastf...@gmail.com) 
> wrote:
> > I have a server with no desktop - just cli that i need to have a user
> > plug in a usb hd and would like it to automount to a consistent
> > directory so I can schedule a backup.  The user can rotate the usb
> > drives and it all just works.
> > 
> > Any ideas how automate so that say /media/backup mounts to any usb
> > harddrive and unmounts cleanly?
> > 
> > -thx
> > bazooka
> > ___
> > CentOS mailing list
> > CentOS@centos.org
> > http://lists.centos.org/mailman/listinfo/centos
> 

-- 
Robert Heller -- 978-544-6933
Deepwoods Software-- Download the Model Railroad System
http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
hel...@deepsoft.com   -- http://www.deepsoft.com/ModelRailroadSystem/

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


Re: [CentOS] mysql-python

2010-03-25 Thread Christopher Chan

> Where'd you get your MySQLdb module from?

yum install MySQL-python
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] RAID 5 setup?

2010-03-25 Thread Christopher Chan
On Friday, March 26, 2010 09:12 AM, John R Pierce wrote:
> Christopher Chan wrote:
>>> but with RAID 10, data is safe after many types of failures.
>>>
>>
>> Except for the case when a mirror dies after which the whole thing is
>> toast but in theory you can survive up to four disks going down.
>>
>
> if you have a 8 drive raid1+0, and a random drive fails, you can survive
> any other drive failing *except* the mirror of the failed one.   so if a

That's what I said right? I did not say when a mirror is broken...


> second drive fails, there's only a 1 in 7 chance that its the 'fatal'
> one.   on a 4 drive raid10, its a 1 in 3 chance.   meanwhile, a raid10
> can rebuild from a hotspare in like an hour, if the system isn't busy,
> and a few hours in the background if its busy and active.

yeah, I thought the raid10 module would be able to rebuild automatically 
from a hotspare and would therefore be better than using nested raid1+0. 
I better stop the nested raid1+0 thing...does ananconda support the 
raid10 module during install yet? I mean rather, is the raid10 module 
included in the installation initrd yet?
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] awk global replacement only after keyword

2010-03-25 Thread Joseph L. Casale
>sounds more like a reason to use sed
>
>man sed or tell us exactly what you are trying to do

Tell you the truth, I would much rather use sed, but I didn't think
that was doable with it.

I have a slew of txt files that contain a keyword like "service-one"
on many lines. I need to change those, but only the ones that appear
_after_ a known comment.

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


Re: [CentOS] mysql-python

2010-03-25 Thread Ray Van Dolson
On Fri, Mar 26, 2010 at 09:32:35AM +0800, Christopher Chan wrote:
> 
> > Where'd you get your MySQLdb module from?
> 
> yum install MySQL-python

Well, don't know what to tell you:

$ rpm -qi MySQL-python
Name: MySQL-python Relocations: (not relocatable)
Version : 1.2.1 Vendor: CentOS
Release : 1 Build Date: Fri 05 Jan 2007 
08:40:16 PM PST
Install Date: Thu 25 Mar 2010 06:35:52 PM PDT  Build Host: 
builder1.centos.org
Group   : Development/Libraries Source RPM: 
MySQL-python-1.2.1-1.src.rpm
Size: 283388   License: GPL
Signature   : DSA/SHA1, Tue 03 Apr 2007 05:25:09 PM PDT, Key ID a8a447dce8562897
URL : http://sourceforge.net/projects/mysql-python/
Summary : An interface to MySQL
Description :
Python interface to MySQL

MySQLdb is an interface to the popular MySQL database server for Python.
The design goals are:

- Compliance with Python database API version 2.0
- Thread-safety
- Thread-friendliness (threads will not block each other)
- Compatibility with MySQL 3.23 and up

$ python
Python 2.4.3 (#1, Sep  3 2009, 15:37:12) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
>>> conn = MySQLdb.connect(user='rayvd', passwd='XX', db='bludgeon')
>>> cursor=conn.cursor()
>>> cursor.execute("SELECT * FROM quotes LIMIT 1")
1L
>>> results = cursor.fetchone()

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


Re: [CentOS] mysql-python

2010-03-25 Thread Christopher Chan
On Friday, March 26, 2010 09:39 AM, Ray Van Dolson wrote:
> On Fri, Mar 26, 2010 at 09:32:35AM +0800, Christopher Chan wrote:
>>
>>> Where'd you get your MySQLdb module from?
>>
>> yum install MySQL-python
>
> Well, don't know what to tell you:
>
> $ rpm -qi MySQL-python
> Name: MySQL-python Relocations: (not relocatable)
> Version : 1.2.1 Vendor: CentOS
> Release : 1 Build Date: Fri 05 Jan 2007 
> 08:40:16 PM PST
> Install Date: Thu 25 Mar 2010 06:35:52 PM PDT  Build Host: 
> builder1.centos.org
> Group   : Development/Libraries Source RPM: 
> MySQL-python-1.2.1-1.src.rpm
> Size: 283388   License: GPL
> Signature   : DSA/SHA1, Tue 03 Apr 2007 05:25:09 PM PDT, Key ID 
> a8a447dce8562897

Hmm, some slight differences...

Name: MySQL-python Relocations: (not relocatable)
Version : 1.2.1 Vendor: CentOS
Release : 1 Build Date: Sat 06 Jan 2007 
12:38:14 PM HKT
Install Date: Tue 16 Mar 2010 12:24:16 PM HKT  Build Host: 
builder3.centos.org
Group   : Development/Libraries Source RPM: 
MySQL-python-1.2.1-1.src.rpm
Size: 294516   License: GPL
Signature   : DSA/SHA1, Wed 04 Apr 2007 08:25:45 AM HKT, Key ID 
a8a447dce8562897


> URL : http://sourceforge.net/projects/mysql-python/
> Summary : An interface to MySQL
> Description :
> Python interface to MySQL
>
> MySQLdb is an interface to the popular MySQL database server for Python.
> The design goals are:
>
> - Compliance with Python database API version 2.0
> - Thread-safety
> - Thread-friendliness (threads will not block each other)
> - Compatibility with MySQL 3.23 and up
>
> $ python
> Python 2.4.3 (#1, Sep  3 2009, 15:37:12)
> [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
 import MySQLdb
 conn = MySQLdb.connect(user='rayvd', passwd='XX', db='bludgeon')
 cursor=conn.cursor()
 cursor.execute("SELECT * FROM quotes LIMIT 1")
> 1L
 results = cursor.fetchone()
>

Oh brother, it looks like initialize() don't exist too...

 >>> con=MySQLdb.connection(passwd="",user="esf",db="maze_bs")
 >>> curs=con.cursor()
Traceback (most recent call last):
   File "", line 1, in ?
AttributeError: cursor
 >>> curs=con.initialize()
Traceback (most recent call last):
   File "", line 1, in ?
AttributeError: initialize
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] awk global replacement only after keyword

2010-03-25 Thread Les Mikesell
Joseph L. Casale wrote:
>> sounds more like a reason to use sed
>>
>> man sed or tell us exactly what you are trying to do
> 
> Tell you the truth, I would much rather use sed, but I didn't think
> that was doable with it.
> 
> I have a slew of txt files that contain a keyword like "service-one"
> on many lines. I need to change those, but only the ones that appear
> _after_ a known comment.

Can you use a regexp like:
s/\(known_part\)\(.*\)\(change_part\)/\1\2replace_part/

-- 
   Les Mikesell
lesmikes...@gmail.com


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


[CentOS] Rsync: how big is the traffic?

2010-03-25 Thread Fajar Priyanto
Hi guys,
Can pls help me interpret the result of this rsync? I can't tell how
much bandwidth the rsync traffic takes.
Is it "Total transferred file size" or at the bottom "sent and
received bytes"? Thank you.

**start** Fri Mar 26 10:01:01 SGT 2010
Number of files: 183773
Number of files transferred: 146
Total file size: 14709183792 bytes
Total transferred file size: 406655731 bytes
Literal data: 1765746 bytes
Matched data: 404889985 bytes
File list size: 5024820
File list generation time: 27.024 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 7050494
Total bytes received: 394481

sent 7050494 bytes  received 394481 bytes  23823.92 bytes/sec
total size is 14709183792  speedup is 1975.72
**end** Fri Mar 26 10:06:33 SGT 2010
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Rsync: how big is the traffic?

2010-03-25 Thread Joseph L. Casale
>Hi guys,
>Can pls help me interpret the result of this rsync? I can't tell how
>much bandwidth the rsync traffic takes.
>Is it "Total transferred file size" or at the bottom "sent and
>received bytes"? Thank you.

/snip

>sent 7050494 bytes  received 394481 bytes  23823.92 bytes/sec
>total size is 14709183792  speedup is 1975.72
>**end** Fri Mar 26 10:06:33 SGT 2010

It matched some data, so total bandwidth is sent+received.

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


Re: [CentOS] Rsync: how big is the traffic?

2010-03-25 Thread Stephen John Smoogen
On Thu, Mar 25, 2010 at 8:11 PM, Fajar Priyanto  wrote:
> Hi guys,
> Can pls help me interpret the result of this rsync? I can't tell how
> much bandwidth the rsync traffic takes.
> Is it "Total transferred file size" or at the bottom "sent and
> received bytes"? Thank you.
>
> **start** Fri Mar 26 10:01:01 SGT 2010
> Number of files: 183773
> Number of files transferred: 146
> Total file size: 14709183792 bytes
> Total transferred file size: 406655731 bytes
> Literal data: 1765746 bytes
> Matched data: 404889985 bytes
> File list size: 5024820
> File list generation time: 27.024 seconds
> File list transfer time: 0.000 seconds
> Total bytes sent: 7050494
> Total bytes received: 394481
>
> sent 7050494 bytes  received 394481 bytes  23823.92 bytes/sec
> total size is 14709183792  speedup is 1975.72

Total size is how much would have been transferred if you had done a
scp. The total transferred size was the send+recieved bytes.

7050494+394481
7444975
14709183792/1975.72
7444973.87888972121555686028




-- 
Stephen J Smoogen.

Ah, but a man's reach should exceed his grasp. Or what's a heaven for?
-- Robert Browning
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] mysql-python

2010-03-25 Thread Christopher Chan

>   >>>  con=MySQLdb.connection(passwd="",user="esf",db="maze_bs")

Blast, it is because I am using connection instead of connect.

Sorry for the noise.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] awk global replacement only after keyword

2010-03-25 Thread Joseph L. Casale
>Can you use a regexp like:
>s/\(known_part\)\(.*\)\(change_part\)/\1\2replace_part/

Unless I misunderstand that, I'd say no.

The actual file might look this:

/begin file

foo bar{
biz service-one
baz service-two
}

--many more of that--

# comment

fiz bir{
aaa service-one
bbb service-two
}

/end file

So only after the "# comment", I want to then start replacing.
I am just trying to replace a very ugly long set of commands piped into
each other that I am using now.

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


Re: [CentOS] awk global replacement only after keyword

2010-03-25 Thread Les Mikesell
Joseph L. Casale wrote:
>> Can you use a regexp like:
>> s/\(known_part\)\(.*\)\(change_part\)/\1\2replace_part/
> 
> Unless I misunderstand that, I'd say no.
> 
> The actual file might look this:
> 
> /begin file
> 
> foo bar{
>   biz service-one
>   baz service-two
> }
> 
> --many more of that--
> 
> # comment
> 
> fiz bir{
>   aaa service-one
>   bbb service-two
> }
> 
> /end file
> 
> So only after the "# comment", I want to then start replacing.
> I am just trying to replace a very ugly long set of commands piped into
> each other that I am using now.

I think there is a way to do it in sed using the holding space, but it's so 
much 
easier in perl that I never bothered to learn the hard parts.  What's the 
problem with using perl anyway?

-- 
   Les Mikesell
lesmikes...@gmail.com

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


Re: [CentOS] awk global replacement only after keyword

2010-03-25 Thread Joseph L. Casale
>I think there is a way to do it in sed using the holding space, but it's so 
>much 
>easier in perl that I never bothered to learn the hard parts.  What's the 
>problem with using perl anyway?

No problem, just thought there was a sexier way to do it then my ugly way. The
Perl solution would be just as long if it were a one liner, so I'll just shove
it into a shell script I guess.

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


[CentOS] Allow fedora client to map centos server drive

2010-03-25 Thread Jeff Sadino
Hello,
I am running Fedora 8 on a client machine and I have a CentOS4 "server." How
do I mount a server drive on my local machine? I have already looked in
hosts.allow, /etc/exports, and tried all sorts of nfs permutations. The
server ip is 10.1.1.13 and my local is 10.1.1.117
Thank you VERY much!

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


[CentOS] ==> gcc 4.4.3 on centos 64 bit

2010-03-25 Thread Dieter Best
Hello,

I need a newer version of gcc (gcc 4.4.3), with yum install I got
4.1.2. Has anyone figured out how to configure for the gcc 4.4.3 build
to go through?

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


Re: [CentOS] awk global replacement only after keyword

2010-03-25 Thread MHR
On Thu, Mar 25, 2010 at 5:36 PM, Joseph L. Casale
 wrote:
> Trying to avoid a perl script which wouldn't be hard, but I am looking
> for an awk one liner that does a replacement, but only after it sees a
> key word on some line.
>
> Anyone know of that's easy to do?
>

Depends on how you define "one-liner."  Something like this might work:

{ if index($0, PATTERN) != 0 {FOUND = 1;}; if (FOUND != 0)
{subst(REPLACE_THIS, WITH_THIS, $0); }

You'd want to reverse the order of the two statements if the
replacement is only to occur after the pattern is found.

Now, if you want to process multiple files, you'd have to reset the
found flag when the filename changes, and that's another if-else
clause, which gets kind of long for a "one liner."

It's ugly, but it's awk

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


Re: [CentOS] Rsync: how big is the traffic?

2010-03-25 Thread Jobst Schmalenbach
> sent 7050494 bytes  received 394481 bytes  23823.92 bytes/sec


bandwidth actually is b/s, so your bandwidth is 23823.92 bytes/sec
as shown in the output from rsync.

As for the total file size you have uploaded or downloaded
this can very much differ from the actual file size on the system
because rsync compresses the data while in transfer.

On top of all this rsync uses up bandwidth for itself for
the administration for the process. So if you do not compress
you will have more data transfered simply because rsync needs
to find out about the files on both ends, further it needs to
create dirs etc.

so the total that was actuallty send an received is the sum
of both items above.


jobst

On Fri, Mar 26, 2010 at 10:11:31AM +0800, Fajar Priyanto (fajar...@arinet.org) 
wrote:
> Hi guys,
> Can pls help me interpret the result of this rsync? I can't tell how
> much bandwidth the rsync traffic takes.
> Is it "Total transferred file size" or at the bottom "sent and
> received bytes"? Thank you.
> 
> **start** Fri Mar 26 10:01:01 SGT 2010
> Number of files: 183773
> Number of files transferred: 146
> Total file size: 14709183792 bytes
> Total transferred file size: 406655731 bytes
> Literal data: 1765746 bytes
> Matched data: 404889985 bytes
> File list size: 5024820
> File list generation time: 27.024 seconds
> File list transfer time: 0.000 seconds
> Total bytes sent: 7050494
> Total bytes received: 394481
> 
> sent 7050494 bytes  received 394481 bytes  23823.92 bytes/sec
> total size is 14709183792  speedup is 1975.72
> **end** Fri Mar 26 10:06:33 SGT 2010
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos

-- 
In the choice between changing one's mind and proving there's no need to do so, 
most people get busy on the proof -- John Kenneth Galbraith, economist 
(1909-2006)

  | |0| |   Jobst Schmalenbach, jo...@barrett.com.au, General Manager
  | | |0|   Barrett Consulting Group P/L & The Meditation Room P/L
  |0|0|0|   +61 3 9532 7677, POBox 277, Caulfield South, 3162, Australia
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] awk global replacement only after keyword

2010-03-25 Thread Joseph L. Casale
>Depends on how you define "one-liner."  Something like this might work:
>
>{ if index($0, PATTERN) != 0 {FOUND = 1;}; if (FOUND != 0)
>{subst(REPLACE_THIS, WITH_THIS, $0); }
>
>You'd want to reverse the order of the two statements if the
>replacement is only to occur after the pattern is found.

Cool, I'll give it a whirl tomorrow! I do want to replace all
occurrences only after the keyword
Thanks,
jlc
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] awk global replacement only after keyword

2010-03-25 Thread Kahlil Hodgson
On 03/26/2010 02:02 PM, Joseph L. Casale wrote:
>> I think there is a way to do it in sed using the holding space, but it's so 
>> much 
>> easier in perl that I never bothered to learn the hard parts.  What's the 
>> problem with using perl anyway?
> 
> No problem, just thought there was a sexier way to do it then my ugly way. The
> Perl solution would be just as long if it were a one liner, so I'll just shove
> it into a shell script I guess.

i you're worried about slurping the whole file

perl -pe '/# comment/ and $c=1; $c and s/service-one/foo-bar/g' \
  test_file.txt

works for me

slurping the whole files and replacing inline (with backups) you could do

perl -i.save -0777 -pe \
's/(# comment)(.*)(service-one)/$1$2 foobar/msg' file1 file2 ...

K
-- 
Kahlil (Kal) Hodgson   GPG: C37B01F4
Head of Technology (m) +61 (0) 4 2573 0382
DealMax Pty Ltd(w) +61 (0) 3 9008 5281

Suite 1005
401 Docklands Drive
Docklands VIC 3008 Australia

"All parts should go together without forcing.  You must remember that
the parts you are reassembling were disassembled by you.  Therefore,
if you can't get them together again, there must be a reason.  By all
means, do not use a hammer."  -- IBM maintenance manual, 1925

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


Re: [CentOS] centos Installation on Multiple machines

2010-03-25 Thread Ian Forde
On Wed, 2010-03-24 at 09:26 -0400, Tom Diehl wrote:
> On Wed, 24 Mar 2010, premr...@digilink.in wrote:
> 
> > Hi,
> >
> > I want to install customized centos on multiple systems. Can PXE boot do
> > that ?
> > Apart from this is there any other way of doing image copy of centos OS
> > and installing it on several client machines through network. I used
> > clonezilla, but after image cloning, i will again have to use the
> > clonezilla LIVE CD on client machine to do a image restore.
> >
> > I want to make a clone of centos OS and store it in a server and keeping
> > installing it on multiple machines with same hardware features from
> > network. Is this possible ?
> 
> You should look at https://fedorahosted.org/cobbler/ and kickstart. This will
> give repeatable automated installs over a variety of hardware.
> 
> Regards,
> 

Or, you can look at System Imager.  Designed just for that purpose.  Do
an image copy, then deploy on several machines on the network...

http://wiki.systemimager.org/index.php/Main_Page

-I

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