EXTENDING EXISTING FILE SYSTEMS ONLINE IN HP-UX

EXTENDING EXISTING FILE SYSTEMS ONLINE IN HP-UX

April 05, 2011

EXTENDING ONLINE JFS FILESYSTEMS
If you want to extend /usr from 300MB to 600MB, and there is available space, do the following:
              
1. Determine lvol # of /usr. Type: 

#bdf

Make note of the lvol that is mounted to /usr.

2. Increase lvol6 to 600MB:  
/sbin/lvextend -L 600 /dev/vg00/lvol6 (-L is new size in MB)


3. Extend the file system using OnlineJFS:         
#/sbin/fsadm –F vxfs –b 600m /usr (m is for MB)


In this example you want to extend /usr from 300MB to 600MB but there is no available space in the volume group that the /usr filesystem is on. In this case you would 
extend the volume group, then the logical volume, and finally the filesystem.

1. If adding disk online (disk array), create device files:   

#insf –e   (verify  #ioscan –fnC disk) 


2. Prepare disks for Logical Volume Manager (LVM) structures:    
#pvcreate /dev/rdsk/???


3. Make space available for volgroup:     
#vgextend /dev/vg00 /dev/dsk/c?d?s?


4. Increase lvol6 to 600MB:  
/sbin/lvextend -L 600 /dev/vg00/lvol6 (-L is new size in MB)


5. Extend the file system using OnlineJFS:         
#/sbin/fsadm –F vxfs –b 600m  /usr  (m is for MB)

EXTENDING EXISTING FILE SYSTEMS (If Non ONLINE JFS)

If you want to extend /usr from 300MB to 600MB, and there is available space, do the following:
  a. Determine lvol # of /usr. Type:

#bdf

Make note of the lvol that is mounted to /usr. 
b. Unmount the file system.
    
#umount /usr      

If you run into problems you may have to boot into single user mode, or you may need to kill all processes associated with /usr.

#fuser –k /usr

c. Increase lvol6 to 600MB: 

#/sbin/lvextend -L 600 /dev/vg00/lvol6

d. Resize the file system to size of lvol6          
#/sbin/extendfs /dev/vg00/rlvol6

e. Now mount the file system:           
#/sbin/mount /dev/vg00/lvol6 /usr

f. Make sure changes took effect using bdf.

g. If you are in single user mode, type the following to get to run-level 3:

#init 3
         
CREATING A BOOT DISK – ROOT VOLUME in HP-UX SERVER

CREATING A BOOT DISK – ROOT VOLUME in HP-UX SERVER

April 05, 2011
CREATING A BOOT DISK – ROOT VOLUME in HP-UX SERVER 


1. First create a bootable logical volume disk. 
#pvcreate –B /dev/rdsk/c0t1d0  


2. Add the PV to vg00. 
#vgextend /dev/vg00 /dev/dsk/c0t1d0
 

3. Place Boot Utilities on disk:   
#mkboot /dev/rdsk/c0t1d0 


4. Add the AUTO File to the LIF area:  
#mkboot –a “hpux –lq (;0)/stand/vmunix” /dev/rdsk/devicefile 
HP-UX  -  MIRRORING ROOT VOLUME

HP-UX - MIRRORING ROOT VOLUME

April 05, 2011
MIRRORING THE ROOT VOLUME 


1. First create a bootable logical volume disk. 



2. Mirror the root logical volume to new disk: 
#lvextend –m 1 /dev/vg00/lvol1 /dev/dsk/c0t1d0 


3. Mirror the Primary Swap area: 
Lvextend –m 1 /dev/vg00/prswaplv /dev/dsk/c0t1d0 


4. Verify the LVM was updated: 
#lvlnboot –v 


BREAKING A MIRROR FOR BACKUP PURPOSES 


Mirrors are created and broken from an lvol level. Remember this. If you want to break the mirror for /dev/vg00/lvol1 which may be mounted at / do the following: 


#lvsplit /dev/vg00/lvol1      
This will by default create a
new, unmounted lvol called lvol1b. You could also do the following: 


#lvsplit –s backup /dev/vg00/lvol1    
This does the same, but names it lvol1backup  
Mount the new lvol to what ever you want, and back it up. 


REMIRRORING AFTER BACKUP 

After you are finished, you must remirror and sync with existing and new data created on The active mirror.  Use this command (using the lvol1b from example above): 
#lvmerge /dev/vg00/lvolb /dev/vg00/lvol1 


REMOVING A MIRROR (SO YOU CAN PULL A DRIVE) 


1. You must first remove the association between each lvol associated with the drive. Use the following command to view the current mirrored lvol’s: 
#lvlnboot –v 


2. Break the mirror and remove the pv/lvol association for each lvol. 
This example removes PV /dev/dsk/c1t0d0 from /dev/vg00/lvol2, and lvol3. Assuming that there was only 1 other disk in the mirror set: 


#lvreduce –m 0 /dev/vg00/lvol2 /dev/dsk/c1t0d0
#lvreduce –m 0 /dev/vg00/lvol3 /dev/dsk/c1t0d0 
Network management - HPUX

Network management - HPUX

April 04, 2011

Network management - HPUX

