Tag Archive
Enforcing Linux Ownership/Permissions
With a combination of the group sticky bit and ACL’s we can enforce ownership and permissions of subdirectories and files.
chmod -R g+s /srv/shared setfacl -R -d -m u::rwx,g::rwx,o::rx /srv/shared
Change gnome-screensaver background
Took me a while to find this. Using XFCE at work but I like the look of gnome-screensaver versus Xubuntu’s default of xscreensaver. Unfortuantley I’m lacking any ability to change the background in gnome-screensaver. I found if you create/adjust /etc/gconf/gconf.xml.defaults/%gconf-tree.xml everythings good:
<?xml version="1.0"?> <gconf> <dir name="desktop"> <dir name="gnome"> <dir name="background"> <entry name="picture_filename" mtime="1296081104" type="string"> <stringvalue>/usr/share/pixmaps/backgrounds/gnome/background-default.jpg</stringvalue> </entry> </dir> </dir> </dir> </gconf>
Oh My Darling
Clementine. Actually I think they took the fruit path, but either way it makes for a fine, Amarok-styled music application. There’s a few features I would like to see still but for the most part, they have a great player that is still responsive with my large music collection. Something Exaile can not handle.
Since its Qt based it offers native Windows, Linux and OSX compatibility. Give it a whirl!
Remove comments with(out) leading spaces
In an effort to help my memory and maybe the Internet, here is how you can strip out comments with or without leading spaces from a file in GNU/Linux:
grep -v -e '^[ t]*#' -e ^$ dovecot.conf
Wiping GPT Partitions
Andy brought in his USB HDD which Windows was now having issues seeing his partitions. XP was strangely reporting it as a GPT disk. I happily plugged it up to one of our Linux servers in our test environment, copied all of his data off and proceeded to reformat it. However, after recreating the paritions with fdisk, it was still complaining that it was a GPT disk. So I zero out the beginning of the disk. Looked at it again with fdisk -l and it still reports its GPT. WTF?!
Turns out that GPT format offers a secondary location at the tail of the drive. Just multiply the total number of cylinders by the total number of sectors to get your location to seek to. Funny though if I had looked GPT up first on Wikipedia then I would have saw the illustration. Instead we wasted a few minutes Googling.
All together it looks like:
dd if=/dev/zero of=/dev/sdp bs=512 count=1 dd if=/dev/zero of=/dev/sdp bs=512 seek=41929650
SAN Migration: The Linux Way
For our internal Linux distribution mirror I needed to migrate the LUNs from one EMC Clariion to another. To make matters worse, each Clariion is in a different VSAN — completely separate SAN fabric in the Cisco world. We don’t have any EMC migration tools that I know of but don’t really need them anyways. We can do it all with Linux thanks to the pvmove command.
Now to be fair all of our servers have dual HBAs. So taking advantage of this fact, I re-zoned one of the HBAs to the new storage. Then setup the new LUNs and presented it to the server. Now I couldn’t find any generic way of rescanning the fabric but the HP tools offer probe-luns (found in /opt/hp/hp_fibreutils). This allowed me to avoid bouncing the server to see the new storage.
Next we setup the LUNs for use with LVM with pvcreate and add them to volume group with vgextend. Then with pvmove we migrate the extents from the old PV(s) to the new one. Now be aware this takes a while. When complete we remove the old PV(s) using vgreduce and pvremove.
Once all this has been completed we are free of the old storage and running on the new. And the best part is no outage!
All together it looks something like this:
pvcreate /dev/emcpower{e,f} vgextend vg01 /dev/emcpower{e,f} pvmove -v /dev/emcpowera /dev/emcpowere pvmove -v /dev/emcpowerb /dev/emcpowerf pvmove -v /dev/emcpowerc /dev/emcpowere pvmove -v /dev/emcpowerd /dev/emcpowerf vgreduce vg01 /dev/emcpower{a,b,c,d} pvremove /dev/emcpower{a,b,c,d}
Solaris Volume Manager
I had the pleasure of adding a “hot spare” filesystem to our Solaris box today. Actually, it was a continuation of what I started the other day. Now I’ve never been particularly exceptional with disk devices (or block devices in general) in Solaris, so I knew this was going to be a challenge. And who doesn’t like a good challenge?
As a basis for my rant, let me start by saying that I’ve had no problems picking up the other UNIX’s (HP-UX and AIX) LVM implementations. Both are structured similar to Linux (or should that be Linux is structured similar to them?
). Anyways, both follow the relatively simple notion of physical volumes, volume groups and logical volumes. Physical volumes are your physical devices (disks and other block devices). Volume groups are pools of physical volumes. Lastly logical volumes are your partitions upon which you create your file systems.
Solaris doesn’t implement any of this. At least not in the same manner. Near as I can tell, they roll the last two layers together to form what they simply call a volume. The worst though is the CLI tools used to create and manage them. It doesn’t help that I inherited this box from the guy that left, and without much notes. He didn’t split the file system up very well. If this were the other boxes I’d simple add another PV to the VG and then expand the drowning LV’s. Instead I can read through books on this subject to understand Sun’s take on LVM.
I ended up skirting the issue and not using their SVM. Since this is just for emergency sake, LVM isn’t really neccessary. Still it would be nice to conquer SVM.
Kick’n It
So I’m doing my first RHEL kickstart. I’m quite impressed. I’ve known about it for sometime (who doesn’t) but never really used RHEL and therefore didn’t have a reason to use it. But now that I’m “the linux guy”, and RHEL is an obvious choice for enterprise environments, I standardized on RHEL as the distro of choice for us. So why not kickstart everything?
Damn, its done…
So that went really, really quick! This is really just my trial install: a generic base install that I can build upon in a modular framework. The ultimate goal is an autonomous install where we define a system’s config in a database for use with cfengine/puppet and the system automatically builds itself. But I gauge that will be sometime out in the future.
For now, I’m just nailing down our base RHEL install plus local rpms for OV agents, HP stuff and EMC stuff.
First Impressions of KDE4
Well, installation was a breeze. In fact with the move to cmake, compiling the masked ebuilds of KDE4 took only a few hours! Wow. Overall it is great. However, one must remember that really just the core of KDE4 is production ready. The surounding applications that make up the remander of the desktop are still in there infancy. I get several graphic artifacts, flickering widgets, and the like from time to time. But its really all worth it.
KDE4
So, I figured that now is a good time to install KDE4. Gentoo published an official guide, so here it goes.
abit acpi AIX alcatel-lucent amarok art background backup blog boredom bubbles case-mod certification Chicago columbus comedy comments communication computer computers conference corn crash daemons darpa development geek gentoo HCI house humor job kde linux LVM microsoft mp3-player music rss site unix upgrade version-control web windows