The Nubby Admin

The blog of a nublet SysAdmin

My Brief Observations on The Changing Generational Views on Vocation and Calling

Posted in: Business, Misc
  |  by: Wesley David

As I’ve been making my way in the realm of the self employed, I’ve had cause to stop and consider the different ways and means by which people make a living. Just the other day, I made an interesting obvervation concerning how the generational view on employment has seemed to change. When discussing what someone’s family member does as their vocation, this seems to be the general breakdown of how it’s viewed:

“The Greatest Generation” – those who grew up in the depression and were young adults during WWII. My grandparents. They tend to be focused on the company that one works for. “Yes, he works for Boeing.” Only when their family member is self employed are they forced to consistently explain what role the person plays. “He’s self employed. He works on computers.”

The Baby Boomers. This is my parents’ generation. They seem to focus on a job title. “Our son is a Systems Administrator.” The focus is less on the company, likely because during my parents’ generation it was becoming less and less likely that a person would work for the same company for their entire life.

Millenials, AKA Generation Y. This is my generation, myself having been born in the poster year for Gen Y: 1982. When asked about our vocation, we seem to have two parallel thoughts. The first is that we don’t seem to see our work as separate from the rest of our life. We have had the fortune to build on the hard work of previous generations to be able to freely choose a vocation that we love and feel called to. “What do you do?” has a larger meaning to us than it seems to have for prior generations. The second thought is that we define what we do not by the company we work for, or the job title we’ve been given, but by a job or project description. “I work on the computer systems that allows a business to function competitively.” We also tend to inject our sense of “calling” into the description. I only just now realized that that’s probably why I’ve lately been changing the way I describe my work: “I make companies happy about the technology that runs their business.” That’s vastly more touchy-feely than my grandparents’ generation commonly expressed their vocation, and yet it’s effortless and natural for me.

I’m sure that I’m not the only one to make these observation. I’m certain that there’s plenty of scientific and pop-science writings on it. I’m just not terribly familiar with it personally. Have you noticed a similar thing? Either way, which culture do you come from? I’m sure this is a different experience in different countries around the world. What is your generation and how do you explain your work to others?

18NOV
3
Tweet

Solving “Event 129 nvstor64 reset to device, DeviceRaidPortN was issued” and “Event 5 nvstor63 A parity error was detected on DeviceRaidPortN”

Posted in: SysAdmin
  |  by: Wesley David

My Problem:

I have an HP ML 115 G5 server that uses a NVIDIA NFP3400 Chipset for storage. I have two pairs of hard drives that are mirrored. The Windows Server 2008 event log was displaying the following errors reported by the nvstor64 driver:

Event 129 nvstor64 “reset to device, DeviceRaidPort2 was issued”
Event 5 nvstor64 “A parity error was detected on DeviceRaidPort2

Sometimes the errors would appear five to seven times per second and bring the server down to an unusable crawl. Windows started seeing disk errors with the drives that were presented to it by the controller:

Event 51 “An error was detected on device DeviceHarddisk0DR3 during a paging operation”

Eventually NTFS corruption began to be seen:

Event 55 NTFS “The file system structure on the disk is corrupted and unusable. Please run the chkdsk utility on the volume [volume name]“

My Solution:

The drivers are likely to be old or corrupted. In my case they appeared to have been corrupted after performing a bare metal restoration of Windows SBS 2008. Download the latest MediaShield package for the nForce chipset that is in your server or workstation from NVIDIA’s driver page (in my case with an HP ProLiant ML 115 it was the nForce Professional 3000 Series chipset). Then, carefully consider the danger of installing the drivers. In my case one of my two mirrors were broken apart and I had to delete one of the disks in the RAID utility and rebuild the mirror pair. Make a good backup of your system if at all possible (rather difficult if you’re having storage controller issues. You may want to remove and image your hard drives for safe keeping.

Installing fresh, new drivers may solve your problem. It did for me.

The Long Story:

I sought out help from HP’s own technical support and was pointed in the direction of this HP Support Forum thread. From that thread, you will be led to many others with similar troubles. It all seems to be centered around the nvstor driver and its interaction with the NVIDIA nForce chipset. It was as if the driver had been corrupted somehow. The ML 115 uses a NVIDIA NFP3400 Chipset for storage. That chipset uses the NVIDIA MediShield suite of tools that contains the drivers and utilities to manage it all. You can find specific NVIDIA drivers here at NVIDIA’s driver page. It just seems wrong to be on NVIDIA’s site parsing through graphics card drivers to find storage drivers for a server. Oh yeah, that’s because it is wrong!!

What’s especially troubling is that there is no link for the Windows version of the NVIDIA chipset drivers or the MediaShield suite of tools on the ML 115′s own drivers and support page. The only drivers on HP’s official page are for RHEL 5. I’m all for more Linux drivers in the world, but why not also offer the Windows version? The crazy hoops one has to jump through to find the exact chipset model number and then learn about NVIDIA’s nomenclature concerning how they package their drivers in a MediaShieled bundle is less than ideal.

Nevertheless, after finding the latest drivers on NVIDIA’s own drivers page, I installed the MediaShield package. Unfortunately, it broke apart one of my two mirrors, so I had to delete one of the disks in the RAID software and rebuild the array. That was an unnecessary bit of drama. Once that was rebuilt, I monitored the event log for days and none of the nvstor64 errors returned.

14NOV
3
Tweet

Are You a DBA? Would You Like to be Launched Into Space?

Posted in: SysAdmin
  |  by: Wesley David

Disclaimer: I have and do write for various RedGate Software websites as an independent author. I have received no kickback from writing this blog post other than perhaps making David Convery smile for a fraction of a second.


RedGate Software has recently announced a promotion called “DBA in Space” in which one hard working DBA will be shot into space. Said DBA will presumably be given sufficient bodily protection for the journey as part of the deal.

The competition is in three stages. The first stage is explained by the DBA in Space website thusly:

The competition starts with our five week video quiz. All you have to do is answer the questions and complete some simple SQL tasks. Each week, new questions and tasks will be released. You can get started right away, or join in any time you like – the competition is open till 18th November.

Once you complete the SQL tasks that are presented, you then need to fill out a simple application form. After November 18th, fifteen finalists will be chosen. At that point, those fifteen finalists will need to campaign for votes. The DBA with the most votes gets to be a satellite for a day!

As with any competition, there is some fine print. Due to legal restrictions, Tennessee, Wyoming, Northern Ireland, and Quebec residents are excluded from being shot into space. The actual catapulting will not be done by anyone at RedGate (although I’m sure Robert Chipperfield would give it a go), but rather Space Adventures Ltd. For full details, please see the DBA in Space website.

If any one of my readers get picked as one of the final fifteen, let me know and I’ll plug you on the blog for some votes! I’m already hoping that Sean and Jennifer McCown try out for it. I’d like to see them fight each other for votes in the final fifteen. =)

11NOV
0
Tweet

MXToolbox Lists Ten of the Best Email Related Tools Online

Posted in: SysAdmin
  |  by: Wesley David

This is a short “reblog” of a post that MXToolbox recently made concerning their favorite email related tools. Every year for the last three years they compile a list of their employees’ favorite online tools for email troubleshooting. Check out this year’s list of ten. Sure, three of them are their own products, but those rock too. I’ll include a short snipping of some of the products they listed:

From MX Toolbox’s Third Annual List of Email Related Tools:

2. Send Test Email- This tool is from Wormly and is pretty cool. All you have to do is enter your SMTP server and then a sender and recipient. Then just hit the button and it shows you the SMTP conversation.

6. Quick Zone Check – Performs a series of checks on your name servers and email servers. Returns WHOis, MX, Name Server and more info all in one place.

9. [email protected] – MxToolBox Ping is one of the Free Tools provided by MxToolBox to help you determine if Inbound and Outbound mail flow is working. Simply send an email from your network to [email protected] and the tool will look at the email headers of your message and send you a notification back immediately. Please note that the subject and body do not matter. The response email will include several helpful troubleshooting tools including your Outbound IP, server hops, any transaction times or delays and it can help trace the route your email is taking to discover any outbound gateways you might be using.

I would personally like to recommend that you try [email protected] Right now, send a blank email to that address. Do it! It’s fun!

Do you have any other online email tools that weren’t on MX Toolbox’s list? Are you making the next best tool right now? Or is it a script that you only share with the cool kids? Let me know in the comments below.

4NOV
2
Tweet

How to Utilize More than 4GB of RAM in 32-bit Fedora 14

Posted in: SysAdmin
  |  by: Wesley David
Tags: Fedora, Linux

