zeldor.biz

Linux, programming and more

Copyright © 2025
Log in

Usermod command

March 22, 2011 by Igor Drobot Leave a Comment

Manpages are great!
Disable ssh login:

1
usermod -s /bin/false username

usermod -s /bin/false username

Change home directory:

1
usermod -d /home/users/newpath/ username

usermod -d /home/users/newpath/ username

Filed Under: Bash, Debian, Linux Tagged With: usermod change home, usermod change shell

KVM manage virtual machines with virsh

March 16, 2011 by Igor Drobot Leave a Comment

Virsh is the main interface for managing virsh guest domains. The program can be used to create, pause, and shutdown domains.

Some of this commands may be helpful if you have no chance to run virt-manager.

Show guest information:

Show a list of all running guests: virsh list
Show a list of all available guests: virsh list –all
Show a guest’s info: virsh dominfo GUEST_NAME
[Read more…]

Filed Under: Linux Tagged With: KVM, qemu, virsh

Ubuntu: freenx server installation

March 16, 2011 by Igor Drobot Leave a Comment

Next Generation Remote Display – NX is an exciting new technology for remote display. It provides near local speed application responsiveness over high latency, low bandwidth links.

Was tested on Ubuntu 10.10 Codenamed “Maverick Meerkat”. Works on Debian 6 too;)

Edit your source list or create a new one:

1
vim /etc/apt/sources.list.d/freenx.list

vim /etc/apt/sources.list.d/freenx.list

[Read more…]

Filed Under: Debian, Linux, Ubuntu Tagged With: freenx, Nomachine, nx-server

Pacemaker: fix timeout warnings

March 15, 2011 by Igor Drobot 3 Comments

Sometimes if you add a new resource or change something in your cluster configuration you get some warnings like this one.

Or if you run a configuration syntax check:

1
root@node1:~# crm configure verify

root@node1:~# crm configure verify

1
2
3
4
5
6
7
crm(live)configure# verify 
WARNING: mount_srv: default timeout 20s for start is smaller than the advised 60
WARNING: mount_srv: default timeout 20s for stop is smaller than the advised 60
WARNING: drbd_r0: default timeout 20s for start is smaller than the advised 240
WARNING: drbd_r0: default timeout 20s for stop is smaller than the advised 100
WARNING: pingnet: default timeout 20s for start is smaller than the advised 60
WARNING: pingnet: default timeout 20s for monitor_0 is smaller than the advised 60

crm(live)configure# verify WARNING: mount_srv: default timeout 20s for start is smaller than the advised 60 WARNING: mount_srv: default timeout 20s for stop is smaller than the advised 60 WARNING: drbd_r0: default timeout 20s for start is smaller than the advised 240 WARNING: drbd_r0: default timeout 20s for stop is smaller than the advised 100 WARNING: pingnet: default timeout 20s for start is smaller than the advised 60 WARNING: pingnet: default timeout 20s for monitor_0 is smaller than the advised 60

Solution: define new operations, use the same times 240s and 100s
op start interval=”0″ timeout=”240s”
op stop interval=”0″ timeout=”100s”

Config snippet:

1
2
3
4
5
primitive drbd_r0 ocf:linbit:drbd \
        params drbd_resource="drbd0" \
        op monitor interval="120s" \
        op start interval="0" timeout="240s" \
        op stop interval="0" timeout="100s"

primitive drbd_r0 ocf:linbit:drbd \ params drbd_resource="drbd0" \ op monitor interval="120s" \ op start interval="0" timeout="240s" \ op stop interval="0" timeout="100s"

Really dirty fix (set global timeouts):

1
crm configure property default-action-timeout="240"

crm configure property default-action-timeout="240"

Filed Under: Linux Tagged With: Corosync, corosync WARNING, crm, default timeout, Pacemaker

DRBD set sync speed

March 15, 2011 by Igor Drobot 1 Comment

The default sync rate is normally defined in your drbd configuration (mostly /etc/drbd.conf)

1
2
3
syncer {
    rate 100M; 
}

syncer { rate 100M; }

If you are setting up a virtual machine on drbd cluster you need to produce more I/O and your physical machines are under heavy load. You can stop some services or you can reduce the sync rate.

Set temporary sync rate:
You need to issue this command only on one of your nodes!

1
root@drbd-node1:~# drbdsetup /dev/drbd0 syncer -r 10M

root@drbd-node1:~# drbdsetup /dev/drbd0 syncer -r 10M

Enjoy the easy solution;)

Filed Under: Debian, Linux Tagged With: DRBD, drbd speed, drbd syncer

  • « Previous Page
  • 1
  • …
  • 35
  • 36
  • 37
  • 38
  • 39
  • …
  • 62
  • Next Page »
Yeaaah Cookie! We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok