Archive for February, 2008

Review: Adder IPEPS KVM/IP

Thursday, February 28th, 2008

Remote management technologies are not exactly the sexiest part of being in I.T, unfortunately it is a very critical part of any system administrator’s toolkit. We take a brief look at the IPEPS KVM/IP by the United Kingdom’s Adder.

Product: Adder IPEPS single-port KVM $399

IP kVM (keyboard, video, mouse accessible remotely via IP) is not aAL-IPEPS_P   new technology. For years companies such as Avocent, Adder, Rose, and Lantronix have been creating these handy tools for years. Many of the older solutions are multi-port, multi-user units which usually offer 16 ports (16 hosts) but only up to 4 could be used at a time. This limitation made the multi-host switches slightly annoying.

Recently, more and more single host, single user KVM-IP products have been released upon the world. Today we are looking at the Adder IPEPS. The Adder IPEPS is a single host KVM-IP unit which comes in two flavors. The first is a single port KVM/IP with no local access, the second is a single host KVM/IP unit with remote and local access. (Meaning you can connect remotely and directly with a keyboard, monitor, and mouse.

The benefit of using a single-KVM unit vs. a multi-port KVM unit may not be immediately apparent until you think about cabling, also having 16 ports and only 4 users seems like a pretty poor technical decision on part of the KVM manufacturer. Apparently for every simultaneous remote user the vendor has to include an additional card/chip. The fact that buying 16 IPEPS is only slightly more expensive than a competing brand’s 16 port KVM gives single KVM-IP units a leg up in a competitive market.

I tested the single-user, remote only version of the product.

The setup process is fairly straightforward, for some reason the unit I purchased wasn’t actually "put together" entirely, you actually have to put the face on the unit yourself. this could be incase you need to rack mount the device, I found it very odd however. After you attach the faceplate you simply connect the unit to your PC with a crossover-cable or an Ethernet switch. After changing your PC’s IP address so that it matches the same subnet of the IPEPS (The IPEPS by default is 192.168.1.42/24) you can either connect to the IPEPS with any VNC viewer. If you do not have a VNC viewer, Adder has integrated a Java/web version of RealVNC which will get you going in no time.

After connecting to the unit, the configuration is very straightforward. You simply set the IP Address, change the password/create users. The setup literally takes 10 minutes on a new unit.

Using the Adder IPEPS is quick and easy, you simply connect either the USB keyboard/mouse or PS2 keyboard/mouse to the target host. The nice thing is the IPEPS doesn’t require an external power supply. Once you connect it to a host you simply access the unit via the IP Address you assigned during the initial configuration and viola you have the console on the remote host (You can now go on vacation for a change).

The fact that you can use VNC to connect to the remote session is a great benefit. Some of the older KVM-IP units have ridiculously awkward requirements. An older one that I used requires IE 6 or lower and ActiveX to be enabled in order for you to be able to use it. VNC viewers are readily available for BSD, Linux, MacOS, and Windows

We noticed a few problems and quirks with the IPEPS which were slightly annoying. Occasionally when connecting to the unit remotely when it is connected to a Linux (Redhat 5) results in very awkward keyboard behavior. You press a key a single time and you get anywhere from 2-15 copies of that keystroke remotely, as you can imagine this gets annoying. Aside from the key repeating problem using the remote viewer when attached to a Windows server occasionally results in mouse synchronization problems, although for the most part it works fine.

Another note is that it would have been incredibly useful had Adder included a second NIC which could be used as a pass-through for the remote host. As it stands you must have an Ethernet cable connected to both the Host NIC and the IPEPS NIC. It would have been incredible if you only needed a single Ethernet cable for both.

Overall the Adder IPEPS KVM-IP unit offers convenience, functionality, and value priced at around $375 (USD) With only a few minor problems.

Installation: Quick and easy, takes less than 5 minutes, cabling could be made easier if Adder included a second NIC on the IPEPS for network pass-through.

Ease of Use: Very easy to use, the inclusion of VNC and VNC/Java makes it very unlikely that you will find a PC that cannot connect to it.

Reliability: Fairly reliable however there are some quirks (repeated keystrokes and mouse synchronization issues)

Score: 7/10

-Drew

Are you right for Information Technology?

Thursday, February 28th, 2008

During and shortly after the ‘Internet boom’ there was much fuss about how stressful jobs in Information Technology can be. The field of Information Technology itself is not stressful, the stress comes from people doing things that they aren’t built for.

First, let us discuss what makes someone ‘right’ for I.T. there are some personality traits which are very helpful to someone who wants to work in I.T. such as: perseverance, curiosity, the ability to think critically, being analytical, versatile (being able to deal with changes in your environment at a moment’s notice), resourcefulness.

I.T. jobs often times require lengthy troubleshooting processes which involve vendors, customers, other employees, and sometimes all of the above. Perseverance is an important personality trait for someone working in I.T. because often times one is faced with a very complex and frustrating problem, and it would be very easy to ‘give up’ but you don’t learn anything by being a quitter (except that it is alright to be a quitter). More importantly, if you replace something every time a problem comes up that you cannot explain you end up spending your entire budget on ‘maintenance’ instead of pushing forward with new projects/deployments.

Curiosity is very important, you should have a natural inquisitive nature and want to know why something works (or does not work) a certain way. Critical thinking allows an I.T. professional to quickly troubleshoot problems, eliminate scenarios which are unlikely to result in a resolution and notice patterns which are hints to the cause of an issue. You cannot possibly explore all avenues of problem resolution, so you need to be able to quickly eliminate the ones that make absolutely no sense from the get-go.

Versatility is going to be one of the most important traits someone working in I.T. can possess. It can be very stressful for people who aren’t used to the ups and downs of an average day in I.T. to adapt quickly to the unexpected (Sometimes to the point of entirely mitigating their effectiveness in an unexpected scenario) An example of this would be a person who reboots first and asks questions later. A versatile/analytical system administrator/engineer understands that uptime is not everything. It would be nice to have a system or network up 100% of the time, but it is more important to know why the system failed so that you can avoid it next time.

Resourceful system administrators know that no matter how many certifications they have, or how many inane technical documents they read. They will never know everything and they shouldn’t strive to know everything. It is much more important to know where to find the answers. Whether it is Online Resources (Google), vendor support, colleagues, friends, or coworkers. Knowing where to find the answers to problems quickly is 70% of being a productive system administrator.

Personality type is also important in Information Technology. In most career paths being what folks would consider ‘a social outcast’ can actually be an asset. I know what you’re thinking, ‘every time I go to a job interview they give me a very ridiculous personality test’. They do this because some company which writes personality tests and/or a ‘self-help book author’ decided that companies would be better off hiring people who think and feel the same as the author of the personality test. (How screwed up is that?).

You must be able to tell people "No", "You’re wrong", or sometimes even simply ignore them. You must have confidence in your abilities (sometimes this comes off as arrogance) but honestly the people you are answering to don’t understand half of what is going on under their noses, and if they did they wouldn’t pay you to do it for them. A person can be both sunny and happy and objective, but usually I have found the best I.T. folks have at least some sort of personality "problem" which wouldn’t work in Healthcare or other industries which focus on serving people. You should be more concerned with your ability to communicate with your work than people around you. Of course, you cannot be a total caveman, but if every time someone reports a problem you immediately jump and run to their rescue. That is all you will do.

One of the largest no-nos in Information Technology is being a "tell me how to do it, I don’t care why it works.." I’ve run into people who just want to know the steps involved with performing a task, it may seem like a great idea to offload mundane administrative tasks to users as a way to lighten your load, but consider this – what happens when something doesn’t "follow the script" and the person who is doing part of your job has absolutely no idea what is going on. If a person wants to know how to do something they should also be educated on why and how that process actually works.

A good I.T. candidate should see problems and new projects as fun challenges, not ‘just more work’. You should be excited (not afraid) about new technology coming out. Being platform/vendor agnostic is also very helpful. You will never run into someone who does something the exact same way you do, so you should know enough about ‘All ways’ to do things in your specific discipline whether it is DBA, System Administration, Network Engineering, or making coffee at StarBucks. You have to be willing to move outside of your comfort zone otherwise you will miss out on opportunities to resolve problems in the most efficient manner possible and more importantly grow your experience.

Hopefully this article will serve to help people who are thinking about going into IT decide whether it is for them or not. You can certainly be successful in I.T. if you’re a ‘call technical support first, learn second yes man’ but you will most likely be very very miserable in the process.

-Drew

New Feature: Ask the Hater

Thursday, February 28th, 2008

We have a new feature at SystemAdminihater.com. You may have noticed the link entitled ‘Ask the Hater’, every Monday we will have a Q&A where I will answer your most nagging Information Technology questions (or other questions if we do not receive decent I.T. questions).

Have a question about Virtualization? Ask the Hater

Have a question about Windows or Linux? Ask the Hater

Have a question about your love life? Ask the Hater

(please note: any advice given regarding interpersonal relationships should be entirely ignored although we will give it a shot.)

-Drew

0x0000007B Windows and VMWare

Tuesday, February 19th, 2008

You’ve just converted a physical 64 bit Windows server or workstation to a VM using VMWare converter. You’re excited because you’re rebooting for the first time when, OH SNAP blue screen! If you’re one of the (probably two, maybe 3) people like me who have been struck by this issue you are not alone, I am here to help!

First it is important to make sure that we are referring to the same issue.

-You have converted a physical 64 bit Windows machine to a VM using VMWare.
-You have started the Virtual Machine in VMWare Server
-The Virtual Machine is continually giving you the blue screen of death with “0x0000007B”

If you answered yes to the previous questions than we’re going to turn the blue screen of death, into the blue screen of life my friends.

Its your lucky day!

The only reason I wrote this article is because I had this exact same issue in this exact same scenario, and it literally took me a week to get it resolved.

So now you benefit from my malaise.

Before we begin, I would like to stress how not responsible I am if you lose data, or if something goes a little awry and something doesn’t work out for you because of this guide, and besides I did my best and its not nice to pick on people who are really trying.

Anyhow, we will need a few things to get this show on the road.

–A recent BartPE CD (See my Article on creating a BartPE CD here)
–A backup of your Virtual Machine
    –Simply copy the directory that your Virtual Machine is stored in to another location. (That way if something gets totally blown up you can try again!)
–A decent soundtrack (optional, but helpful)

So now that we have assembled all of our parts and you are jamming away to Dragonforce or Neil Diamond (or a mash-up your brother-in-law made of both), we can begin!

Introduction —

– If you still have the .ISO file for your BartPE disc, create a new CD-ROM drive entry in your “Broken Virtual Machine” pointing to that ISO file.
    OR
– if you do not still have the .ISO file for your BartPE disc, put the CD in your physical CD-ROM drive on the VMWare host machine.
– Ensure that your “Broken Virtual Machine” is set to use the physical CD-ROM drive on the VMWare host machine.

– Start “Broken Virtual Machine”

– After starting “Broken Virtual Machine” You should be presented with the VMWare BIOS, hit ESC to bring up the BOOT menu.
– SELECT the CD-ROM option and press ENTER
– If everything goes correctly you should be presented with a BartPE splash screen.
    –If you are not presented with a BartPE splash screen, try check the settings for “Broken Virtual Machine” to ensure that the CD-ROM drive is set to be connected.
– After BartPE loads, you should see its wicked cool splash screen (Warp speeeeeed!) at this point we are ready to dig in to this guide.

Anything which is lost can be found —

– The problem, which has been very vaguely described and documented (no less) is that for whatever reason 64 Bit versions of Windows do not by default have the symmpi driver.
– The way we fix this is in three steps.
   –First, we find out how broken “Broken Virtual Machine” is.
   –Second, we fix “Broken Virtual Machine”
   –Third, we apologize to it for calling it “Broken Virtual Machine” upwards of 30 times in this guide and buy it a beer.

Broken to a degree you say?

Well, um. Yes.

Sometimes, the registry keys are there but the actual driver files are not. Other times. both the registry keys. and the driver files are there but the service is not set to start on boot.

So we just need to figure out how broken “Broken Virtual Machine” is.

First I will make a list of what should be there, and then we will work backwards to add anything which is missing, sound good? here we go!

In order for VMWare to work on a Windows System it needs a driver called SYMMPI to be present, for some reason by default the 64 Bit versions of Windows this driver is not present.

–The file must be present in:

C:\WINDOWS\SYSTEM32\DRIVERS\SYMMPI.SYS

–A Registry Key:

“pci#ven_1000&dev_0030″ must exist in HKEY_LOCAL_MACHINE -> SYSTEM -> ControlSet001 -> Control -> CriticalDeviceDatabase and be configured properly.

–A Registry Key:

“symmpi” must exist in HKEY_LOCAL_MACHINE -> SYSTEM -> ControlSet001 -> Services must exist and be configured properly.

First we check to see if C:\WINDOWS\SYSTEM32\DRIVERS\SYMMPI.SYS exists on your boot drive. I am assuming your boot drive is C: and your Windows installation directory is C:\WINDOWS.

C:\WINDOWS\SYSTEM32\DRIVERS\SYMMPI.SYS

In BartPE click on GO, and then open a command prompt.

–type C: and press ENTER

–type cd\ and press ENTER

–type dir and press ENTER

–Make sure that this looks like the C:\ drive on “Broken Virtual Machine”
–if you see a C:\Windows or C:\WINNT folder than most likely this is your boot drive if not, try and figure out your boot drive by trying different things.
–Try and remember where you installed Windows, usually it is C:\WINDOWS or C:\WINNT we will assume your installation path is C:\WINDOWS

–type dir c:\windows\system32\drivers\SYMMPI.SYS
    — Good Output –
        C:\>dir c:\windows\system32\drivers\SYMMPI.SYS
         Volume in drive C has no label.
         Volume Serial Number is 94C7-D124
         Directory of c:\windows\system32\drivers
        02/18/2005  03:40 AM            84,992 symmpi.sys
                1 File(s)         84,992 bytes
                0 Dir(s)   1,961,406,464 bytes free
        — Bad Output —

C:\>dir c:\windows\system32\drivers\symmpi.sys
         Volume in drive C has no label.
         Volume Serial Number is 042C-5F95

         Directory of c:\windows\system32\drivers

        File Not Found
    — end example output–

        if the file is there, you’re in luck! if not, we will have to find you a copy but don’t worry just yet, it is not too difficult to find usually.

    — If you have symmpi.sys move on to the next step.
    OR
        — if you do not have symmpi.sys stick around for a moment.
        — Many times OEM vendors or folks who build their own PCs know to copy the contents of the Windows installation CD to some obscure location on the hard disk, we’re hoping this is the case!
        — Lets see if we can get lucky.

– type dir /s symmpi.sy_

(What we’re doing is searching C:\ (or your boot drive) for a file called symmpi.sy_) Note: .sy_ is the compressed sys driver file.
        — Good Output —
            C:\>dir /s symmpi.sy_
             Volume in drive C has no label.
             Volume Serial Number is 94C7-D124

             Directory of C:\AMD64

            03/22/2006  07:00 AM            37,033 SYMMPI.SY_
                       1 File(s)         37,033 bytes
        — Bad Output —
            C:\>dir /s symmpi.sy_
            Volume in drive C has no label.
             Volume Serial Number is 94C7-D124
            File Not Found
        — end example output —

– If it turns out that you have a copy of SYMMPI.SY_ on your computer, note the location, in the case above its C:\AMD64

–type H: and press ENTER
All we have to do now is extract the file.
–type extract C:\AMD64\SYMMPI.SY_ C:\WINDOWS\SYSTEM32\DRIVERS\SYMMPI.SYS
Note: If you get an error about extract not being a valid 32 bit application you’re not in the right path. It is trying to use the 64 binary. type H: and press enter and try again.
extract should complete.
–type dir c:\windows\system32\drivers\SYMMPI.SYS
        OR
– If it turns out that you do not have a copy of SYMMPI.SY_ you will need to copy it off of your 64Bit Windows installation media.
Put the CD-ROM in your drive
Figure out which drive letter BartPE has assigned to your CD-ROM Drive (I will assume it is D:)
– type D: and press ENTER
– type dir /s SYMMPI.SY_
— Good Output —
C:\>dir /s SYMMPI.SY_
Volume in drive D has no label.
Volume Serial Number is 94C7-D124
Directory of D:\AMD64
03/22/2006  07:00 AM            37,033 SYMMPI.SY_
                                    1 File(s)         37,033 bytes
— Bad Output —

C:\>dir /s SYMMPI.SY_
Volume in drive D has no label.
Volume Serial Number is 94C7-D124
File Not Found
— end example output —
– type H: and press ENTER
All we have to do now is extract the file.
– type extract D:\AMD64\SYMMPI.SY_ C:\WINDOWS\SYSTEM32\DRIVERS\SYMMPI.SYS
Note: If you get an error about extract not being a valid 32 bit application you’re not in the right path. It is trying to use the 64 binary. type H: and press enter and try again.
extract should complete.
– type dir c:\windows\system32\drivers\SYMMPI.SYS

I will assume that the SYMMPI.SYS file is now in c:\windows\system32\drivers\SYMMPI.SYS
——–

Now we are ready to muck around in the registry
Now is about the time where I really hope you took my advice and made a backup of “Broken Virtual Machine”.

–pci#ven_1000&dev_0030
–type H: and press ENTER
–type regedit and press ENTER
–You should be presented with regedit (hope you backed up your VM… da da da..)
As you are currently viewing the Windows registry for your Live CD environment and that is just next to useless, we’re going to load a different hive.
–Click on HKEY_LOCAL_MACHINE, then click on FILE -> Load Hive
–Navigate to your boot drive (C:) and then to C:\WINDOWS\SYSTEM32\CONFIG
–Double-click on system, it will present you with a dialog box asking what to name the new hive call it something such as SYSTEM2 (it doesn’t really matter)
–SYSTEM2 is the actual system hive for “Broken Virtual Machine”, neat huh?
A word about regedit in BartPE for whatever reason I would say 60% of the time I tried to load this hive regedit would close, if you try it enough times it will actually work.
–expand SYSTEM2 -> ControlSet001 -> Control -> CriticalDeviceDatabase
–Look for a key called pci#ven_1000&dev_0030
–if you have a key called pci#ven_1000&dev_0030
–click on pci#ven_1000&dev_0030
–There should be two strings in pci#ven_1000&dev_0030
–ClassGUID which has a value of {4D36E97B-E325-11CE-BFC1-08002BE10318}
–Service which has a value of symmpi
–if those two strings are either not present in pci#ven_1000&dev_0030 or contain different information, change them.       
        OR
–if you do not have a key called pci#ven_1000&dev_0030
–RIGHT-CLICK on the LEFT PANE and click new -> key
–key name is pci#ven_1000&dev_0030
–RIGHT-CLICK in the RIGHT PANE and click new -> string value the name of this value is ClassGUID the value is {4D36E97B-E325-11CE-BFC1-08002BE10318}
–RIGHT-CLICK in the RIGHT-PANE and click new -> string value the name of this value is Service the value is symmpi

You should now have the first of two required registry keys properly setup.
———

–symmpi

–While still in regedit click all of the – symbols to close all of the open keys until you are back at the main hives.
–expand SYSTEM2 -> ControlSet001 -> Services
–if you have a service called symmpi left-click on it.
    OR
–if you do not have a service called symmpi RIGHT-CLICK on the LEFT-PANE and click new -> key
– key name is symmpi
–If the symmpi key is setup properly you should have 7 keys in the right pane.
–(Default) (value not set) STRING
–ErrorControl (DECIMAL) 1 DWORD
–Group  SCSI miniport STRING
–ImagePath system32\DRIVERS\symmpi.sys STRING
–Start 0 (DECIMAL) DWORD
–Tag 33 (DECIMAL) DWORD
–Type 1 (DECIMAL) DWORD
–If you have all of the keys in the right pane, most likely you will notice that the ImagePath key is missing and Start is set to 4 instead of 0.
–RIGHT-CLICK on the RIGHT PANE and select new -> String Value name = ImagePath value = system32\DRIVERS\symmpi.sys
–Double-Click on Start in the RIGHT-PANE, make sure DECIMAL is selected and change it to 0 if it is not 0 already.
–if you do not have all of the keys listed above create them using the method listed below.
–RIGHT-CLICK on the RIGHT PANE and select new -> type is either String Value or DWORD (see table above for types, names a values)
–Note: when entering DWORD values it helps to ensure that you have DECMIAL selected.

–After you have added, adjusted or just verified the configuration of the symmpi service configuration contract the registry hive until you are back to SYSTEM2 and then unload it.
—————————

Final thoughts.

How annoying was that?

I’m going to say very, hopefully it helps someone out.

Five Minute Guide: BartPE CD

Tuesday, February 19th, 2008

In this 5 minute guide we show you how to create a BartPE CD.

BartPE is a live CD for Windows environments similar to Knoppix for Linux. It allows you to recover from all sorts of nasty situations such as disk mis-configuration, driver tragedy. I must admit that until recently I hadn’t used BartPE because I’ve never had an issue that needed a LiveCD for a Windows machine.

I decided I would whip up this 5 minute guide to creating a BartPE CD to go along with an article on fixing an issue with 64 Bit Windows 2003 Virtual Machines in VMWare.

You will need:

–A retail Windows CD either XP or Windows 2003 (Note: BartPE does not appear to work with R2, X64, or any Enterprise/Datacenter edition of Windows 2003, it does not find the files on the CD) I used an original Windows 2003 Web Edition CD I had laying around.
–A CD Burner (If you want to create an actual CD)
–A Blank CD (See above)
–The latest version of BartPE
–5 minutes

–Insert your Windows 2003 or Windows XP CD-ROM into your CD-ROM drive.
–Download BartPE from the link above or from the author’s web-site at http://www.nu2.nu/pebuilder/#download
–Install the application and launch ‘PE Builder’
–You should be presented with the screen listed below

bartpescrn 
–For source select the CD-ROM drive where you inserted the CD or any other folder which contains the contents of a Windows CD.
–**optional and probably not needed** For custom specify a folder which you want to include in your Pre-installed Environment. (this could include tools, etc…)
–For output I created a new temporary folder for so I would remember to delete the files later. Decide where you want BartPE’s output to go, and then select that path here.
–Plugins
If you have a specific need in mind, i.e. virus scanning or adware removal, you may want to checkout the ‘Plugins‘ button at the bottom of the screen, there appear to be many useful utilities available in that collection.       

Media Output
Here is where you have to make a choice.

-None means that it will not create an ISO or a CD and that it will simply output its files to the “output folder”.
-Create ISO Image means that it will create a ISO image bootable ISO image of the output which you can either choose to burn later using your favorite CD authoring software OR boot a virtual machine with.
-Burn to CD/DVD means that PE Builder will go ahead and create a bootable CD-ROM with the output on the disc.

There is no right or wrong answer, but ask yourself what are your needs? Are you going to be using this to fix a virtual machine? If so, than you most likely will not need physical media (CD-ROM) and you can just use the .ISO file. Besides, even if you have PE Builder create the .ISO file and you find out later that you need a CD, you can always burn the CD later using Nero or whichever authoring tool is your favorite. My suggestion would be to create the .ISO file and keep it around incase you lose the CD or need to boot a virtual machine which is being stubborn about booting from the physical CD-ROM drive.

Once you’ve solved that moral dilemma, simply click ‘Build’ and your requested action, whether it is None, Create ISO Image, or Burn to CD/DVD should be completed in a jiffy.

Note: It took me a lot longer than 5 minutes to make my BartPE disc, mainly because it took me about 4 hours to find a Windows 2003 CD it would ‘accept’. Where’s the love for the R2 X64 Data Center SP-2 nLite custom CDs Bart? :-) (Just kidding) Although it would be nice if it accepted other types and slightly newer media such as Volume Licensing, R2, X64, etc.