My primary machine for work and play is a nearly-four-year-old laptop. It’s a Dell XPS m1530 and it has been true to me for most of its life. At the time of purchase in December of 2007 I bought a no-fault warranty for an extra $400 or $500 which recently paid off. The motherboard failed and I was able to get virtually everything inside replaced except for the T7700 CPU itself at absolutely no cost. Oh, I also snagged a new wrist-rest too since I had dented the original (a ProCurve switch at medium velocity can do a surprising amount of damage). No-fault replacement means no-fault replacement. I could drop-kick this thing into a mulcher and get a new one. Now I basically have a completely new laptop for no expenditure.

I don’t do heavy gaming or anything that strains the CPU. The XPS laptop’s hinges are known to be amazing, so there’s no limpness or dangling of the screen. There’s no reason that this laptop shouldn’t last another four years. Except for one thing: I only have 3GB of RAM.

3GB of RAM, while once considered epic, is now quite a hindrance to me. I use VMware Player to keep around an instance of Windows 7 and also a few other sandboxes. Virtualization is obviously RAM hungry and sometimes I can get up and brush my teeth in between periods of unresponsiveness in a virtual guest. I used Crucial’s brilliant RAM Calculator to find that my laptop’s motherboard/CPU/BIOS supports up to 8GB of RAM! In short order, I purchased two 4GB sticks of RAM and eagerly awaited their arrival, however I was slightly curious how my installation of 32-bit Fedora 14 would handle it.

Yes, I know, I should have installed 64-bit Fedora when I switched to Linux in early 2011. I’m still skittish about 64-bit OSs though. I think I have PTSD over trying to be an early adopter of 64-bit operating systems years ago. I’ll be installing 64-bit Fedora 16 when it comes out in a month’s time or so, but until then I want my 8GB of RAM right NOW!

Using the PAE Kernel

In order to see more than 4GB of RAM with a 32-bit kernel, you’ll need the Physical Address Extension version of your kernel. Some distributions nowadays default to using the PAE kernel because PAE kernels use the NX bit of the CPU. However, before you can use the PAE kernel, you have to make sure your CPU is PAE compatible. To find out, look here:

cat /proc/cpuinfo | grep -i pae

If you see PAE listed, then you’re all set! Here’s my output:

From there, it’s a simple matter of using your package manager to install the PAE enabled kernel. For me, it looks like this:

yum install kernel-PAE.i686

However!! I use an Nvidia graphics card which uses a kmod. Nvidia has a separate kmod for the PAE kernel that I have to install. This is a good time to mention that you should probably think long and hard about anything that you use that might be dependent on your specific kernel. Have you done any kernel hacking? Does something depend on your 32-bit kernel that might break if you used a PAE kernel? Think specifically about any kmods that you might be using.

In my case, I installed the new nvidia kmod thusly:

yum install kmod-nvidia-PAE.i686

I did both consecutively. I did not reboot into the PAE kernel and then install the kmod. After installing the 8GB of RAM and then starting the machine up, I nervously waited. With much relief, the boot process went through as normal (well, the BIOS took longer than usual since it detected hardware changes) and I received my normal login screen. At a shell, I was happy to see the following:

Of course, I didn’t follow all of my own instructions about considering all packages that were kernel dependent or used kmods because upon opening VMWare player I received the following error:

Before you can run VMware, several modules must be compiled and loaded in the running kernel. Kernel Headers 2.6.35.14-97.fc14.i686.PAE

In that case, I had to install the kernel-devel-PAE.i686 package and then refresh the VMware error dialog box to find the new PAE kernel headers.

Fin!

I now have an 8GB machine and most importantly I can give my Windows 7 VMware instance 4GB of RAM. I admit it, I really like Outlook 2010. I also need QuickBooks to run my business finances. Thus I keep Windows around (also, it’s sadly necessary to have IE around when working on Windows networks, particularly SharePoint installations).

Behold, the glory!

Postscript

Yes, I’ll install 64-bit Fedora 16 in a few weeks when it comes out. Until then, everyone can point and laugh at me.

31OCT
0
Tweet

How Does a Windows Administrator React When Seeing Linux for the First Time?

Posted in: Humor, SysAdmin
  |  by: Wesley David
Tags: Linux, Windows

(This is the sequel to “How Does a Windows Administrator Solve Every Problem?“

Apologies to Hyperbole and a Half)

21OCT
0
Tweet

My Certified Wireless Network Administrator (CWNA) Certification Experience

Posted in: Certification, SysAdmin
  |  by: Wesley David
Tags: Wi-Fi

As of Friday, October 14th of 2011 I am officially a Certified Wireless Network Administrator (CWNA). The vendor neutral certification is designed and put forth by CWNP, Inc which stands for Certified Wireless Networking Professional.

