Wednesday, February 29, 2012

Installing a Dell R810 Server with 12Tb Storage for a DB2 Database


Installing a Dell R810 Server with 12Tb Storage for a DB2 Database

This wasn’t a regular install as I had to create 2 partitions and 2 volume groups from scratch.

In this document we will go step by step installing the hardware and software.
1.        Hardware:
Dell R810 Server, 128Gb RAM, with 2 160Gb SAS drives on local storage
Dell MD1200 Storage array, connected to a LSI H800 Card.
First off, we connect the hardware; Power, Ethernet and the SAS cables from the H800 to the storage. 
You *could* connect only one SAS cable from the H800 to the MD1200, however for redundancy we connect two SAS cables:

 Then we need to configure RAID 50 on the MD1200, you press CTRL-R when you see the prompt:


You will then be on a screen as below:

Press Enter when the controller H800 is selected, then press F2 to get into operations to create a new disk:



 
Choose the RAID level (in our case RAID 50 with no spares) and then do a quick initialization.
We are now ready to reboot the system, after the MD1200 storage was configured, and when the system is powered up, press F12 to do  a PXE Boot, and we kickstart it with RHEL 5.6
After the OS finishes installing, we need to configure the volumes for the DB2 storage.
Since we wanted to put the storage on one volume group, and the backup on another volume group, since you can only have one volume group per partition, we will partition the array to 2 partitions:

See comments in   blue

      Start parted, by issuing the command parted (physical device – in our case /dev/sda)
[root@server-01 ~]# parted /dev/sda
Model: DELL PERC H800 (scsi)
Disk /dev/sda: 12.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

      Choose your partition sizes, and issue “mkpart primary start end” in this case we are making one partition of 8.5TB and another of 3TB

(parted) mkpart primary 0 8500000
(parted) mkpart primary  8500001 11500000

      Lets see the partitions by issuing a “print” command:

(parted) p
Number  Start   End     Size    File system  Name     Flags
 1      17.4kB  8500GB  8500GB               primary
 2      8500GB  11.5TB  3000GB               primary

Step 2:  create the physical storage: 
       pvcreate /dev/sda1 /dev/sda2
[root@server-01 ~]# pvcreate /dev/sda1
  Physical volume "/dev/sda1" successfully created
[root@server-01 ~]# pvcreate /dev/sda2
  Physical volume "/dev/sda2" successfully created

Step 3:  initialize the /etc/lvmtab and /etc/lvmtab.d files by running the following command:
  vgscan
[root@server-01 ~]# vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "vg04" using metadata type lvm2
  Found volume group "vg01" using metadata type lvm2

Step 3.1: create a volume group and assign one or more physical volumes to the volume group:
vgcreate -s (extent size)M (volume-group) (physical partition)
[root@server-01 ~]# vgcreate -s 256M vg01 /dev/sda1
  Volume group "vg01" successfully created
[root@server-01 ~]# vgcreate -s 256M vg04 /dev/sda2
  Volume group "vg04" successfully created

Step 4: creation of "logical volumes"
  lvcreate -L (size)G -n (name) (volume group)
# lvcreate -L 200G -n lvol3 vg01
# lvcreate -L 300G -n lvol2 vg01
# lvcreate -L 7TB -n lvol1 vg01
# lvcreate -L 2.7TB -n lvol4 vg04

Step 5: creation of the filesystem:
  mke2fs -j (volume)
mke2fs -j /dev/vg01/lvol4
mke2fs -j /dev/vg01/lvol1
mke2fs -j /dev/vg01/lvol2
mke2fs -j /dev/vg01/lvol3
mke2fs -j /dev/vg04/lvol4

Step 6: create mount points:
mkdir /db2backup /db2onlinelog2 /data2 /db2dump2  /db2log2

step 7: Mount logical volumes on mount points:
  mount (volume) (mountpoint)
mount /dev/vg01/lvol1 /data2
mount /dev/vg01/lvol3 /db2onlinelog2
mount /dev/vg01/lvol4 /db2dump2
mount /dev/vg04/lvol4 /db2backup
mount /dev/vg01/lvol2 /db2log2 

Step 8: Add corresponding line in the /etc/fstab file:
/dev/vg01/lvol1         /data2                  ext3    defaults        0 0
/dev/vg01/lvol2         /db2log2                ext3    defaults        0 0
/dev/vg01/lvol3         /db2onlinelog2          ext3    defaults        0 0
/dev/vg01/lvol4         /db2dump2               ext3    defaults        0 0
/dev/vg04/lvol4         /db2backup              ext3    defaults        0 0
10.2.6.20:/vol/database/              /mnt/rrr_bk nfs defaults 0 0





 

Friday, February 24, 2012

Escaping from Multiple Reverse Telnet Sessions on a Cisco Router

Escaping from Multiple Reverse Telnet Sessions on a Cisco 881W Router (880 series)

Sometimes you may have closed your laptop or left a connection open somewhere, and you wont be able to connect to the AP on the 881W, and this is also true for any other tty’s on Cisco’s.

router1#telnet 1.1.1.1 2002
Trying 1.1.1.1, 2002 ...
% Connection refused by remote host
What you need to do is clear the line.
881W#clear line tty 2
[confirm]
 [OK]
881W#telnet 1.1.1.1 2002
Trying 1.1.1.1, 2002 ... Open
User Access Verification
Username:

After you log in and you want to get back to the router, you can type exit, and confirm, or do the famous cisco combination:   Press ctrl+shift+6 then ctrl+shift+6 then x. This will bring you back to the first vty.

Thursday, February 2, 2012

Creating quotas in Netapp


Creating quotas in Netapp.


1. Create the /etc/quotas file and add entries to reflect the quota target, type, disk and file size limitations.  In our case, we want the type to be qtree.
Example for an entry in the quota file:
#Quota Target type disk files
/vol/repository/apps    tree  200G 400K

2.  To modify a quota, edit the /etc/quotas file to reflect the changes.
There are two methods to reinitialize the quotas after editing the /etc/quotas file.
a. To cause the filer to reread the entire /etc/quotas file if a new quota entry is created:

filer>quota off [vol_name]
filer>add new entries or make changes to existing quota values
filer>quota on [vol_name] (if adding new entries into /etc/quota file)
or
filer>quota resize [vol_name] (To cause the filer to only update quota entries that previously existed and only disk and/or file size was modified)

Note: If resizing existing quotas values only, it is more efficient to use the quota resize [vol_name] as only the quotas whose value has changed is recalculated.

3. Test the quota by copying over a directory as a user in the directory group.  Here, we copy over a 2GB ISO file to the mysql directory as root.  Since root is part of the mysqldir NIS group, for which there’s a 1 GB quota, Netapp catches it and causes the write to fail:

[root@server]# pwd
/d0/data/linuxapps/RedHatEL-AS5/UPDATE5/x86_64
[root@server]# scp -p RHEL4-U5-x86_64_DVD.iso remote-host:/d0/mysql/test2
RHEL4-U5-x86_64_DVD.iso                       100% 2474MB  10.1MB/s   04:03
scp: /d0/mysql/test2: Disk quota exceeded