An updated version of 'getldp.pl', v0.1.7, is now available on the Tools
page. This update adds handling (long overdue) for reaping any child
processes getldp.pl might spawn while listening for CDP / LLDP packets.
Previously, if getldp.pl timed out and exited while waiting on data,
28 December 2011
11 December 2011
Manual P2V with Linux
We recently had a situation wherein we were replacing a physical host
with a virtual machine (VM) instance. Rather than simply install a
new VM and reapply software packages and configuration, the need was to
retain the existing installation. To do so, we effectively cloned the
with a virtual machine (VM) instance. Rather than simply install a
new VM and reapply software packages and configuration, the need was to
retain the existing installation. To do so, we effectively cloned the
Labels:
dumpe2fs,
linux,
recovery,
virtualization
10 December 2011
updated utility, getldp.pl v0.1.6
An updated version of 'getldp.pl', v0.1.6, is now available on the
Tools page. This version adds details of the sending host including
OS version (CDP only), device capabilities, and management address
(assuming those fields are in the CDP / LLDP packets):
Tools page. This version adds details of the sending host including
OS version (CDP only), device capabilities, and management address
(assuming those fields are in the CDP / LLDP packets):
Labels:
blog info
05 December 2011
NIC Replacement in Linux
In the past, I've found it slightly annoying that if I needed to swap
out a network interface card (NIC), Red Hat distros of Linux would kindly
backup the interface configuration for that interface and generate a stub
DHCP configuration in its place. This leaves the host potentially with
out a network interface card (NIC), Red Hat distros of Linux would kindly
backup the interface configuration for that interface and generate a stub
DHCP configuration in its place. This leaves the host potentially with
03 December 2011
Fixing a Broken initrd in Linux
I recently had a situation where a host's disk controller failed.
The box would get partially through a BIOS post before throwing errors
about the failed controller and then fail to boot. To resolve the
situation, we effectively replaced said controller. This, however, lead
The box would get partially through a BIOS post before throwing errors
about the failed controller and then fail to boot. To resolve the
situation, we effectively replaced said controller. This, however, lead
30 October 2011
Fixing an Overly Eager chown in Linux
A while ago, someone asked me how to recover from a mistyped recursive
'chown' they performed. They mistyped the path and it executed against
the root FS (/), though they caught it before it acted on everything.
Ideally, one would have a backup to recover from, however that wasn't
'chown' they performed. They mistyped the path and it executed against
the root FS (/), though they caught it before it acted on everything.
Ideally, one would have a backup to recover from, however that wasn't
27 September 2011
VxVM DG Disabled
During a recent SAN maintenance, we ran into an issue on a few hosts that
were unfortunately single pathed to the SAN and lost connectivity to it.
The SAN-presented disk devices were under Veritas Volume Manager (VxVM)
control which started to present I/O errors as a result and displayed
were unfortunately single pathed to the SAN and lost connectivity to it.
The SAN-presented disk devices were under Veritas Volume Manager (VxVM)
control which started to present I/O errors as a result and displayed
31 July 2011
Configuring iSCSI Initiators in Windows 2008
Since it's been a while since I've written up a Windows related post, I
thought I'd add one on setting up iSCSI initiators from the command line
(cli). (It also gave me a reason to toy around in PowerShell (PS).)
Microsoft makes iSCSI initiator software available for Windows 2000,
thought I'd add one on setting up iSCSI initiators from the command line
(cli). (It also gave me a reason to toy around in PowerShell (PS).)
Microsoft makes iSCSI initiator software available for Windows 2000,
24 July 2011
Process Memory Usage
Since resources on a host are finite, it can be useful to know the
impact of a process or processes on those resources. In this instance,
we'll take a look at a process' use of memory. Our details for this are:
impact of a process or processes on those resources. In this instance,
we'll take a look at a process' use of memory. Our details for this are:
12 July 2011
Notes on Packages in Solaris 11
While working out details for a separate write up, I started stumbling
through Solaris' new handling of packages, IPS. Unlike previous versions
of Solaris which used the traditional "pkgXYZ" commands, directory
structures, etc, IPS (image packaging system) uses a completely new
through Solaris' new handling of packages, IPS. Unlike previous versions
of Solaris which used the traditional "pkgXYZ" commands, directory
structures, etc, IPS (image packaging system) uses a completely new
06 July 2011
VLAN Tagging and Vanity Naming in Solaris 11
While awaiting Solaris 11 to be released, I've recently been poking
around in Solaris 11 Express for a preview of what to expect. In setting
up a test box, I needed to set up VLAN tagging (802.1q trunking) on
an interface. Due to some of the new Solaris 11 networking features,
around in Solaris 11 Express for a preview of what to expect. In setting
up a test box, I needed to set up VLAN tagging (802.1q trunking) on
an interface. Due to some of the new Solaris 11 networking features,
18 June 2011
Configuring iSCSI Initiators in Linux
In part 1, we worked through how to set up iSCSI targets in Linux
(the server side). Here, in part 2, are my notes on how to set up the
initiators in Linux (the client side). Our host details for this are
the same as part 1:
(the server side). Here, in part 2, are my notes on how to set up the
initiators in Linux (the client side). Our host details for this are
the same as part 1:
15 June 2011
Configuring iSCSI Targets in Linux
Since I've already been looking into iSCSI on Solaris, I thought I'd look
to see what Linux has to offer. While in comparison to Solaris I think
the Linux side could still mature a little, it still has potential and
a functional offering. The following is part 1 of my notes detailing
to see what Linux has to offer. While in comparison to Solaris I think
the Linux side could still mature a little, it still has potential and
a functional offering. The following is part 1 of my notes detailing
12 June 2011
Configuring iSCSI Initiators in Solaris
In part 1, we worked through how to set up iSCSI targets in Solaris
(the server side). Now, for part 2, I present my notes on how to set
up the initiators in Solaris on the client side. Our host details for
this are the same as part 1:
(the server side). Now, for part 2, I present my notes on how to set
up the initiators in Solaris on the client side. Our host details for
this are the same as part 1:
08 June 2011
Configuring iSCSI Targets in Solaris
While reviewing potential ideas for several environments, I started
looking into the use iSCSI as a means of providing remote storage.
With that in mind, this is part 1 of my iSCSI notes, detailing the
configuration of a test Solaris iSCSI target node which would provide
looking into the use iSCSI as a means of providing remote storage.
With that in mind, this is part 1 of my iSCSI notes, detailing the
configuration of a test Solaris iSCSI target node which would provide
26 May 2011
Replicating a ZFS FS Between Hosts
Occasionally, it can be useful to fully replicate a volume of data from
one host to another. Perhaps you need to mirror a production filesystem
(FS) for use in development, need a sane backup, etc. The following
describes one way of doing this using ZFS. Additionally, we're going
one host to another. Perhaps you need to mirror a production filesystem
(FS) for use in development, need a sane backup, etc. The following
describes one way of doing this using ZFS. Additionally, we're going
19 May 2011
Replacing a Failed SVM Disk
At some point, everyone deal's with a disk failure, as I had to do
recently. In this case, it was a root disk. Thankfully, however,
it was mirrored with SVM (Solaris Volume Manager). Unfortunately, disk
failures aren't the type of thing that should happen too frequently so
recently. In this case, it was a root disk. Thankfully, however,
it was mirrored with SVM (Solaris Volume Manager). Unfortunately, disk
failures aren't the type of thing that should happen too frequently so
16 May 2011
Sending Messages to Users
Recently while working on a problem with someone else, I needed to have
them run a series of commands with specific options. Since we were
both working remotely, it wasn't as simple as telling them to look
over my shoulder. Though I tried telling them the commands over the
them run a series of commands with specific options. Since we were
both working remotely, it wasn't as simple as telling them to look
over my shoulder. Though I tried telling them the commands over the
16 April 2011
Enabling Local FS Quotas in Linux
Quotas allow you to limit the amount of space a user or group can use
and / or the number of files a user or group can create on a filesystem
(FS). The following shows how to set up these quotas and the expected
user experience. Our host details for this are:
and / or the number of files a user or group can create on a filesystem
(FS). The following shows how to set up these quotas and the expected
user experience. Our host details for this are:
07 April 2011
Granting Elevated Privileges in Solaris
root, root, root, everybody always wants root. Developers, application
administrators, users, they all seem to find a reason to "need" root
access. Since normally these needs are for access to particular files
or to perform very specific tasks, only a subset of root's access is
administrators, users, they all seem to find a reason to "need" root
access. Since normally these needs are for access to particular files
or to perform very specific tasks, only a subset of root's access is
Labels:
privileges,
rbac,
solaris
27 March 2011
Finding Open Files in Linux
Finding open files in Linux is quite similar to finding them in FreeBSD
and Solaris. Here, we'll specifically identify open files on a particular
filesystem (FS) within a Linux environment. Our host details this
time are:
and Solaris. Here, we'll specifically identify open files on a particular
filesystem (FS) within a Linux environment. Our host details this
time are:
25 March 2011
Finding Open Files in FreeBSD
Following up the same in Solaris, here's how to identify open files on
a particular filesystem (FS) in a FreeBSD environment. Our host details
for this are:
a particular filesystem (FS) in a FreeBSD environment. Our host details
for this are:
23 March 2011
Finding Open Files in Solaris
During a recent discussion, another sysadmin asked that I write him a
tool to identify any open files on a particular file system (FS) in a
Solaris environment. Rather than reinvent the wheel, I provided him
with the steps outlined here. Our host details are:
tool to identify any open files on a particular file system (FS) in a
Solaris environment. Rather than reinvent the wheel, I provided him
with the steps outlined here. Our host details are:
17 March 2011
updated utility, getldp.pl
An updated version of 'getldp.pl', v0.1.5, is now available on the
Tools page. This version now appropriately handles VLAN tagged (802.1q)
CDP packets and includes output for duplex, 802.1q priority, and VLAN ID
(assuming the fields are present in the CDP packets):
Tools page. This version now appropriately handles VLAN tagged (802.1q)
CDP packets and includes output for duplex, 802.1q priority, and VLAN ID
(assuming the fields are present in the CDP packets):
Labels:
blog info
14 March 2011
Converting inet_aton and inet_ntoa
At some point or another, you've probably stumbled upon the 'inet_aton'
and 'inet_ntoa' functions. Perhaps you have used them in programming,
or maybe for a MySQL statement, etc. Briefly, for those not familiar
with either function, 'inet_aton' takes an IP address (10.234.18.76) and
and 'inet_ntoa' functions. Perhaps you have used them in programming,
or maybe for a MySQL statement, etc. Briefly, for those not familiar
with either function, 'inet_aton' takes an IP address (10.234.18.76) and
Labels:
conversions,
network
03 March 2011
Configuring NFS in FreeBSD
Having written up Solaris and Linux, it's time to take a look at
configuring NFS in FreeBSD. Briefly, NFS (network file system) provides
access to remote filesystems which appear similar to local resources
on client hosts. The following focuses on simple NFS server and client
configuring NFS in FreeBSD. Briefly, NFS (network file system) provides
access to remote filesystems which appear similar to local resources
on client hosts. The following focuses on simple NFS server and client
27 February 2011
Configuring NFS in Linux
As a follow up to 'Configuring NFS in Solaris', we turn to the same
in Linux. Briefly, NFS (network file system) provides access to remote
filesystems which appear similar to local resources on client hosts.
The following focuses on simple NFS server and client configuration in
in Linux. Briefly, NFS (network file system) provides access to remote
filesystems which appear similar to local resources on client hosts.
The following focuses on simple NFS server and client configuration in
24 February 2011
File Integrity Checks via Package DB
After a system has been installed, files tend to change over time.
These changes may be deliberate, part of normal host operation, the
result of an errant 'chmod', etc. Tools like Samhain, AIDE, and Tripwire
(note 0) have been devised specifically to identify such changes which
These changes may be deliberate, part of normal host operation, the
result of an errant 'chmod', etc. Tools like Samhain, AIDE, and Tripwire
(note 0) have been devised specifically to identify such changes which
20 February 2011
Configuring NFS in Solaris
Networked environments allow for the sharing of many resources, including
filesystems (FS). As a long time industry standard in UNIX, NFS (network
file system) provides access to remote filesystems which appear similar
to local resources on client hosts. Since Sun Microsystems originally
filesystems (FS). As a long time industry standard in UNIX, NFS (network
file system) provides access to remote filesystems which appear similar
to local resources on client hosts. Since Sun Microsystems originally
17 February 2011
Network Ports and Processes (Windows)
Previously, I wrote up how to match open network ports to running
processes for FreeBSD, Solaris, and Linux. If UNIX hosts can correlate
ports to processes, shouldn't Windows Server be able to as well?
Beginning with Windows 2000, it can. Our host details for this are:
processes for FreeBSD, Solaris, and Linux. If UNIX hosts can correlate
ports to processes, shouldn't Windows Server be able to as well?
Beginning with Windows 2000, it can. Our host details for this are:
13 February 2011
new utility, basecon.pl
I've posted a new utility, basecon.pl, to the Tools page. basecon.pl is a simple utility that converts base inputs to selected base output. Currently, basecon.pl can accept input and output types of ascii, binary, decimal, hexadecimal, and octal. The following is sample output from basecon.pl:
user@host [0] basecon.pl -h
Labels:
blog info
03 February 2011
Static Routes in Linux
Nearly every UNIX sysadmin at some point will need to know how to manage
a host's routing table. With that in mind, here's how to manage static
routes on a Red Hat Linux clone. Our details for this are:
a host's routing table. With that in mind, here's how to manage static
routes on a Red Hat Linux clone. Our details for this are:
31 January 2011
Static Routes in FreeBSD
A friend of mine recently told me that while he appreciated the detail
and content of my writings, a good deal of the subject matter was a
little beyond him. In support of the fresh-faced sysadmins and those
that might be new to FreeBSD (we were all there once), this write up is
and content of my writings, a good deal of the subject matter was a
little beyond him. In support of the fresh-faced sysadmins and those
that might be new to FreeBSD (we were all there once), this write up is
29 January 2011
Breaking and Syncing an MD Root Mirror
Here's one of those times where I thought, "I wonder", as in I wonder if
I can break an MD root mirror and sanely recreate it. You can do so with
other software RAID solutions so why not here? Well, you can. There is
nothing short about this procedure, taking 80+ commands to accomplish.
I can break an MD root mirror and sanely recreate it. You can do so with
other software RAID solutions so why not here? Well, you can. There is
nothing short about this procedure, taking 80+ commands to accomplish.
23 January 2011
Creating an MD Root Mirror in Linux
For whatever reason, you originally set up your Linux host without a root
disk mirror and now you want it mirrored. One could say "just re-install,"
but surely there is another way, and there is. The solution isn't quick
or simple, though it isn't impossible. Our host details are:
disk mirror and now you want it mirrored. One could say "just re-install,"
but surely there is another way, and there is. The solution isn't quick
or simple, though it isn't impossible. Our host details are:
19 January 2011
Missing Linux inittab
Since I'm somewhat on a "break the boot process" kick, I've deliberately
removed '/etc/inittab' on a Linux host. As the following illustrates,
a missing 'inittab' really isn't as bad as it seems. Our details for
this setup are:
removed '/etc/inittab' on a Linux host. As the following illustrates,
a missing 'inittab' really isn't as bad as it seems. Our details for
this setup are:
17 January 2011
Missing GRUB Config in Linux
Having recently written up how to restore GRUB to a missing / corrupted
master boot record (MBR), it seemed appropriate to follow up with
resolving a missing GRUB config file. Our host details for this
situation are:
master boot record (MBR), it seemed appropriate to follow up with
resolving a missing GRUB config file. Our host details for this
situation are:
15 January 2011
Recreate a Linux EXT3 FS
We've looked at Solaris and FreeBSD, now it's time to look at recreating
a Linux EXT3 filesystem. Similar to the previous two, if you customized
the options to 'mke2fs / mkfs', 'mke2fs -n' is not the answer since it
will only produce data about generic FS creation. Our host details this
a Linux EXT3 filesystem. Similar to the previous two, if you customized
the options to 'mke2fs / mkfs', 'mke2fs -n' is not the answer since it
will only produce data about generic FS creation. Our host details this
13 January 2011
Recreate a FreeBSD UFS FS
As a follow up to recreating a Solaris UFS FS, the following details
FreeBSD. Just as with Solaris, when trying to determine how a filesystem
was created, 'newfs -N /dev/da2s1a' is not the answer, as it only produces
information relevant to a default FS creation. Our host details for this
FreeBSD. Just as with Solaris, when trying to determine how a filesystem
was created, 'newfs -N /dev/da2s1a' is not the answer, as it only produces
information relevant to a default FS creation. Our host details for this
11 January 2011
Recreate a Solaris UFS FS
Have you ever wondered what options were used to create a UFS filesystem
(FS) on a Solaris host? Normally when you ask that question, it
seems someone will refer you to passing '-N' to 'newfs'. Unfortunately,
this response will only provide you with default parameters to build a
(FS) on a Solaris host? Normally when you ask that question, it
seems someone will refer you to passing '-N' to 'newfs'. Unfortunately,
this response will only provide you with default parameters to build a
09 January 2011
Disk Cloning in Linux
A while back, I wrote up how to clone a disk in Solaris and in FreeBSD,
yet somehow managed to overlook writing up how to do so in Linux.
This write up is to rectify just that, how to clone a disk, in this case,
the root disk, in Linux. The following are our setup details:
yet somehow managed to overlook writing up how to do so in Linux.
This write up is to rectify just that, how to clone a disk, in this case,
the root disk, in Linux. The following are our setup details:
08 January 2011
GRUB, a Corrupted MBR, and Linux
Recently, after cloning a root disk in Linux, I ran into an issue because
I failed to setup the master boot record (MBR) on the alternate disk.
Everything else was configured, including the boot image files and grub
configuration under /boot/grub, but the MBR wasn't setup. The following
I failed to setup the master boot record (MBR) on the alternate disk.
Everything else was configured, including the boot image files and grub
configuration under /boot/grub, but the MBR wasn't setup. The following
07 January 2011
Adding Swap Space in Linux
We've discussed FreeBSD and Solaris, now it's time to have a look at
adding swap space in Linux. As previously handled, the setting up
of swap on a free disk partition or else a swap file is discussed.
The following details our example host:
adding swap space in Linux. As previously handled, the setting up
of swap on a free disk partition or else a swap file is discussed.
The following details our example host:
06 January 2011
Adding Swap Space in Solaris
Following up on "Adding Swap Space in FreeBSD", we take a look at the same
with Solaris. As in the FreeBSD writeup, the usage of a free disk slice
or else a swap file is discussed. The following details our host info:
with Solaris. As in the FreeBSD writeup, the usage of a free disk slice
or else a swap file is discussed. The following details our host info:
05 January 2011
Adding Swap Space in FreeBSD
While it shouldn't occur too frequently, it is likely at some point as a
sysadmin, you will need to add additional swap space to a box. At that
time, your options will be to use a free disk partition with suitable
space or to create a swapfile on an existing filesystem. The following
sysadmin, you will need to add additional swap space to a box. At that
time, your options will be to use a free disk partition with suitable
space or to create a swapfile on an existing filesystem. The following
01 January 2011
Mounting ISO Images
So you've created a fresh ISO image and now you want to use it, verify
its contents, etc. Whatever your purpose, it is fairly trivial to
mount the image file and access it. The following are our host details:
its contents, etc. Whatever your purpose, it is fairly trivial to
mount the image file and access it. The following are our host details:
Subscribe to:
Posts (Atom)