My Experience:

I’ve had hands-on expereince with Wi-Fi products since the early parts of my IT career. It was nothing spectacular. I was a pinch hitter between help desk, the Sr. SysAdmin and the network administrator at a 300 person organization. The network admin would frequently have me track down ad-hoc networks, sniff for signals as he played with the 3Com-based enterprise wireless network, perform authentication tests and generally be his gopher. I’ve mucked about with my own small wireless deployments for clients as well.

The meat of my networking experience has been with 802.3 as it comfortably wriggles its way through UTP cabling. Most of my formal training with wireless has been through Microsoft-centric networking topics. However, I felt pretty confident with wireless networks in general even if I knew I wasn’t aware of the deep inner workings of it all. I figured it would be a simple matter to focus my mind on the topic and “get to the bottom of things.” How complex can it be? It’s like the ethernets, just with no tubes.

Exam Motivation:

Now that I’m a consultant (distancing myself from the term “contractor” and the culture that surrounds it), I feel a greater need than ever before to have certifications to show off to prospective clients. Also, even though I’m 29 I still have people look at me and assume I’m barely out of high school. I’m sure I’ll appreciate my Dorian Gray genetics later on in life, but for now my boyish looks can be a barrier to convincing people to trust me with five and six figure projects in spite of my experience and references. Certifications are another leg that I can stabilize a corner of the bargaining table with.

As I gazed at the certification landscape, many seem viable. CCNA? GSEC? JNCIA? RHCSA? CCDA? LPIC-1? I have a decent breadth of SysAdmin / NetAdmin knowledge, even if it’s only a few inches deep in some areas. However, at least I know what I don’t know (at least, I think I know what I don’t know… you know?) and in many cases I merely have to polish what already exists to progress from dilettante to journeyman and eventually on to craftsman / artisan. The wireless networking arena had captivated my attention a few months ago as I saw the needs of small and medium businesses and how they could be solved with wireless networks. With that hunch I decided to pursue the CWNA as my first foray into the realm of invisible tubes.

Exam Preparation:

I took full advantage of a great promotion that CWNP is offering right now: Their Self Study Kits are being sold for the exact same price as the exam voucher. The study kits come with the official Sybex book, a voucher to get official practice exam questions from CWNP, Inc (it’s always nice when the exam creators also make the practice questions), a dictionary of Wi-Fi terms and the voucher that you give to Pearson VUE to schedule your test. The exams are $125, $175 or $225 depending on which level of expertise it is, so for the same price as the test you can get a great book and some practice questions. I believe that this promotion will end with the new year, but can’t find confirmation of that.

The Sybex Book

“CWNA Certified Wireless Network Administrator Official Study Guide: Exam PW0-104” was written by two Davids, David A. Westcott and David D. Coleman. This book goes above and beyond the bare requirements of the CWNA exam. Many exam preparation materials focus purely on the need-to-know information that gets you a passing score. This is not one of those books. You are pushed beyond the exam outline and into some fairly gritty territory with painstaking detail. Many, many times the authors note that a certain passage or entire subsection of a chapter is beyond the scope of the CWNA, but that the foundational information will help all of the required information to gel. When reading the book you feel less like you’re reading exam preparation material and more like you’re reading introductory wireless engineering courseware.

Raise your hand if you’ve ever read a technical book, especially an exam preparation book, that has made you pause and consider if eating carpet and washing it down with a stuffed porcupine would be easier. Is it a certification prep book? NOPE. Chuck Testa! (Okay, I need to chill out on browsing Reddit for a few… hours). While certain publishing houses are known for producing thousand-page longueurs *COUGHMSPRESSCOUGH*, Sybex has, in my experience, largely avoided that pitfall. This book is a shining example and might be one of the few exam prep books that you keep around for a reference.

The downside of the book is that the practice questions that come with it (20 at the end of each chapter and three sets of 60-question practice exams) were a bit sketchy. The questions were frequently subjective, sometimes maddeningly difficult to interpret and on occasion I felt that a few answers were just plain wrong. I wilted, feeling completely inadequate to take the exam in spite of having thoroughly enjoyed the prose in the book and thinking that I had understood the information solidly. That is, until I took the official CWNP practice tests, but I’m getting ahead of myself.

The CWNP Practice Questions

After the frustrating experience with Sybex’s practice questions and exams, I kicked the dirt, plodded over to my CWNP account and tried my cortex on their practice questions. Joyously, I had a better experience. While I didn’t perform quite as well as I had hoped, the questions were at least fairly worded (with a few notable exceptions, as is common with anyone’s tests apparently) and I only disputed one or two. They were well written and the explanations to the correct answers were acceptably thorough.

My main gripe with them is that the wrong answers are not explained. Often it’s not enough to simply explain why the correct answers are right. Many times there is still some misunderstandings surrounding a wrong choice that need to be cleared up. Going slightly off-topic, this is why I’m so impressed with most of Transcender’s products. They almost always take the time to painstakingly explain why each right answer is right, and more importantly why each wrong answer is wrong. Often I’m more instructed by an explanation behind why a certain choice was wrong than why the correct choices were correct.

The Exam:

Of course, I’m bound by a NDA to stay silent about the specifics of the exam (PW0-104). I will only say that it is a fair exam. I felt like one or two questions were unnecessarily vague, however all of the rest, to the best of my ability to understand them, were very straightforward and tested a person on the standards and their various implementations. There were no “gotcha” questions like there were in the first iteration of the test ten years ago.

If you want to pass, you have to be intimately familiar with the standards and their interaction with each other. You have to know the fine grained details of each protocol and how it operates in different situations. If you do, you’ll pass it without even having time constraints. There’s none of the usual funny business that vendor-centric exams (viz. Microsoft and Cisco) are known to have. I attribute this to CWNP being a vendor neutral organization and the fact that they actually stick to their claims. They have so far stayed very true to their vendor neutrality, however that’s not to the exclusion of mentioning specific brand names in their study materials. After all, someone who is certified in a technology needs to have some familiarity with the vendor landscape to be considered proficient.

The Results:

I passed! I needed a 70% score and earned a 78%. I am required to pass with an 80% score or higher if I want to be eligible to become a CWNP trainer. I’ll need to request a retake if and when a training opportunity comes up, but that’s off in the distant future.

While I’m happy with the results, I’m unhappy with my subject matter knowledge. I was fully convinced that I had failed the exam by the last question. Passing is of little consolation to me if I don’t know the subject as well as I should. Perhaps I got lucky on a few answers. My plan is to take a break this week as I travel up to Colorado for a client (in fact, I’m there right now; this post was written and scheduled on the night of Friday the 14th, the same day that I passed the exam). I may take a second week to stay away from the subject. I might even dive into a different subject for about a month to get some healthy brain-distance between Wi-Fi and myself. However, before the year is out I’m going to return to this study guide and the questions and grind it to pulp as I squeeze out as much information as I can.

My further plans are to gain some of the CWNP’s Professional level certifications (the third of four tiers; my CWNA being the second tier and the CWNE being the fourth and final tier). I’m intrigued by the Certified Wireless Design Professional (CWDP) as I learn more about the deeper design principles of wireless networks. Also, the Certified Wireless Analysis Professional (CWAP) is valuable as I research the finer points of site surveys and electromagnet wave propagation at clients’ sites. At that point, I might as well jump into the final P-level certification: the Certified Wireless Security Professional (CWSP). Everyone is concerned with Wi-Fi security, or at least should be, and regardless of peoples’ concerns, I need to be intimately familiar with securing my designs. If I’m going to be learning all of the above topics, I might as well get a pretty new logo to print on my business cards!

If you work with wireless networks and want to know more, regardless of your stance on certifications or your desire for a new one, at least consider reading the Sybex CWNA exam preparation book. It’s top notch. If you want to go further, I’d encourage you to earn the CWNA certification. It’s a legit credential that appears to be well accepted and respected among hiring managers and other decision makers.

And if you’re in the market for a wireless network consultant (among other things that I’m proficient at), HOLLAH! =)

17OCT
0
Tweet

Scumbag Wireless Neighbors

Posted in: Humor
  |  by: Wesley David

 

This is Scumbag Steve, for the uninitiated (AKA non-Redditors).

14OCT
2
Tweet

How to Find a Linux Partition’s Filesystem Type

Posted in: SysAdmin
  |  by: Wesley David
Tags: Linux

Certainly this is a most basic task, but I am a most basic Linux user. There will come a time when you want to find out what filesystem a partition has on it. There are two types of partitions. Those that are mounted and those that are not. I’ll deal with those two main categories and the different ways you can handle them.

Mounted Filesystems and the ‘df’ Command

To find the filesystem type of a mounted partition, use the GNU df command with the -T option. Why did I specifically mention that the command has to be the GNU variety? Because the granddaddy UNIX version  doesn’t have the -T option which outputs the filesystem of the partitions. If you’re running HP-UX you’re most likely out of luck with the df command. Here’s the output on a CentOS VPS I tinker with:

root@myserver [/]: df -T
Filesystem    Type   1K-blocks      Used Available Use% Mounted on
/dev/sda1     ext3    30963708   6571772  22819072  23% /
none         tmpfs      393216         0    393216   0% /dev/shm
/usr/tmpDSK   ext3      495844     13065    457179   3% /tmp

Mounted Filesystems and the ‘mount’ Command

You can also simply run the “mount” command without any options (which is in reality running the -l option to list all mounted filesystems). Here’s the output of the “mount” command from the same VPS as above:

root@myserver [/]: mount
/dev/sda1 on / type ext3 (rw,usrquota)
proc on /proc type proc (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
none on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/usr/tmpDSK on /tmp type ext3 (rw,noexec,nosuid,loop=/dev/loop0)
/tmp on /var/tmp type none (rw,noexec,nosuid,bind)

Furthermore you can choose to list out only those mounted filesystems of a certain filesystem type using the -t option. For example:

root@myserver [/]: mount -t ext3,tmpfs
/dev/sda1 on / type ext3 (rw,usrquota)
none on /dev/shm type tmpfs (rw)
/usr/tmpDSK on /tmp type ext3 (rw,noexec,nosuid,loop=/dev/loop0)

The above is the same as performing mount | egrep “ext3|tmpfs”

Mounted Filesystems and the fdisk Command

fdisk is a scary thing to wield when you realize the power that lies within. However, the -l option puts a ring in its nose so you can lead it around harmlessly. The -l option lists out a ton of informatoin about the partitions that are mounted. So much so that it can become a bit overwhelming to parse through. You’ll be happy if you know a bit about how to use grep. Fortunately, the server I’m using in this example doesn’t have many partitions:

Disk /dev/sda1: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
Disk /dev/sda1 doesnt contain a valid partition table
 
Disk /dev/sda2: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
Disk /dev/sda2 doesnt contain a valid partition table

Mounted Filesystems and the ‘mtab’ File

You could cat out the contents of the mtab file to see the status of currently mounted filesystems including their filesystem.

root@myserver [/]: cat /etc/mtab
/dev/sda1 / ext3 rw,usrquota 0 0
proc /proc proc rw 0 0
none /dev/pts devpts rw,gid=5,mode=620 0 0
none /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
/usr/tmpDSK /tmp ext3 rw,noexec,nosuid,loop=/dev/loop0 0 0
/tmp /var/tmp none rw,noexec,nosuid,bind 0 0

Mounted Filesystems and the ‘/proc/mounts’ file

The /proc/mounts file is very similar to the ‘mtab’ file, but is supposedly more up to date. In fact, some people symlink /etc/mtab to /proc/mounts. Cat it out and compare it to the mtab file if you’d like.

Unmounted Filesystems and the ‘mount’ Command

If you have a drive that is not mounted, and want to know what the filesystem is, short of using some forensic analysis tools, you’ll need to actually mount the device. When given a block device and not passed any filesystem types, mount is run in ‘auto’ mode and will attempt to discern what filesystem is on the device. Apparently it will first try to mount it as one of the filesystems in /etc/filesystems. If that fails, it then tries all filesystems that are located in /proc/filesystems (quite an array!). The /proc/filesystems file is all of the filesystems that the kernel knows about including any modules that are loaded.

Once the drive is mounted, you can then run any of the above commands to find its exact filesystem. If mount wasn’t able to discern what filesystem was on the drive, you’ll need to perform some kind of offline analysis of the drive which that is beyond the scope of this post.

Unmounted Filesystems and the ‘fstab’ file

If you have a disk that usually auto-mounts but is not currently connected, you can still check to see what the filesystem is at least expected to be when it is available to mount. Look in the fstab file:

root@myserver [/]# cat /etc/fstab
/dev/sda1        /             ext3     defaults,usrquota       1 1
/dev/sda2        swap          swap     defaults       0 0
none             /dev/pts      devpts   gid=5,mode=620 0 0
none             /dev/shm      tmpfs    defaults       0 0
proc             /proc         proc     defaults       0 0
/usr/tmpDSK             /tmp                    ext3    defaults,noauto        0 0
/tmp             /var/tmp                    ext3    defaults,usrquota,bind,noauto        0 0

Notice that this only works if the disk that you are interested in is set to auto-mount when your Linux machine boots. If you look above at my example, my sda2 partition is in the fstab file but not the mtab file. Sda2 is not connected but I can still tell what the filesystem is expected to be when it is available to mount; the swap filesystem.

Fin!

That’s all of the ways that I’ve been using to find out a partition’s filesystem type. I’m still a bit skittish about using fdisk and cfdisk to check filesystems, but I tend to shy away from using potentially destructive commands for information gathering. =) I also heard it was possible to use ‘blkid’ to find a block device’s filesystem, but was not able to get that to work. What other ways do you know? Add your preferred methods in the comments below and I’ll periodically update the blog post with the information.

