Skip to main content

Posts

Disable GRO for a ethernet interface

Use this to disable the GRO (Generic Receive Offload) on a RHEL system: # /sbin/ethtool -K eth4 gro off You can also add this to the /etc/rc.local file to persist across restarts. There are also other options you can set with the ethtool utility.  Please see the man page for ethtool for more information
Recent posts

Configure default MTA on Red Hat Enterprise Linux

1.  Install postfix # yum install postfix 2.  Stop and Disable sendmail (if running) # service sendmail stop # chkconfig sendmail off 3.  Enable and start postfix # chkconfig postfix on # service postfix start 4.  Update postfix config with correct relay host # postconf -e relayhost=yoursmtphost.com 5.  Make postfix the default MTA # alternatives –config mta There are 2 programs which provide 'mta'.   Selection    Command ----------------------------------------------- *+ 1           /usr/sbin/sendmail.sendmail       2           /usr/sbin/sendmail.postfix Enter to keep the current selection[+], or type selection number: 2 5.  Test mail relay # echo TEST | mail -s TEST youremail@yoursmtphost.com

HP-UX tape configuration

Here are few commands to configure tape drives in HP-UX 1.  Scan for new devices: # ioscan –fnC tape 2.  List tape drives currently recognized by the OS (without performing an actual hardware scan) # ioscan –fnkC tape 3.  remove all the special files used by the tape drives # rmsf  /dev/rmt/* 4.  Recreate the specil files for the tape drives # insf –C tape –e 5.  Remove a tape drive (that has a NO_HW state) # rmsf –H 0/7/1/0.1.24.255.5.5.0 Find the WWN for the HBAs: # ioscan –fnkC fc # fcmsutil /dev/fcd0 Find the WWN for the tape drives connected to the HBA: # fcmsutil /dev/fcd0 get remote all   **These are just a handful of commands to deal with the tape drives.  Not to be used as a procedure

Create file system from Command line (AIX)

1.  Create a Volume Group (Scalable): # mkvg  -S –y ‘vgname’ –f hdisk12 2.  Create a LV in the VG (jfs2): # mklv –y ‘lvname’ –t jfs2 vgname 1024 3.  Create a file system on the previously created LV (jfs2): # crfs –v jfs2 –d ‘lvname’ –A yes –p rw –m ‘mount point’ –u ‘mount group’

Dig that!

Here are some handy ‘dig’ commands to verify DNS records: Do a hostname lookup # dig www.google.com ; <<>> DiG 9.4.1 <<>> www.google.com ;; global options:  printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 76 ;; flags: qr rd ra; QUERY: 1, ANSWER: 7, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;www.google.com.                        IN      A ;; ANSWER SECTION: www.google.com.         84790   IN      CNAME   www.l.google.com. www.l.google.com.       259     IN      A       209.85.148.104 www.l.google.com.       259     IN      A       209.85.148.105 www.l.google.com.       259     IN      A       209.85.148.106 www.l.google.com.       259     IN      A       209.85.148.147 www.l.google.com.       259     IN      A       209.85.148.99 www.l.google.com.       259     IN      A       209.85.148.103 ;; Query time: 119 msec ;; SERVER: 10.0.0.8#53(10.0.0.8) ;; WHEN: Wed Sep 28 13:23:41 2011 ;; MSG SIZE  rcvd: 148   Ge

Red Hat Enterprise Linux 6 – How to: migrate data to a new Physical Volume and remove the old PV

Add new devices to the system. Use rescan-scsi-bus.sh to scan for new devices or restart the system to get the new devices Create LVM Physical Volumes with the new devices # pvcreate /dev/sdxx Add the devices to the respective VGs # vgextend vgname /dev/sdxx Migrate the data from the existing PV to the new PV # pvmove /dev/sdxx o Where /dev/sdxx is the existing PV that needs to be removed from the VG List the PVs to make sure the PV that needs to be removed has no data on it   # pvs –o+pv_used PV VG Fmt Attr PSize PFree Used /dev/sda2 rootvg lvm2 a- 39.51g 8.63g 30.88g /dev/sda log2vg   lvm2 a- 30.00g 8.00g 0 /dev/sde log2vg   lvm2 a- 30.00g 8.00g 22.00g /dev/sdf datavg   lvm2 a- 100.00g 5.00g 95.00g /dev/sdg log1vg   lvm2 a- 30.00g 8.00g 22.00g In the above example, the data was moved from /dev/sda to /dev/sde (they reside in the same VG) Remove the PV from the VG   # vgreduce vgname /dev/sdxx Remove LVM PV information from the device # pvremove /dev/sdxx

Converting SEA on VIO from access to trunk mode

Shared Ethernet Adapters on VIO server can be configured in two different modes while accessing the external network. 1.  Simple mode 2. Trunk mode or 802.1Q mode In a Simple mode, the SEA is not aware of any VLAN information and bridges all the network packets to the external switch.  the external switch then determines the target and routes/discards it accordingly.  This is very useful when there is only one VLAN that needs to be serviced through the SEA to the LPARs using these VIO servers.  The configuration on the switch as well as the VIO (SEA) is simple and straight forward.  In a Trunk mode (802.1Q complaint), the SEA is aware of the VLANs and bridges only the packets that is part of the ‘Additional VLANs’ list.  The external switch then determines the target and routes/discards it accordingly.  This is very useful when there is a need to service multiple VLANs through the same SEA adapter.  This will provide the ability to create LPARS from multiple networks to reside on t