System Administration

Adding a simple GUI to the console in Linux

There's probably a lot of scenarios in general Unix administration wherein you'd like to create a simple GUI for people to do tasks. This way you can give non-technical people the ability to do things like check printer queues or do add users or whatever. Obviously, writing a shell script with regular text output is one option, but the 'dialog' tool is another.

Useful VMWare Server console cli commands

There are some commands that come with VMWare Server that are useful for doing administration via the commandline. This is helpful when you can't connect via the console app and need to restart a vmware session.
Get a list of your vmware configs:

vmware-cmd -l

Get state of vmware server

vmware-cmd /config.vmx getstate

stop/start/suspend/reset

vmware-cmd /config.vmx start
vmware-cmd /config.vmx stop
vmware-cmd /config.vmx suspend
vmware-cmd /config.vmx reset

Adding a disk via CLI in VMWare Server

cd to where the .vmx (the vmware server config) is stored for the vm you want to add the disk to. Create the disk. vmware-vdiskmanager -h gives what the options are, and are pretty self-explanatory.

vmware-vdiskmanager -c -s 1Gb -a lsilogic -t 3 .vmdk

From what I can see, your VM must be running to do the next two
commands. (Even though if you do it through the console, you have to shut down your system)

Next, attach the disk image to the VM, in order to do this properly,you'll have to know which ID's are available on your scsi tree:

Create Raid-5 Set using md devices in Linux

In order to create a raid-5 set in Linux, you can do the following:

1. Create partitions using fdisk or parted on your disks. For Raid-5, you need at least 3. If you create the partitions with the type of 0xfd, you don't need to create a mdadm.conf file. mdadm -A -s is ran on system startup and automagically finds these things.
2. mdadm --create /dev/md0 --chunk=128 --level=5 --raid-devices=5 /dev/sd[b,c,d,e,f]1

3. Add the following lines to /etc/mdadm.conf:

DEVICE /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1

Using Logical Volume Management in Linux

I haven't done much with LVM in Linux. In Red Hat 4, it became possible to use it to manage your volumes. In Red Hat 5, it's the default method for dealing with disks. I've done a fair amount with Veritas Volume Manager (VxVM) under Solaris, however, it's been awhile. But, the concepts I learned under VxVM are similar to that of the Linux LVM.

One thing that appears to be different about Linux LVM vs VxVM is that LVM only creates raid 0/1 sets and NOT raid 5 sets. If you need Raid 5, you have to use a md device.However, md sets can create 0/1/5 raid sets.

The OSI Model

Here's the OSI Model in networking:

1. Application layer
2. Presentation layer
3. Session layer
4. Transport layer
5. Network layer
6. Data Link layer
7. Physical layer

Here's how I remember it:

1. A
2. Priest
3. Saw
4. Ten
5. Nuns
6. Doing
7. Pushups

I seem to remember it because it seems like it should be a dirty joke, even though it isn't.

Syndicate content