11OCT
8
Tweet

What is the Difference Between fsck, fsck.ext2, fsck.ext3, fsck.ext4 and e2fsck? Not much.

Posted in: SysAdmin
  |  by: Wesley David
Tags: Linux

Recently I had a little issue with my laptop’s filesystem. I’m running Fedora 14 with ext4 partitions and had to run fsck to clear it up. Or at least, I had to run some mutation of fsck. The plethora of options that were available to me made my head spin. Let’s take a look at the typical options that are available to someone running a Red Hat implementation of Linux that uses an ext file system:

  • fsck
  • e2fsck
  • fsck.ext2
  • fsck.ext3
  • fsck.ext4

I know that I have a ext4 filesystem, so I probably want to stay far away from the other fscks, right? Let’s find out.

Disclaimer!

Before I go any further, let me disclaim my findings, assumptions and conclusions by saying that as of the writing of this post I am new to the Linux operating system. I have only been running it as my main OS for about six months with sparing exposure to it for just a few years prior to that. While I’ve had some great teachers and resources to draw on, I’m still a Linux nublet and what I am about to say may or may not be entirely accurate. I’ve done the best research that I can do at this point in my career, but if anyone has better insight into the topic please straighten me out in the comments below, an email or a blog post.

Furthermore, my findings are those of someone running a Red Hat / RPM based OS. Red Hat seems to do their own thing sometimes (great, I’ve switched from a Microsoft OS to the Linux version of a Microsoft OS!) and that can cause some huge YMMV moments.

If you tie your system into a knot as a result of anything I’ve said in this post, I’m truly sorry about that, but you have been warned. Your mileage may vary, read the fine manual and the picture on the box is enlarged to show texture.

You are in a Maze of Twisty little Passages, All Alike

Or at least, that’s what it felt like as I tried to unravel this mystery. Let’s take a look at some of the evidences that I discovered in my search to find out the difference between the various fsck commands.

Hammering out Hardlinks

The first thing to do is find which programs are identical. There’s no point in doing any other comparisons on programs that are duplicates. e2fsck, fsck.ext2, fsck.ext3 and fsck.ext4 are all hardlinks to the same inode. They are the same file. However, fsck is a different file with no hardlinks. It’s its own command that can be found nowhere else.

When referring to the family of hardlinked fscks, I’ll simply refer to e2fsck alone since that seems to be the more common command that can be found on all Linux distributions. fsck.ext[2-4] seem to be Red Hat permutations that are included for policy reasons. Something about incompatible binaries.

Sifting through Symlinks

None of the fsck commands listed above are symbolic links, however I found two commands in the extended fsck family that are. I’ll include them here for thoroughness. fsck.msdos and fsck.vfat are both symbolic links to dosfsck. Fortunately for me, I’m not going to be bothering with those mutations of the fsck gene pool.

Hunting Down Help

In spite of some clarity being added to the sitution by the above link sleuthing, some confusion is injected when looking at fsck’s command help:

[Me@MyPC ~]$ fsck help
fsck from util-linux-ng 2.18
Usage: fsck.ext4 [-panyrcdfvtDFV] [-b superblock] [-B blocksize]
		[-I inode_buffer_blocks] [-P process_inode_size]
		[-l|-L bad_blocks_file] [-C fd] [-j external_journal]
		[-E extended-options] device

Wait, did you see what I saw? “Usage: fsck.ext4″ – okay, so why is fsck apparently fsck.ext4 in disguise? Why, if fsck isn’t hardlinked to anything, does it seem to think it’s fsck.ext4? As of this post, I don’t have an answer to those questions. My only clue is from the answer to a question I asked over at unix.stackexchange.com.