To display the network interface cards and status
# lanscan  Hardware Station        Crd  Hdw   Net-Interface    NM   MAC       HP-DLPI DLPI  Path     Address        In#  State NamePPA          ID   Type      Support Mjr#  0/0/0/0  0x00306E1CC281 0    UP    lan0 snap0       1    ETHER       Yes   119  1/12/0/0 0x00306E210F32 3    UP    lan3 snap3       2    ETHER       Yes   119 
To configure the NIC cards such as speed, MTU, etc..
# lanadmin (it is a interactive tool) 
To find out the speed of duplex setting of lan0
# lanadmin -x 0  Speed = 1000 Full-Duplex.  Autonegotiation = On. 
To list all the configured interfaces and IP addresses
# netstat -in 
To force HP-UX to use specific interface card
# traceroute -i lan2 10.20.30.40  
HP-UX stores network interface configuration information on /etc/rc.config.d/netconf file
# cat /etc/rc.config.d/netconf  HOSTNAME="it-hp49"  OPERATING_SYSTEM=HP-UX  LOOPBACK_ADDRESS=127.0.0.1  INTERFACE_NAME[0]="lan0"  IP_ADDRESS[0]="216.131.195.137"  SUBNET_MASK[0]="0xffffff00"  BROADCAST_ADDRESS[0]="216.131.195.255"  INTERFACE_STATE[0]=""  DHCP_ENABLE[0]=0   ROUTE_DESTINATION[0]="default"  ROUTE_MASK[0]=""  ROUTE_GATEWAY[0]="216.131.195.10"  ROUTE_COUNT[0]="1"  ROUTE_ARGS[0]="" 
To add a alias address to lan0, add the network information to /etc/rc.config.d/netconf file
INTERFACE_NAME[0]=lan0:1  IP_ADDRESS[0]=216.131.195.138  SUBNET_MASK[0]=255.255.255.0  BROADCAST_ADDRESS[0]=""  INTERFACE_STATE[0]=""  DHCP_ENABLE[0]=0  INTERFACE_MODULES[0]="" 
Restart the network service
/sbin/init.d/net start 
Network Tracing and Logging
The nettl command is a tool used to capture network events or packets. 
Initialize the tracing/logging facility:
# nettl -start 
Display the status of the tracing/logging facility.
# nettl -status all 

nwmgr (Network Interface Management)

The nwmgr program is the unified command to administer all HP-UX LAN and RDMA interfaces. This command can be used to:
  • Display information of an interface
  • Modify settings of an interface
  • Reset the interface or its statistics
  • Diagnose link connectivity
  • Create and set configuration information for a component simultaneously
  • Delete or erase components
# nwmgr   Name/          Interface Station          Sub-   Interface      Related ClassInstance  State     Address        system   Type           Interface ============== ========= ============== ======== ============== ========= lan2           DOWN      0x001A4B096828 iether   1000Base-T lan0           UP        0x001A4B097F9A iether   1000Base-T lan1           DOWN      0x001A4B097F9B iether   1000Base-T 
# nwmgr --help -S all  # lists all the subsystems  # nwmgr --help -S subsystem # display subsystem specific usage 
To View Interface attributes
# nwmgr  -A all -c lan0 lan0 current values:    Link State = Up    Speed = 1 Gbps Full Duplex (Autonegotiation : On)    MTU = 1500    MAC Address = 0x001a4b097f9a    Receive Flow Control = On    Transmit Checksum Offload = Off    Receive Checksum Offload = Off    Virtual MTU = 0       TCP Segmentation Offload is now disabled.    Max Send Buffers = 1    Max Send Coalesce Ticks = 150    Max Recv Buffers = 1    Max Recv Coalesce Ticks = 0    Interrupt Throttle Mode = -1    Diagnostics Threshold = 0    512byte transmit buffer size limit = 0
To get interface statistics for interface lan0
# nwmgr --st all -c lan0 
To View interface details
# nwmgr -q info -c lan0 
To get interface vital product data
# nwmgr -q vpd -c lan0 
To set interface attributes
# nwmgr -s -A attr1-value, attr2=value ... -c lan0 
Reset statistics for an interface
# nwmgr -r --st -c lan 
Some nwmgr Syntax and their Equivalent lanadmin and linkloop Syntax are given bellow
nwmgr -S vlan
lanadmin -V scan nwmgr -c lan5000
lanadmin -V info 5000 nwmgr -a -S vlan -A vlanid=10, ppa=1
lanadmin -V create vlanid 10 1 nwmgr -s -c lan5000 -A vlanid=20
lanadmin -V modify vlanid 20 5000 nwmgr -d -c lan5000
lanadmin -V delete 5000 nwmgr --cra -c lan5000
lanadmin -p 5000 nwmgr --diag -c lan5000 -A dest=0xaabbccddeeff linkloop -i 5000 0xaabbccddeeff

FreePrepaid MobileRecharge on Amulyam

FreePrepaid MobileRecharge on Amulyam

March 30, 2011
  Free Prepaid Mobile Recharge  
 

Amulyam.in gives you free prepaid mobile recharge to users of all Indian telecom operators for completing offers on it's sponsor's websites.

 
  Amulyam Free Recharge  
  Sign Up Now
 
   
 

You are invited to join Amulyam by Laxman. If you do not wish to receive this type of emails from Amulyam in the future, please click here to stop recieving any mails further.