Feb 102008
 

This tutorial is for those Admins who need to setup serial console on there LINUX servers

Section-1

    • In this first part of of the how to I will show you how to setup serial console on a
      RedHat(Fedora,CentOS) based systems(Does work on other systems as well).

    • First step is to make sure you have a serial port.
    • Second step is to make sure you have a console cable. You can do this by running this..
      linuxdynasty.org]# dmesg |grep ttyS0
      ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
    • Once you verified you have the necessary hardware configuration,
      we are on to configuring the server.

    • Add this co:2345:respawn:/sbin/agetty ttyS0 9600 vt100-nav to /etc/inittab
      using your favorite editor. (mine is vi :) ) This is how mine looks like..
      # Run gettys in standard runlevels
      co:2345:respawn:/sbin/agetty ttyS0 57600 vt100-nav
      1:2345:respawn:/sbin/mingetty tty1
      2:2345:respawn:/sbin/mingetty tty2
      3:2345:respawn:/sbin/mingetty tty3
      4:2345:respawn:/sbin/mingetty tty4
      5:2345:respawn:/sbin/mingetty tty5
      6:2345:respawn:/sbin/mingetty tty6
    • Now it is time to edit /boot/grub.conf. These two entries need to be added into grub.conf
      serial –unit=0 –speed=57600
      terminal –timeout=5 serial console

      And append this to console=ttyS0,57600n8 to your kernel entry.

    • Here is the all in one solution..


      serial --unit=0 --speed=57600
      terminal --timeout=5 serial console
      title CentOS (2.6.9-55.0.2.EL)
      root (hd1,0)
      kernel /vmlinuz-2.6.9-55.0.2.EL ro root=/dev/VolGroup00/LogVol00 console=tty0 console=ttyS0,57600n8
      initrd /initrd-2.6.9-55.0.2.EL.img

    • Now reboot your server and from another box console in.

Section-2

    • Now we will show you how to setup a serial console for Ubuntu Feisty 7.0.4,
      (Reason I chose Feisty is that Feisty no longer uses the /etc/inittab .
      Instead uses upstart for its init functions)

    • First step, follow the First step in Section-1 of this tutorial.
    • Once you verified you have the necessary hardware configuration,
      we are on to configuring the server.

    • Add this exec /sbin/getty -L 57600 ttyS0 vt102 to /etc/event.d/ttyS0 (
      If this file does not exist please create it
      ) using your favorite editor. (mine is vi :) )
      This is how mine looks like..
      # tty0 - getty
      #
      # This service maintains a getty on tty1 from the point the system is
      # started until it is shut down again.

      start on runlevel 2
      start on runlevel 3
      start on runlevel 4
      start on runlevel 5

      stop on runlevel 0
      stop on runlevel 1
      stop on runlevel 6

      respawn
      exec /sbin/getty -L 57600 ttyS0 vt102
    • Now proceed to third step of Section-1 of this tutorial.

LVM2 How To

 Uncategorized  No Responses »
Feb 102008
 

Do you have the need for speed???… OK OK enough with the comments :P …Before reading this tutorial you should understand a little how LVM works

How to create a physical volume, volume group, and logical volume.

    • First thing we have to do is initialize the disk..

    • Figure out which disk and partitions you have that are being used df -h.
    • Now we need to run fdisk -l and see all the partitions, including the ones that we have that are not mounted up
    • Now that we know which disks and partitions that you can not destroy, we can start our process of creating lvm volumes.
    • Here we will start with the initialization of the lvm volumes.(Either we use the entire disk or a partition)Here we will show you on partitions.

    • Lets initialize the first partition..
      pvcreate /dev/sda1.
    • Now lets initialize the second partition..
      pvcreate /dev/sdb1.
    • To display info on the physical volume, just run this
      pvdisplay.
    • Now that both partitions have been initialized, it is time to create the volume group and activate it.

    • vgcreate linuxdynasty /dev/sda1 /dev/sdb1
    • vgchange -a y linuxdynasty
    • To display info on the volume group, just run this
      vgdisplay.
    • We have reached the final step (for the LVM part of it).

    • Now we create the logical volume.
      lvcreate -L10G -nHomeLV linuxdynasty
    • To display info on the logical volume, just run this
      lvdisplay.
    • Final steps, we need to make a file system on that volume and mount it.

    • First, we create the file system
      mkfs.ext3 /dev/linuxdynasty/HomeLV
    • Second, we mount the file system
      mount -t ext3 /dev/linuxdynasty/HomeLV /home

Warning: fopen(/home/dynasty/linuxdynasty.org/wp-content/plugins/wp-google-plus-one/lib/standard.txt) [function.fopen]: failed to open stream: No such file or directory in /home/dynasty/linuxdynasty.org/wp-content/plugins/wp-google-plus-one/plusone.php on line 104

Warning: fread(): supplied argument is not a valid stream resource in /home/dynasty/linuxdynasty.org/wp-content/plugins/wp-google-plus-one/plusone.php on line 105

Warning: fclose(): supplied argument is not a valid stream resource in /home/dynasty/linuxdynasty.org/wp-content/plugins/wp-google-plus-one/plusone.php on line 106
.