Apparently Red Hat based distributions are a bit unique as a result of RH’s insistence on consistency and compatibility. (Or as I seem to recall a Slackware fan saying once: “If you learn Red Hat you know Red Hat. If you learn Slackware you know Linux.”) Nothing in that Stack Exchange post said anything about fsck being replaced by Red Hat’s preferred binary, but the situation leads me to believe that Red Hat may have replaced the fsck command with their own preferred version. Perhaps. This is all very foggy to me and I’m still seeking answers.

e2fsck’s help simply states that is is… well… e2fsck. At least that’s not an additional quandary to have to figure out.

Measuring Man Pages

In essence we only have two fscks to deal with: fsck itself and e2fsck. (I’ll ignore the strange “fsck thinks it’s fsck.ext4″ drama for now) diff’ing the two man pages comes up with some interesting information. Here are some points that I came away with from the comparison:

  • e2fsck is part of the e2fsprogs package and fsck is part of the util-linux-ng package.
  • e2fsprogs is maintained by Theodore Tso and in spite of the name it works on ext2, 3 and 4.
  • fsck is also apparently authored by Theodore!
  • The util-linux-ng tools can be found at kernel.org.
  • Both projects are apparently kept up to date and maintained, both having been updated in late 2010 as of the writing of this blog post.
  • According to the man pages, fsck does not appear to be able to perform any actions on superblocks where e2fsck can. However, on my Fedora system fsck’s ‘help’ command makes mention of superblock parameters. Then again, it also says the it’s fsck.ext4 which is really e2fsck.
  • fsck appears to be able to pass filesystem specific checkers some data. e2fsck does not seem to have that ability.
And most importantly:
  • fsck and e2fsck are similar but different in their options. Be careful if you frequently interact with both.
I have not yet attempted to make a full comparison of the two concerning their differing options. That would be quite a study and while I’d love to dive into it, I think it will have to wait for another day. e2fsck seems to have more options, including extended options like frag checking, external journal support and timing statistics among others.

I also noted that the fsck binary is considerably smaller (30K) than the e2fsck binary (190K).

So What do I Use on my Filesystem?!

Let’s get one thing straight: fsck and e2fsck (and thereby any fsck.ext* permutation) can handle ext2, 3 and 4. So I feel confident in saying that you’re safe using either command on any ext-based filesystem. If you need to muck about with superblocks, e2fsck seems to be the tool for you. In fact if you need any of the other features that e2fsck uses, then you know what to use. Which features are those? You’ll have to research those differences on your own.

Personally, I now use e2fsck for everything ext related. It seems to be the best tool with the most options that is linked to by most other ext based filesystem commands.

What’s the deal between all the different hard links and the help of fsck showing that it thinks it’s fsck.ext4 (which is really e2fsck)? I have no idea. If you have better insight into the situation, I’d be very grateful for any kind of clue thrown my way. If you’d like to, you can head on over to the unix.stackexchange.com question that I asked and possibly garner some points for an additional answer. Or you could ask your own question and then answer it (since this article goes in a different direction than that specific question). Of course guest posts on my blog are welcomed or links to your own blog post on the topic are available.

Oh, and I’m rather proud that I made a whole post about fsck and didn’t once make a tawdry joke implying it’s visually similar cousin. =)

7OCT
0
Tweet
Page 11 of 24 «...910111213...»

Advertisements


Follow This Blog





Want to have these posts emailed to you? Enter your email address here. Google Feedburner takes care of the rest!



Delivered by FeedBurner

Learn More About Me!

Contact Me!

Talentopoly Jobs:


The Nubby Archives

  • [-] 2013 (16)
    • May (2)
    • Apr (5)
    • Mar (5)
    • Jan (4)
  • [+] 2012 (77)
    • Dec (1)
    • Nov (5)
    • Oct (14)
    • Sep (2)
    • Aug (1)
    • Jul (4)
    • Jun (5)
    • May (9)
    • Apr (11)
    • Mar (10)
    • Feb (8)
    • Jan (7)
  • [+] 2011 (73)
    • Dec (4)
    • Nov (7)
    • Oct (6)
    • Sep (11)
    • Aug (9)
    • Jul (6)
    • Jun (3)
    • May (1)
    • Apr (8)
    • Mar (5)
    • Feb (5)
    • Jan (8)
  • [+] 2010 (71)
    • Dec (6)
    • Nov (3)
    • Oct (4)
    • Sep (14)
    • Aug (2)
    • Jul (4)
    • Jun (14)
    • May (19)
    • Apr (5)

Be Social!

Circle me!





profile for WesleyDavid on Stack Exchange, a network of free, community-driven Q&A sites

Copyright © 2011
Top