Openstack – new volume

I have managed to create my first server in an openstack enviroment here at university of Bergen.

I can see my instance in the Dashboard:

openstack-dashboard-instances

Next thing was to add a volume:

Project -> Compute -> Volumes: Create Volume

After creating it, I had to go to “Manage Attachments”, and in Manage Volumen Attachments, I selected my “diverse” instance.

I had to use fdisk to format the new volume:

fdisk -l
fdisk /dev/vdb

Hint: m for help, n for new partition, w for write table to disk.

Finally, format and mount:

mkfs.xfs /dev/vdb
mount /dev/vdb /data

[root@diverse lib]# df -kh
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 10G 8.1G 1.9G 81% /
devtmpfs 900M 0 900M 0% /dev
tmpfs 920M 0 920M 0% /dev/shm
tmpfs 920M 17M 904M 2% /run
tmpfs 920M 0 920M 0% /sys/fs/cgroup
tmpfs 184M 0 184M 0% /run/user/1000
/dev/vdb 50G 33M 50G 1% /data

 

Match email address

If you have a file with several lines that contains email addresses that you like to extract, you can do that with Linux grep command:

File “emails.txt”:

somestreng anotherstring 342345 somename.lastname@domain.com

where somename.lastname@domain.com is the string you like to extract:

you can do this with:

grep -EiEio '\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b' emails.txt

Result:

somename.lastname@domain.com

git-cola in Windows 7

I have Windows 7 on my computer, but needed to run a git gui tool for our project. Searching on Google I found several, but they all were software for Linux. We have plenty of Linux Redhat servers, but no one running X window.

I installed then a Xming X server (http://sourceforge.net/projects/xming/) on my Windows 7 computer, and by configuring Putty (also a Windows program) and the sshd_config on the Linux server I could run git-cola and other Linux software in my Windows enviroment:

git-cola3

Putty configuration:

Connection -> SSH -> X11:

Enable X11 forwarding = true

X display location: location:0.0

 

Linux Redhat server configuration:

 

Also I noticed if I changed to another user in Putty (SSH) with:

sudo su –

then I wouldn’t be able to forward any X program. So, just after loggin in to the server in Putty with SSH, I had to start the program right away:

 

 

References: