[CentOS] Problem with cron

2014-02-23 Thread Joseph Hesse
I have a root cron job that powers down my server every day at 1am and 
6pm.  The output of '# crontab -l' is shown below.

* 1,18 * * * poweroff

Last night, after the server powered down at 6pm, I decided I wanted to 
use the server so I started it with the power button.  The server, after 
a minute or so, powered itself down.  This behaviour happened repeatedly 
until I waited past 7pm. Then the server did not poweroff.

Apparently a cron job that executed correctly at 6pm was executing 
minutes past 6pm when the server was restarted. This is totally 
unexpected behavior.

Here is the output of the cron log file.  The name of the server has 
been redacted.

# grep -i 'Feb 22' cron-20140223 | grep -i poweroff
Feb 22 18:00:01 xx CROND[2875]: (root) CMD (poweroff)
Feb 22 18:12:01 xx CROND[1894]: (root) CMD (poweroff)
Feb 22 18:16:01 xx CROND[1893]: (root) CMD (poweroff)
Feb 22 18:18:01 xx CROND[1896]: (root) CMD (poweroff)
Feb 22 18:22:01 xx CROND[1915]: (root) CMD (poweroff)
Feb 22 18:25:01 xx CROND[1919]: (root) CMD (poweroff)
Feb 22 18:34:01 xx CROND[1890]: (root) CMD (poweroff)

Is there a fix for this behavior?

Thank you,
Joe

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


Re: [CentOS] Problem with cron

2014-02-23 Thread Stephen Harris
On Sun, Feb 23, 2014 at 08:20:06AM -0600, Joseph Hesse wrote:
> I have a root cron job that powers down my server every day at 1am and 
> 6pm.  The output of '# crontab -l' is shown below.
> 
> * 1,18 * * * poweroff

Nope.  That says "every minute of hours 1 and 18".  So 0100, 0101, 0102, 0103
etc etc

You want it to read "0 1,18 * * * poweroff"

> Apparently a cron job that executed correctly at 6pm was executing 
> minutes past 6pm when the server was restarted. This is totally 
> unexpected behavior.

Totally expected.

> Is there a fix for this behavior?

Yes, user error; fix the cron job.

-- 

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


Re: [CentOS] Growing HW RAID arrays, Online

2014-02-23 Thread Nux!
On 22.02.2014 22:27, James A. Peltier wrote:
> 
> partprobe can rescan partitions, but it can't resize them.  You may
> be able to use gparted or the parted text mode to resize partitions
> online.

Sadly you can't really do this without reboot. I'd love to be wrong, 
but I hit the same problem in the past and I simply found no way of 
doing it.
Even with centos cloud instances, this operation (resize partition) has 
to be done from initramfs before the filesystems go "live".

Lucian

-- 
Sent from the Delta quadrant using Borg technology!

Nux!
www.nux.ro
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Problem with cron

2014-02-23 Thread Joseph Hesse
Thank you. Sorry, I have egg on my face.

On 02/23/2014 08:22 AM, Stephen Harris wrote:
> On Sun, Feb 23, 2014 at 08:20:06AM -0600, Joseph Hesse wrote:
>> I have a root cron job that powers down my server every day at 1am and
>> 6pm.  The output of '# crontab -l' is shown below.
>>
>> * 1,18 * * * poweroff
> Nope.  That says "every minute of hours 1 and 18".  So 0100, 0101, 0102, 0103
> etc etc
>
> You want it to read "0 1,18 * * * poweroff"
>
>> Apparently a cron job that executed correctly at 6pm was executing
>> minutes past 6pm when the server was restarted. This is totally
>> unexpected behavior.
> Totally expected.
>
>> Is there a fix for this behavior?
> Yes, user error; fix the cron job.
>

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


Re: [CentOS] Growing HW RAID arrays, Online

2014-02-23 Thread Billy Crook
On Sun, Feb 23, 2014 at 8:33 AM, Nux!  wrote:
> On 22.02.2014 22:27, James A. Peltier wrote:
>>
>> partprobe can rescan partitions, but it can't resize them.  You may
>> be able to use gparted or the parted text mode to resize partitions
>> online.
>
> Sadly you can't really do this without reboot. I'd love to be wrong,
> but I hit the same problem in the past and I simply found no way of
> doing it.
> Even with centos cloud instances, this operation (resize partition) has
> to be done from initramfs before the filesystems go "live".

So my question is 'why can't partitions be grown live like disks can?'
 I'm tempted to call this a bug.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Growing HW RAID arrays, Online

2014-02-23 Thread James A. Peltier
- Original Message -
| On Sun, Feb 23, 2014 at 8:33 AM, Nux!  wrote:
| > On 22.02.2014 22:27, James A. Peltier wrote:
| >>
| >> partprobe can rescan partitions, but it can't resize them.  You
| >> may
| >> be able to use gparted or the parted text mode to resize
| >> partitions
| >> online.
| >
| > Sadly you can't really do this without reboot. I'd love to be
| > wrong,
| > but I hit the same problem in the past and I simply found no way of
| > doing it.
| > Even with centos cloud instances, this operation (resize partition)
| > has
| > to be done from initramfs before the filesystems go "live".
| 
| So my question is 'why can't partitions be grown live like disks
| can?'
|  I'm tempted to call this a bug.

Try

  blockdev --rereadpt /dev/sdX

of course substituting /dev/sdX for the correct device.

-- 
James A. Peltier
Manager, IT Services - Research Computing Group
Simon Fraser University - Burnaby Campus
Phone   : 778-782-6573
Fax : 778-782-3045
E-Mail  : jpelt...@sfu.ca
Website : http://www.sfu.ca/itservices

"Around here, however, we don’t look backwards for very long.  We KEEP MOVING 
FORWARD, opening up new doors and doing things because we’re curious and 
curiosity keeps leading us down new paths." - Walt Disney
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos