How to create a new OpenShift Origin user?

Basic Auth is used by default by the OpenShift Origin. So to create a new user account using the below command:

#htpasswd /etc/openshift/htpasswd username

Environment:

  • OpenShift V2
  • Centos 6 – 64Bits

Reference:

http://docs.openshift.org/origin-m4/oo_deployment_guide_comprehensive.html#configure-an-authentication-plugin

LVM – How to migrate data between disks?

Environment:

Red Hat Enterprise Linux Server 6.0

Case:

You have a server connected in storage A and need migrate the data to new storage B.

How to migrate data between disks with the server online?

In this article I will explain how migration of data between the disks, without unavailability, remember that in our example we’re using LVM.

This article assumes that the new disk has been installed on the system and is visible to the operating system as /dev/sdb.

Create a new partition of type LVM in new disk:

Create a new PV:

# pvcreate /dev/sdb1

Add the new PV to VG:

# vgextend VG_NAME /dev/sdb1

Move data between disks with command:

# pvmove -v /dev/sda1

The command pvmove will move data from disk sda1 to sdb1:

Check if the PV was released with command:

# pvs

Now remove the old disk from the VG with command:

# vgreduce -a

The option -a remove from VG all the PV free. In our exemple the disk sda1.

Now the disk can be removed from the server.