Skip to main content

Posts

Showing posts from August, 2014

Display OracleASM Headers

 So.... I am up at 3AM troubleshooting an "issue" that mysteriously appeared when our DBAs restart CRS/ASM/WTH earlier during some maintenance.  Apparently ASM was unable to find 3 devices. In this example 0c32 is a known-good and 0c33 is a suspected-bad. dd if=/dev/mpath/ITSHDS06_0c35p1 bs=8 skip=13 count=4 2>/dev/null|strings TT6SMS_DATA01 [root@smsdba01 mapper]# dd if=/dev/mpath/ITSHDS06_0c32p1 bs=8 skip=13 count=6 2>/dev/null|strings TT6SMS_DATA01 TT6SMS_DATAASM31 [root@smsdba01 mapper]# /etc/init.d/oracleasm querydisk /dev/mpath/ITSHDS06_0c32p1 Device "/dev/mpath/ITSHDS06_0c32p1" is marked an ASM disk with the label "TT6SMS_DATAASM31"   [root@ttgllpsmsdba01 mapper]# dd if=/dev/mpath/ITSHDS06_0c33p1 bs=8 skip=13 count=6 2>/dev/null|strings TT6SMS_DATA01 TT6SMS_DATAASM32 [root@ttgllpsmsdba01 mapper]#  /etc/init.d/oracleasm querydisk /dev/mpath/ITSHDS06_0c33p1 Device "/dev/mpath/ITSHDS06_0c33p1" defines a device with no labe...

Kickstart with UEFI and PXE (and BIOS too)

I'm still learning some of the nuances of how UEFI has changed the game a bit... but, this should get you going in the right direction. Summary : It appears that if you boot using BIOS and /pxelinux.0 - it expects a pxelinux.cfg/default (or a file based on IP or MAC) and boot using /BOOTX64.efi - it expects /efidefault Also - the syntax appears to vary between default (BIOS) and efidefault (UEFI).  At this point I am unsure if the differences I noticed are necessary though.  Details : So - I'm not going to delve in to a lot of details about the BIOS/PXE kickstart, nor how to install packages.  I also won't cover much about creating an actual kickstart file.  There are plenty of other sites that do a much better job explaining it than I ever could.  Also - my configuration supports the rest of my home network (not just my lab), so you may find some configuration settings are not absolutely necessary for this task - but should not hurt. # Install the ...

Map Raw Disk Devices KVM

 I'm trying to test some KVM guest clustering w/GFS using iSCSI for the Shared Device. I don't know if any of this plan will work.. but.. I did manage to figure out how to map the device directly to the guest.     <disk type='block' device='lun' sgio='unfiltered'>       <driver name='qemu' type='raw' cache='none'/>       <source dev='/dev/disk/by-path/ip-192.168.0.140:3260-iscsi-iqn.2014-08.private.matrix.rhel6a:target1-lun-1'/>       <target dev='vdb' bus='scsi'/>       <address type='drive' controller='4' bus='0' target='0' unit='0'/>     </disk> Or.. using Multipath... (this doesn't seem to work, but I think the issue is with my VM, not this solution...)     <disk type='block' device='lun' sgio='unfiltered'>       <driver name='qemu' type='raw' cache='n...

Performance Analysis

Preface:  At any given point, this ENTIRE page will be a work-in-progress... if you happen upon this page, you are likely fighting some fire and researching how to figure out what is causing your grief.  I doubt this page will help (or not until I have done quite a bit of research). dstat - versatile tool for generating system resource statistics strace - trace system calls and signals iotop - simple top-like I/O monitor iostat  - Report Central Processing Unit (CPU) statistics and input/output statistics for devices, partitions and network filesystems (NFS). vmstat - Report virtual memory statistics iotop - simple top-like I/O monitor nfsstat - list NFS statistics ps - report a snapshot of the current processes. collectl /proc /sys splat gnuplot mrtg?

Add encryption key to device after installation

I started to use encryption on my drives during installation (and also with external drives).  As ironic as this sounds:  I'm sick of entering my encryption pass-phrase every time I boot my laptop.  Even though what I am about to do is *less* secure, I still think it makes my machine pretty damn secure yet. I am preventing someone from stealing my laptop and pulling the drive to get my data.  Yes, the machine boots - which means they either have to brute-force a login at the console, or hack a service once the machine is up.  At that point, they almost deserve my "sensitive data"... Anyhow - if you would like to use encryption on your OS drive, but do not want to enter a passphrase, do the following: dd if=/dev/urandom of=/root/.keyfile bs=32 count=1 chmod 0600 /root/.keyfile cryptsetup luksAddKey /dev/sda4 /root/.keyfile sed -i -e 's/none/\/root\/.keyfile/g' /etc/crypttab dracut --force --install /root/.keyfile /boot/initramfs-`uname -r`.img # SPECI...

Offline content for non-standard packages (Satellite, Repo, etc..)

EDIT:  This explains how you could have offline content of specific packages. You could potentially do the following: * retrieve the repo file for the files you want to retrieve * place the repo file in /etc/yum.repos.d/ and make sure enabled=0 (otherwise your host will try to use that repo for updates) * create an excludepkgs and includepkgs directive in your repo file * run reposync and identify the repo you just created * bonus: you could run createrepo (which would create the repomd.xml file and all) * place the entire repo on some media that you can attach to your server Repo File (I use this to ONLY grab a few asm files - not the entire repo - hence the include/exclude) /etc/yum.repos.d/oracle.repo ~~~ [ol6_latest] name=Oracle Linux 6 Latest (x86_64) baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/ gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6 gpgcheck=1 enabled=0 exclude = *xen* includepkgs = oracleasm*el6.x86_64 oracle-validated-* ora...