Enjoy!
-Drew

Split a LVM2 Volume Group into two or more!

Friday, February 15th, 2008

We’ve all had that sinking feeling in our gut. The feeling when you realize that in a rush someone let CentOS, Fedora, or Redhat Linux auto-partition disks into one huge LVM2 mess. Until recently my answer would always simply be that its faster to reformat it and restore than try and reduce the volume group. That was until I had no choice.

I was absolutely horrified at the quality of information which was available to carry out what seems like a fairly mundane task. I am sure there are 300 different ways to do this exact same process but I needed a way that would work every time. (That is how I roll)

So about 10 or 15 completely destroyed file systems later, I share with you the fruit of my labor.

What this guide covers:

This guide covers shrinking a logical volume so that you can create more logical volumes, partitions and file systems.

What this guide does not cover:

Removing physical volumes from a Volume Group so that you can separate physical disks.

Warning: I would recommend following the guide below on a test machine prior to carrying it out on a production machine. Either way systemadminihater.com takes no responsibility for any damages caused by anything you do as a result of the instructions on this page, or any drinking games described on the other pages of this site.

Requirements:

–A Linux Rescue CD with LVM2 support (I used CentOS 5.1)

Steps:

Boot your system from your rescue CD.

I will assume that your current volume group is VolGroup00 and your current logical volume is VolGroup00. I will be creating a new logical volume LogVol02 for the sake of example.

