Friday, January 31, 2014

How to extend/resuce /fra file system?

How to extend/resuce /fra file system?

1. The pvcreate command initializes a disk or partition as a physical volume for use with the volume manager.
   When using whole disks you don't need any special preparation.

# pvcreate /dev/xvdd
# vgextend vg_knaalpha /dev/xvdd
# vgdisplay -v vg_knaalpha


2. When using partitions, the system id of the partitions should be set to "Linux LVM" (8e).

# parted /dev/xvdd
(parted) mklabel gpt
(parted) mkpart FRA 0GB 600GB
(parted) print
Model: Xen Virtual Block Device (xvd)
Disk /dev/xvdc: 1797GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size   File system  Name       Flags
 1      1049kB  600GB   600GB               FRA

(parted) q
#
# pvcreate /dev/xvdd1
# vgextend vg_knaalpha /dev/xvdd1
# vgdisplay -v vg_knaalpha


3. The size of a specified logical volume can be safely increased using the lvextend command.

# lvextend --size 600G /dev/vg_knaalpha/lv_fra
  Extending logical volume lvol0 to 600.00 GiB
  Logical volume lv_fra successfully resized
#


4. You can then extend the file system on the logical volume using the resize2fs command.
   The following example shows the file system being extended twice. The first time to 1500M,
   only using part of the logical volume, then to fill the logical volume.

# resize2fs /dev/vg_knaalpha/lv_fra
resize2fs 1.41.12 (17-May-2010)
Resizing the filesystem on /dev/vg_knaalpha/lv_fra to xxxxxxx (xk) blocks.
The filesystem on /dev/vg_knaalpha/lv_fra is now xxxxxxx blocks long.
#

How to Extend/Reduce LVM (Logical Volume Management) in Linux


/dev/mapper/vg_knaalpha-lv_grid         40G   11G   28G  28% /oracle_grid

# umount /oracle_grid
# e2fsck -ff /dev/mapper/vg_knaalpha-lv_grid
# resize2fs /dev/mapper/vg_knaalpha-lv_grid 20G

# lvreduce -L -20G /dev/mapper/vg_knaalpha-lv_grid
# lvextend -L+20G /dev/mapper/vg_knaalpha-lv_app
# resize2fs /dev/mapper/vg_knaalpha-lv_app

# mount -a
or
# mount /dev/mapper/vg_knaalpha-lv_grid /oracle_grid

Monday, December 16, 2013

How to install a printer on Linux?

How to install a printer on Linux?

Starting the Printer Configuration Tool


With the Printer Configuration tool you can perform various operations on existing printers and set up new printers. However, you can use also CUPS directly (go to http://localhost:631/to access CUPS).
On the panel, click System → Administration → Printing, or run the system-config-printer command from the command line to start the tool.
he following types of print queues can be configured:
  • Locally-connected — a printer attached directly to the computer through a parallel or USB port.
  • Networked CUPS (IPP) — a printer that can be accessed over a TCP/IP network via the Internet Printing Protocol, also known as IPP (for example, a printer attached to another Red Hat Linux system running CUPS on the network).
  • Networked UNIX (LPD) — a printer attached to a different UNIX system that can be accessed over a TCP/IP network (for example, a printer attached to another Red Hat Linux system running LPD on the network).
  • Networked Windows (SMB) — a printer attached to a different system which is sharing a printer over a SMB network (for example, a printer attached to a Microsoft Windows™ machine).
  • Networked Novell (NCP) — a printer attached to a different system which uses Novell's NetWare network technology.
  • Networked JetDirect — a printer connected directly to the network through HP JetDirect instead of to a computer.
/usr/sbin/cupsenable



Linux (CUPS) Spooler Commands

  • To view the status of all print queues:
  • lpc status
  • To check the status of a single print queue and view a list of pending jobs:
  • lpc status lp1
  • lpstat -P lp1
  • lpstat -plp1
  • To remove a single print job:
  • cancel lp1-1234
  • To remove all print jobs in a queue:
  • cancel -a lp1
  • To enable  a queue:
  • cupsenable lp1
  • To disable a queue:
  • cupsdisable lp1
  • To enable all queues:
  • lpstat -p | grep disabled | awk '{print $2}' | xargs cupsenable
  • To print a test job:
  • echo test | lpr -P lp1
  • To restart/refresh the cups service:
  • service cups restart

Monday, November 25, 2013

HP 9000 Servers - HP-UX Command to Check System for 32/64 Bit Configuration

HP 9000 Servers - HP-UX Command to Check System for 32/64 Bit Configuration

Issue

The document contains information on the HP-UX command that checks the system for 32 bit or 64 bit configuration.

Solution

To check the CPU Hardware Support, use the following:

# getconf HW_CPU_SUPP_BITS  
32    
The result will be 32 , 32/64 or 64.
To check the Kernel Support, use the following:

# getconf KERNEL_BITS  
32    
It shows that the system has a 32 bit CPU and running on a 32 bit Kernel.

Friday, November 22, 2013

Linux NFS Server Configuation

Linux NFS Server Configuation

NFS Server Configuration File

The /etc/exports file controls which file systems are exported to remote hosts and specifies options. Blank lines are ignored, comments can be made by starting a line with the hash mark (#), and long lines can be wrapped with a backslash (\). Each exported file system should be on its own individual line, and any lists of authorized hosts placed after an exported file system must be separated by space characters. Options for each of the hosts must be placed in parentheses directly after the host identifier, without any spaces separating the host and the first parenthesis.
A line for an exported file system has the following structure:
<export> <host1>(<options>) <hostN>(<options>)...

For example, the following two lines do not mean the same thing:
/home bob.example.com(rw)
/home bob.example.com (rw)

The first line allows only users from bob.example.com read/write access to the /home directory. The second line allows users frombob.example.com to mount the directory read-only (the default), but the rest of the world can mount it read/write.

Starting and Stopping NFS

To run an NFS server, the portmap service must be running. To verify that portmap is active, type the following command as root:
# /sbin/service portmap status
To stop the server, as root type:
# /sbin/service nfs stop

The restart option is a shorthand way of stopping and then starting NFS. This is the most efficient way to make configuration changes take effect after editing the configuration file for NFS.
To restart the server, as root type:
# /sbin/service nfs restart
The condrestart (conditional restart) option only starts nfs if it is currently running. This option is useful for scripts, because it does not start the daemon if it is not running. 
To conditionally restart the server, as root type:
# /sbin/service nfs condrestart

To reload the NFS server configuration file without restarting the service, as root type:
# /sbin/service nfs reload

Monday, November 18, 2013

Enable or Disable an Iptables Firewall in RedHat

Enable or Disable an Iptables Firewall in RedHat


To start iptabes on your RedHat server:
# service iptables start

To stop iptabes on your RedHat server:
# service iptables stop

To save your iptables configuration so that it is loaded again on the next reboot:
# service iptables save

To start iptables on boot:
# chkconfig iptables on

Friday, November 15, 2013

How to use yum?

How to use yum?

Displays a list of packages that need to be updated:
# yum check-update

Install these updates:
# yum update

List all available packages:
# yum list available
# yum list available "package-name"

List all installed packages:
# yum list installed

Install the specified RPM or packages via RHN:
# yum install package-name
# yum install httpd

Remove the specified RPM(s) and it's dependents:
# yum remove package-name
# yum remove httpd

HP 9000/800/L3000-8x - Disk Module LEDs

HP 9000/800/L3000-8x - Disk Module LEDs





  DAILY CHECKLIST Oracle Database instance is running or not select name,open_mode from V$database; Note: Check the Oracle databases are ru...