No, I’m not describing anyone’s personality, least of all my own :-)

I should title this series “An Oracle person’s experiences as a Linux SA”….

From my earlier posting, you all know that I like xterms with dark backgrounds and white foregrounds.  I’ve always liked typing that way — probably from my old terminal days.  I gave up on trying to make MS Word (You can do white on blue, albeit it’s a very bright blue) do that — and anyway word processing is different than a terminal to me any day.

Of course, Linux likes to colorize directory listings — and I can’t see the dark, dark blue of directory entries against my black background.  So, on to figuring out why it’s doing that and to make it stop…

LS_OPTIONS looks like it will do the trick, so I set it to –color=none and export it into my environment.  No luck.  Maybe it needs to be set in my login shell, and since it’s my machine and I think everyone should turn it off, I edit /etc/profile and set it there.  Logout / login — still no luck.

Maybe ls is aliased?  Yep — I run “alias ls” and I see that it is.  Since I don’t have an alias file I wonder where global aliases are set.  Maybe /etc/alias or /etc/aliases?  No, no such file exists.

Go back and look at /etc/profile — at the end of the file it goes to /etc/profile.d and runs every .sh file in that directory — odd.  One of those is which of course sets a whole bunch of aliases for ls.  So I rename to, re-login and poof!  No more colors.

I don’t like aliasing commands — leads  to confusion.  About the only commands I alias are cd and vi (points to vim nowadays….).

Edit: I’ve since learned that LS_OPTIONS doesn’t do anything anyway — ls doesn’t look at it.  It’s only used when aliasing ls… (rolls eyes).

Xen VM Cloning

Ok, now on to the cool stuff.  From my earlier post, you may be aware that I have a machine grant (or, to put it another way, domain0) — with 2 Xen VMs (sherman and mcpherson).  Actually, sherman and mcpherson are more like placeholders for VMs — I want to be able to test out different configurations in each one, re-using the same IP address.  So I’ve actually got sherman01 and mcpherson01.  Today I wondered how hard it would be to create sherman02 or simply clone sherman01.  It turned out to be dead simple:

  1. Go to /etc/xen and copy the sherman01 config file to sherman02
  2. Edit the sherman02 config file replacing all references to sherman01 with sherman02
  3. Since I’m using file-backed VMs, copy the files representing the disks for sherman01 to sherman02 equivalents and make sure the config file references them
  4. Shutdown sherman01
  5. Start sherman02

Worked like a charm.


WHEN OTHERS THEN NULL; has a new friend…

Adding Disk to my Xen VMs

Ok, I added some space to one Xen VM this morning.  Wasn’t too bad, although there are so many ways to do this in Linux.  I wanted to do something simple.  Create a file on the host O/S (grant), attach it to the VM (sherman) and then just add it into the filesystem.  I was surprised at the number of commands I had to run, but they all made sense:

  1. Use dd to create a file on grant that will become a new disk on sherman
  2. Shutdown sherman using xm shutdown
  3. Edit the sherman configuration file under /etc/xen to add the new file as another disk (took me a minute to remember the disk naming conventions)
  4. Re-start (“re-create”) sherman so that it recognizes the disk
  5. Use fdisk to partition the disk on sherman using a primary partition and changing the type to 8e so that the Linux LVM can manage it (Look at all the types!)
  6. Use pvcreate to create a new physical volume on the device partition
  7. Use vgscan to look at the volume groups
  8. Use vgdisplay to display the current volume group
  9. Use vgextend to add the new physical volume to the volume group
  10. Use lvscan to verify the addition
  11. Use lvextend to extend the logical volume onto the newly added space
  12. Use resize2fs to extend the filesystem to the newly extended logical volume space


Many thanks to the following:

  1. Re: Adding more space to the system without using LVM in the host
  2. Extend Your MythDora Video Partition using LVM
  3. Extending a logical volume

The little things…

Do you ever get hung up on the little things while trying to get big things done?  Sometimes I do — I often find that by understanding little things, you get some perspective on the big things.

Anyway, today I wanted to work on my servers and I was getting tired of going into the cold lab and sitting at the console.  I like using xterms, so I fired up my Cygwin/X environment to get some xterms up.  One problem — no xterm menu option on the Start menu.  So?  Shouldn’t be hard just to add the shortcut — but no.  Lots of errors about missing .dll’s and such-not.  The easy solution was to install the X-start-menu-icons package — but it took me a while to realize I hadn’t selected that during my initial install…

Ok.   I get my xterms.  I fiddle with the colors in cygwin\etc\X11\app-defaults\XTerm to get nice white letters on a black background, along with a scrollbar and some decent sized fonts (couldn’t remember if I was supposed to use .Xresources or .Xdefaults — so went with the global configs):

*foreground: white
*background: black
*font: 10×20
*scrollBar: true

Ahh… much better.  Now, on to the servers.  Run some commands.  Select, copy, paste.  Paste.  PASTE!  Okay, now why doesn’t the middle button on the mouse work when pasting in xterms?  Little or no google help — most people have 2 button mice and want to simulate the third button.  I’ve got a third button and it doesn’t work.  Seems to work fine in Windows.

It’s a Logitech V270 Bluetooth travel mouse — I like it.  So I go into the control panel — nothing.  I check the mouse tabs in the mouse control panel and select “SetPoint” — the Logitech mouse management software.  Click on the middle-button — it’s set to “AutoScroll”.  That seems ok.  But no, I need to select “Other”, then “Select Function”, and then choose “Generic Button”.  All fine and dandy now…

(Thanks to this info…)