#Activate the Logical Volume so that it becomes available.

lvm lvchange -ay /dev/VolGroup00/LogVol00

#Retrieve information about the file system you wish to shrink.

tune2fs -l /dev/mapper/VolGroup00-LogVol00

Make note of the:

Block Count: 60252160
Block Size: 4096 (4K)

My disk is a 250GB RAID-1 (60252160 4K Blocks) I am going to slice my logical volume in half because it is an easy example.

#Force FSCK to run on the logical volume you want to shrink

e2fsck -f /dev/VolGroup00/LogVol00

Resize the logical volume keep in mind that the number on the end represents 4K blocks! 30126080 x 4 = 120504320K / 1048576 = ~115GB

#Notice we give resize2fs its size in 4K blocks.

resize2fs /dev/VolGroup00/LogVol00 30126080

Multiply the number you used above by 4 (30126080 * 4) = 120504320 we give lvreduce its value in K so we can get exactly what we want.

#resize the file system.

lvm lvreduce –size 120504320K /dev/VolGroup00/LogVol00

#use vgdisplay to figure out available space

lvm vgdisplay

#below you see      extents /  space free

Free  PE / Size       3677 / 114.91 GB

#Create a new Logical Volume: LogVol02
#You can create a LV using many different options:
#–size 114G would’ve created a 114GB LV
#–extents 3677
#I used extents because it seems more exact.

lvm lvcreate –extents 3677 -n LogVol02 VolGroup00

#Create a new ext3 file system on LogVol02

mkfs.ext3 /dev/VolGroup00/LogVol02

Conclusion:

You now have two logical volumes where there used to be one!

Impress your friends, your co-workers, or maybe just yourself. Either way if you ever need to get your hands in LVM I hope this makes it easier.

-Drew