Skip to main content

Posts

Showing posts from 2009

Commands to restart RMC connection (t...

Commands to restart RMC connection (to HMC from LPAR) It has become very common with the IBM HMC to LPAR (logical/micro partition) communication to drop for unknown reasons.  Most of the time this is not a problem unless there is a need to do a dynamic logical partition operation (or DLAPR operation to add/remove resources on the fly).  This will become evident during the DLPAR operation when HMC complains about having no RMC connection to LPAR in operation.  When this happens run the following commands on the LPAR in question before reattemping the operation.  The DLPAR operation will still work with out this connection, but the LPAR needs a restart to see the change in the resources.  Restart the RMC connection on the LPAR: # /usr/sbin/rsct/install/bin/recfgct # /usr/sbin/rsct/bin/rmcctrl -p Verify the connection by running: lsrsrc IBM.ManagementServer This will show the HMC IP/hostname and the LPAR information.

RAM disk in AIX

RAM disk in AIX AIX provides 'mkramdisk' command for producing a disk that resides in the RAM for very high I/O intensive applications like database. Here is a simple set of commands to create a ramdisk and a filesystem on top of it: create a RAM disk specifying the size          # mkramdisk 5G The system will assign the available RAM disk.  Since this is the first one, it will be called as ramdisk0 Check for the new disk         # ls -l /dev | grep -i ram If there isn't sufficient available memory, the mkramdisk command will warn about the same during the creation. Create and mount a filesystem on top of the ram disk     # mkfs -V jfs2 -o log=INLINE /dev/ramdisk0     # mkdir -p /ramdisk0     # mount -V jfs2 -o log=INLINE /dev/ramdisk0 /ramdisk0 The new filesystem will now be available like any other FS.   To remove a ram disk, unmount/remove the filesystem and use 'rmramdisk' command to remove the ram disk. A more detailed description of the article can

VIO - Storage Configuration

Setting MPIO parameters at various levels: 1.  At the physical adapter (FC) level on VIOS : For all fscsi devices on VIOS, set dyntrk=yes and fc_err_recvo=fast_fail fc_err_recov will fila any I/Os immediately if the adapter detects a link event, such as a lost link between a storage device and a switch.  The 'fast_fail' setting is recommended only for a dual VIOS configuraiton.   dyntrk attribute allows the VIOS to tolerate cabling changes in the SAN.   * Both VIOS need to be restarted for these changes to take effect.  2.  To all the disks on VIOS : alogrithm=load_balance (round robin - per best practices guide) reserve_policy=no_reserve hcheck_mode=nonactive hcheck_interval=60 3.   At the VIO Client leve l: vscsi devices in the client (virtual adapter) :  vscsi_path_to=30 All the devices in the client:   algorithm=failover reserve_policy=no_reserve hcheck_mode=nonactive - Specifying 'nonactive means that healthcheck commands are sent down paths that have no activ

Convert Epoch Time in AIX

One of the frequent conversion I do on UNIX is to and from epoch time to regular date time. Epoch time is the number of seconds elassed since midnight 1970 till now. It is widely used in the UNIX operating systems to represent timestamp for an event etc. For example, it is used to store the last time a password was changed by a user, which will be used by the OS to lock the user if the password has expired. As a unix administrator, we have to frequently convert this information to and from epoch time to find out when was the last time the password was changed for a particular user. There are many online sites available for this conversions. But most of the time we will be needing this to incorporate in a script run from the system where you cannot access online resources. Here are some of the 'one liners' we can use to convert to and from epoch time: 1. Print curent epoch time: date +%s perl -e 'print time' 2. Convert regular time to epoch time: date +%s -d

Mask Password from /etc/security/passwd file

I was recently working on a project where I had to provide the screenshot of /etc/security/passwd file. Even though the passwords on this file are encrypted, it was against the security policy to even expose that information. Earlier this information was redacted from the screenshots that was provided to the external entities (from the image file). But this didn't look like the effective way to do. So after researching different test processing tools available, I created this 'sed' one liner to mask the password fields from the /etc/security/passwd file while listing. [/]> sed 's/\(password = \).*/\1[removed]/' /etc/security/passwd root: Password = [removed] lastupdate = 1248123420 flags = daemon: Password = [removed] bin: Password = [removed] sys: Password = [removed] adm: Password = [removed] uucp: Password = [removed] guest: Password = [removed] nobody: Password = [removed] lpd: Password = [removed] Hope this is helpful in same or differe

Shared Ethernet Adapter failover

Shared Ethernet Adapter (SEA): Shared Ethernet Adapter (SEA) provides the ability to share a physical adapter between multiple client partitions. It provides the connection between the virtual and physical network. The SEA acts like a layer-2 bridge between internal and external network SEA failover: SEA failover can be achieved by having SEA configured on two VIO servers which with the bridging functionality enabled ('Access External network'). They use a control channel to determine who is currently providing the Ethernet service to the client partitions. The client partition gets one virtual Ethernet adapter bridged by two VIO servers. From the client partition it looks like it has one virtual Ethernet adapter bridged by one VIO server - any given point of time. The SEA also support 802.1Q VLAN tagging like a regular SEA. Requirements for implementing SEA failover: VIO servers (on the same physical m

AIX NTP Configuration

NTP is used to synchronize time between a client and time server. To enable NTP on AIX server, Uncomment the xntpd line in rc.tcpip update /etc/ntp.conf file with the time server information start xntpd manually by with startsrc command startsrc -s xntpd Verify if the xntpd has started correctly lssrc -s xntpd To list all the NTP information, use lssrc with long listing lssrc -ls xntpd Other tools available for debugging NTP: ntpdate - syncs date with timeserver ntpq - query ntp server for information ntptrace - trace ntp communication