Skip to main content

Posts

Showing posts from October, 2014

Copy Sparse files over network

I have a few physical nodes which I ran KVM guests on.  Occasionally I need to rebuild the host, so I want to copy the VM from one physical node to another.  I use RAW (sparse) disk images and standard scp would copy the image in it's entirety.  Until... I found rsync -S ;-) rsync -Surpolvv * usgtst92:/var/lib/libvirt/images/ *** SOURCE *** usgtst91 images]# for IMG in `find . -name "*.img"`; do qemu-img info $IMG; done image: ./DVGLLVUSGTST82/DVGLLVUSGTST82.img file format: raw virtual size: 44G (47244640256 bytes) disk size: 12G image: ./DVGLLVUSGTST81/DVGLLVUSGTST81.img file format: raw virtual size: 44G (47244640256 bytes) disk size: 4.0G image: ./DVGLLVUSGTST83/DVGLLVUSGTST83.img file format: raw virtual size: 44G (47244640256 bytes) disk size: 3.8G *** DESTINATION *** usgtst92 images]# for IMG in `find . -name "*.img"`; do qemu-img info $IMG; done image: ./DVGLLVUSGTST83/DVGLLVUSGTST83.img file format: raw virtual size: 44G (4724464

Add CentOS 7 and EPEL 7 to Spacewalk

At some point, most of this will be unnecessary.. I have grown fond of using the spacewalk-common-channels - however, the CentOS7 stuff is not included in Spacewalk 2.2 (as of 2014-10-26). Create a file to append to your spacewalk-common-channels.ini cat << EOF > ~/centos7-spacewalk-common-channels.ini [centos7] archs = %(_x86_archs)s name = CentOS 7 (%(arch)s) gpgkey_url = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-7 gpgkey_id = F4A80EB5 gpgkey_fingerprint = 6341 AB27 53D7 8A78 A7C2 7BB1 24C6 A8A7 F4A8 0EB5 yumrepo_url = http://mirrorlist.centos.org/?release=7&arch=%(arch)s&repo=os dist_map_release = 7 [centos7-addons] label = %(base_channel)s-addons archs = %(_x86_archs)s name = CentOS 7 Addons (%(arch)s) base_channels = centos7-%(arch)s yumrepo_url = http://mirrorlist.centos.org/?release=7&arch=%(arch)s&repo=addons [centos7-centosplus] label = %(base_channel)s-centosplus archs = %(_x86_archs)s name = CentOS 7 Plus

Rename the Satellite Admin Account

I will build a Satellite (or Spacewalk) occasionally to test some stuff... and I have forgotten (more than once) that the first time you login, you are creating the "Admin User".. which I have erroneously setup as my self. So to fix this, add another user and make them an Organization Administrator. Then... go to https:// <satellite fqdn>/rhn/admin/multiorg/Users.do and click on the check box ;-) Technically you are reassigning the Satellite Administrator role to someone else.

Crontab: the slash (/) explained

This post was taken verbatim from http://binblog.info/2014/10/17/what-does-the-slash-in-crontab-actually-do/ on (2014-10-19) I am simply "archiving" it in case that site disappears someday.  If the owner would like me to remove this content, please let me know. What does the slash in crontab(5) actually do? Filed under: UNIX & Linux — Tags: cron , crontab , linux , unix — martin @ 2:16 pm That’s a bit of a stupid question. Of course you know what the slash in crontab(5) does, everyone knows what it does. I sure know what it does, because I’ve been a UNIX and Linux guy for almost 20 years. Unfortunately, I actually didn’t until recently. The manpage for crontab(5) says the following: It’s clear to absolutely every reader that */5 * * * * in crontab means, run every 5 minutes . And this is the same for every proper divisor of 60, which there actually are a lot of: 2, 3, 4, 5, 6, 10, 12, 15, 20, 30 However, */13 * * * * does not mean th

Shellshock bash patch is only part of the solution

USSAG02.s 13039       jboss  txt       REG              253,1     903336    1180605 /bin/bash (deleted) Applications which were spawned before the update was applied and still have not been restarted, etc.. will continue to run from the /bin/bash that was in memory. I don't know what the literal impact of this - but I assume it's fairly minimal.