Solaris: Mounting Directories via NFS

To mount directories via NFS from the host on which the central instance runs, log on as user root and proceed as follows:
On the host on which the main instance runs:
1. Enter the command:
/usr/sbin/share
2. Edit the file /etc/dfs/dfstab to add file systems shared via NFS:
vi /etc/dfs/dfstab
Add the following line for each file system, for example:
share -F nfs -o root=<nfsclient1>:<nfsclient2> -d “description” /usr/sap/trans

>

After your SAP System has been installed successfully, in the above line you have to change -o root to -o rw (or remove anon=0, respectively) for all exported directories, for example:
share -F nfs -o rw=<nfsclient1>:<nfsclient2> -d “description” /usr/sap/trans

3. If the /etc/dfs/dfstab was empty, the NFS server is not active.
Start the NFS server with the command:
/etc/init.d/nfs.server start
4. To see if the NFS server is active and which partitions are mountable, enter the command:
showmount -e <NFS-server>
On the host on which the additional instance runs:
1. If you are mounting NFS disks for the first time, the NFS client software is not active.
Start the NFS client software with the command:
/etc/init.d/nfs.client start
2. Edit the file /etc/vfstab to mount the directory:
vi /etc/vfstab
Add the following line for each file system, for example:
db_server:/usr/sap/trans – /usr/sap/trans nfs – yes –
If the mount point exists, mount /usr/sap/trans, for example, with the command:
mount /usr/sap/trans

Linux: Exporting Directories via NFS

To export directories via NFS, perform the following steps (the following assumes that the central instance host is the NFS server):
1. Log on as user root to the NFS server.
2. Make sure that your host is configured as NFS server by making sure that the output of the command chkconfig –list nfs
looks like:
nfs 0:off 1:off 2:off 3:on 4:on 5:on 6:off
You can set up your host as NFS server using the command:
/etc/rc.d/init.d/nfs start
3. To export a directory from a local file system you can
− Use the tool linuxconf
− Perform the configuration manually
To perform the configuration manually:
a. Add a line to the local file /etc/exports:
#/etc/exports
<directory> <hostname>(<options>)

>

To export the directory /usr/sap/trans in read-only mode to the NFS client host.wdf.sap-ag.de:
#/etc/exports
/usr/sap/trans host.wdf.sap-ag.de(ro)
To export the directory in read-write mode:
#/etc/exports
/usr/sap/trans host.wdf.sap-ag.de(rw)
To export the directory to all NFS clients of the domain using a wildcard (*):
#/etc/exports
/usr/sap/trans *.wdf.sap-ag.de(rw)


There must not be a blank between hostname and options. Otherwise, the directory will be exported both read-only to hostname and in consideration of the options to everyone.

b. To activate the changes (that is, inform the NFS daemon about the changes performed in /etc/exports), enter:
exportfs -r
To get a list of all currently exported directories, enter
exportfs -v
For further details please consult the man page by entering man exports.
4. Log on as user root to the host where the file system should be imported.
5. Mount the file systems with:
mount <nfs_server>:<file_system> <mount_point>
mount <nfs_server>:/usr/sap/trans /usr/sap/trans

How do I expand / resize an ext3 file system in linux

The following is an example of increasing the size of a Storage LUN that has an ext3 file system on it. When performing operations like this, perform a backup of the file system first.

(The system used for this example is running Red Hat Enterprise Linux Server release 5 (Tikanga), kernel version is 2.6.18-8.el5PAE and EMC PowerPath (c) Version 5.1 SP 2 (build 21) installed.)

Lets look at the LUN and file system “pre-resize”:

# powermt display dev=emcpowera

Pseudo name=emcpowera

CLARiiON ID=CK200075000424 [Sunx4150_SG]

Logical device ID=6006016024D01E009286CA9A490DDE11 [LUN 39]

state=alive; policy=BasicFailover; priority=0; queued-IOs=0

Owner: default=SP B, current=SP B Array failover mode: 1

==============================================================================

— ————– Host ————— – Stor – — I/O Path – — Stats —

### HW Path I/O Paths Interf. Mode State Q-IOs Errors

==============================================================================

0 qla2xxx sda SP A5 active alive 0 0

0 qla2xxx sdc SP B4 active alive 0 0

# mount /dev/emcpowera1 /data03

# df -h

Filesystem Size Used Avail Use% Mounted on

/dev/sde5 20G 15G 4.0G 79% /

/dev/sde1 99M 17M 78M 18% /boot

/dev/sde3 97G 48G 44G 53% /data01

/dev/sde2 144G 108G 30G 79% /data02

/dev/sdb 730G 301G 393G 44% /cpe-backup

none 4.0G 0 4.0G 0% /dev/shm

/dev/emcpower1 197G 187G 673M 100% /data03

Step 1: Perform a backup of the file system.

Step 2: Unmount the file system.

# umount /data03

# df -h

Filesystem Size Used Avail Use% Mounted on

/dev/sde5 20G 15G 4.0G 79% /

/dev/sde1 99M 17M 78M 18% /boot

/dev/sde3 97G 48G 44G 53% /data01

/dev/sde2 144G 108G 30G 79% /data02

/dev/sdb 730G 301G 393G 44% /cpe-backup

none 4.0G 0 4.0G 0% /dev/shm

Step 3: Increase the size of the LUN using the backend array tools. In some cases, like with CLARiiON MetaLUN, this can actually be performed “online” in order to decrease the time that the file system is unavailable. However, just because the disk array can be done online that does not mean the application layer can handle online expansion (some file systems can handle online expansion, currently ext3 cannot).

Step 4: Use sfdisk -R to re-read the new partition size. The operating system has no idea that the LUN size has been increased because it was done by the array.

Lets look at it with fdisk first then re-read and look again.

# fdisk -l /dev/emcpowera

Disk /dev/emcpowera: 200 GB, 361278996480 bytes

255 heads, 63 sectors/track, 26108 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/emcpowera1 1 26108 209712478+ 83 Linux

Command (m for help): q (Quits out of fdisk)

# sfdisk -R /dev/emcpowera

# fdisk /dev/emcpowera

The number of cylinders for this disk is set to 43923.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/emcpowera: 361.2 GB, 361278996480 bytes

255 heads, 63 sectors/track, 43923 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/emcpowera1 1 26108 209712478+ 83 Linux

Command (m for help): q

Step 5: Use fdisk to remove the existing file system partition and recreate a new larger partition. Now we need to increase the size of the partition that our file system lives on. Even though our LUN is bigger the partition still starts at cylinder 1 and ends at cylinder 26108.

# fdisk /dev/emcpowera

The number of cylinders for this disk is set to 43923.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/emcpowera: 361.2 GB, 361278996480 bytes

255 heads, 63 sectors/track, 43923 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/emcpowera1 1 26108 209712478+ 83 Linux

Command (m for help): d

Selected partition 1

Command (m for help): p

Disk /dev/emcpowera: 361.2 GB, 361278996480 bytes

255 heads, 63 sectors/track, 43923 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

Command (m for help): n

Command action

e extended

p primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-43923, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-43923, default 43923):

Using default value 43923

Command (m for help): p

Disk /dev/emcpowera: 361.2 GB, 361278996480 bytes

255 heads, 63 sectors/track, 43923 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/emcpowera1 1 43923 352811466 83 Linux

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

# fdisk -l /dev/emcpowera

Disk /dev/emcpowera: 361.2 GB, 361278996480 bytes

255 heads, 63 sectors/track, 43923 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/emcpowera1 1 43923 352811466 83 Linux

Step 6: Perform a file system check with e2fsck. This file system check step is required before performing resize2fs.

# e2fsck -f /dev/emcpowera1

e2fsck 1.39 (29-May-2006)

Pass 1: Checking inodes, blocks, and sizes

Pass 2: Checking directory structure

Pass 3: Checking directory connectivity

Pass 4: Checking reference counts

Pass 5: Checking group summary information

LUN39: 69643/26214400 files (2.0% non-contiguous), 49634603/52428119 blocks

Step 7: Expand the file system with resize2fs.

# resize2fs /dev/emcpowera1

resize2fs 1.39 (29-May-2006)

Resizing the filesystem on /dev/emcpowera1 to 88202866 (4k) blocks.

The filesystem on /dev/emcpowera1 is now 88202866 blocks long.

Step 8: Now mount the file system and check out the new size.

# mount /dev/emcpowera1 /data03

# df -h

Filesystem Size Used Avail Use% Mounted on

/dev/sde5 20G 15G 4.0G 79% /

/dev/sde1 99M 17M 78M 18% /boot

/dev/sde3 97G 48G 44G 53% /data01

/dev/sde2 144G 108G 30G 79% /data02

/dev/sdb 730G 456G 238G 66% /cpe-backup

none 4.0G 0 4.0G 0% /dev/shm

/dev/emcpowera1 332G 187G 132G 59% /data03

Solaris: Preparing Hard Disks and Partitioning Disks

prtvtoc Utility

prtvtoc prints the content of the VTOC (volume table of contents). It displays the start/stop
cylinder, the size of the partition and the mounted directory. Execute prtvtoc as follows:
1. Log on as user root.
2. Enter:

/usr/sbin/prtvtoc -s <rawdevice>

Solaris does not allow track zero on the disk to be part of the raw device used by the database system. When the machine is rebooted, the operating system writes a label here. Consequently, data from the database is overwritten and a restore of the database becomes necessary.

If you use a RAID System or a Volume Management Software from Sun
(Solstice DiskSuite or Veritas Volume Manager) then the device driver will
take care of this restriction.
Otherwise, when you initially setup a raw device, the standard second
partition (/dev/rdsk/c?t?d?s2) may not be used since it normally includes
track zero on the disk. A disk that is intended for use as a raw device, must be reformatted appropriately to ensure that the raw device begins at track one. Check your disk configuration as soon as possible to make sure that your raw devices meet the above requirements. To do this:
Log on as root and change to the directory
/<db-system>/<SAPSID>/sapdata
List the links to the raw devices by entering the command:
ls -lR
Display all partitions on a disk (substitute “?”):
/usr/sbin/prtvtoc <rawdevice>












Assume ls -lR produces the output
lrwxrwxrwx 1 root 18 Nov 29 data3 -> /dev/rdsk/c0t3d0s6
then the partition 6 of this disk is used as a raw device.
Assume /usr/sbin/prtvtoc /dev/rdsk/c0t3d0s6 produces the
output:
First Sector Last
Part. Tag Flags Sector Count Sector Mount Directory
0 0 00 0 7050 7049
2 5 01 0 3929670 3929669
6 4 00 7050 3922620 3929669
Then the first sector of partition 6 is not equal zero.
If the partition you want to use begins with sector zero (as shown for partition
2 in the above example) it cannot be used as a raw device partition.

Partitioning Disks

1. Look for a mounted partition with the format utility:
format
format> partition
partition> print
2. Define partition size:
partition> label
partition> quit
format> disk
3. Chose next disk:
format> quit
For more information, see the Solaris documentation.

Compaq Tru64 UNIX: Setting up Swap Space

1. Determine the size of the installed RAM with the command:
vmstat -P | head -2
2. Determine the allocated swap space with the command:
/usr/sbin/swapon -s
3. Determine the required size of the swap space.
You can find the minimum swap space requirement in the installation documentation in
section Hardware and Software Requirements Check.
If possible, you should use an entire physical disk as swap space partition.
4. Increase the swap space if necessary.
To define additional swap partitions, insert the entry:
/dev/<disk partition> swap<n> ufs sw 0 2 in the file /etc/fstab.
Insert entry /dev/rz1b swap1 ufs sw 0 2
5. To activate new swap partitions, use the command:
/usr/sbin/swapon -a
6. Check the results by using the command:


/usr/sbin/swapon -s
7. Execute memlimits, to verify paging space size and kernel settings.
Do not execute this step if you are installing a standalone DB server.

Make sure that the UNIX kernel, paging space and user limits are already configured
for the SAP System as described in the installation documentation in section
Hardware and Software Requirements Check and in section Compaq: Checking and
Modifying the UNIX Kernel [page 21].
• Unpack the file memlimits:
cd <INSTDIR>
/<CD-DIR>/UNIX/<OS>/SAPCAR -xgvf
/<CD-DIR>/UNIX/<OS>/SAPEXE.SAR memlimits

• Start memlimits. Enter:
./memlimits -l 20000
If error messages occur, increase your paging space and rerun memlimits until it is
error free.

Compaq Tru64 UNIX: Preparing Hard Disks and partitioning

disklabel Command

The command disklabel displays the start/stop cylinder, the size of the partition, the label
and the disk type of a disk device.
As user root, enter the command:
disklabel -r /dev/<rawdisk device>
disklabel -r /dev/rrz3c

Compaq Tru64 UNIX does not allow block 0 to block 15 on the disk to be part of the raw device used by the database system. When the machine is rebooted, the operating system writes a label here. Consequently, data from the database is overwritten and a restore of the database becomes necessary. If you use a RAID System or Advanced File System (advfs) then the device driver will take care of this restriction. Otherwise, when you initially setup a raw device, the standard ‘c’ partition (/dev/rrz?c) may not be used since it normally includes track zero on the disk. A disk that is intended for use as a raw device, must be reformatted appropriately to ensure that the raw device begins at track two. Check your disk configuration as soon as possible to make sure that your raw devices meet the above requirements. To do this:
a. Log on as user root and change to the directory
/<db-system>/<SAPSID>/sapdata
b. List the links to the raw devices with the command:
ls -lR
c. Display all partitions on the disks with the command:
disklabel -r /dev/<raw_device>


lR produces the output
lrwxrwxrwx 1 root 18 Nov 29 data3 -> /dev/rrz3h
then the partition h of this disk is used as a raw device.
Always use partition c of the raw device in the disklabel command to
display the content of the entire disk.
The output of disklabel -r /dev/rrz3c looks similar to:
# /dev/rrz3c:
type: SCSI
disk: rz26
label:
flags:
bytes/sector: 512
sectors/track: 57
tracks/cylinder: 14
sectors/cylinder: 798
cylinders: 2570
sectors/unit: 2050860
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # milliseconds
track-to-track seek: 0 # milliseconds
drivedata: 0

8 partitions:
# size offset fstype [fsize bsize cpg]
a: 131072 0 unused 1024 8192 # (Cyl. 0 – 164*)
b: 262144 131072 unused 1024 8192 # (Cyl. 164*- 492*)
c: 2050860 0 unused 1024 8192 # (Cyl. 0 – 2569)
d: 552548 393216 unused 1024 8192 # (Cyl. 492*-1185*)
e: 552548 945764 unused 1024 8192 # (Cyl. 1185*-1877*)
f: 552548 1498312 unused 1024 8192 # (Cyl. 1877*-2569*)
g: 1657644 393216 4.2BSD 1024 8192 16 # (Cyl. 492*-2569*)
h: 838444 1212416 unused 1024 8192 # (Cyl. 1519*-2569*)

Since partition a contains track zero, it is necessary to choose an other partition as raw device. To edit and change this output for (re-)partitioning the disk, it should be directed in a file using the command:
disklabel -r /dev/rrz3c > <tmp_file>


Partitioning Disks

1. Edit the output file <tmp_file> you generated in the previous step and change the
boldface lines accordingly:
# /dev/rrz3c:
type: SCSI
disk: rz26
label:
flags:
bytes/sector: 512
sectors/track: 57
tracks/cylinder: 14
sectors/cylinder: 798
cylinders: 2570
sectors/unit: 2050860
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # milliseconds
track-to-track seek: 0 # milliseconds
drivedata: 0
8 partitions:
# size offset fstype [fsize bsize cpg]
a: ….16 0 unused 1024 8192 16 # (Cyl. 0 – 164*)
b: 262144 131072 unused 1024 8192 # (Cyl. 164*- 492*)
c: 2050860 0 unused 1024 8192 # (Cyl. 0 – 2569)
d: 552548 393216 unused 1024 8192 # (Cyl. 492*- 1185*)
e: 552548 945764 unused 1024 8192 # (Cyl. 1185*- 1877*)
f: 552548 1498312 unused 1024 8192 # (Cyl. 1877*- 2569*)
g: 1657644 393216 4.2BSD 1024 8192 16 # (Cyl. 492*- 2569*)
h: 131056 16 unused 1024 8192 16 # (Cyl. 1519*- 2569*)

• Only partitions a and h were modified !
• Never change partition c because it always represents the entire disk.
• Partition a should always span block 0 and block 1.
• Partitions a and c are the only ones containing track zero.
• After activating this partition all partitions but a and c can be used as rawdevices.


2. Activate the disk using the command:
disklabel -R -r <raw_device> <tmp_file> <disktype>
where <disktype> is the value of disk: in the above <tmp_file>.
disklabel -R -r /dev/rrz3c <tmp_file> rz26
Always use partition c of the raw device in the above command.

Compaq Tru64 UNIX: Checking and Modifying the UNIX Kernel

Checking the UNIX Kernel
You can check the UNIX kernel with the following UNIX commands:
sysconfig -q ipc
sysconfig -q proc
sysconfig -q vm

Compare the output of these commands with the values in the list below.
Corrections of the kernel parameters are published in the installation notes.
These notes contain the most recent information regarding the installation.
We recommend that all Compaq Tru64 UNIX kernel modifications be performed by your system administrator.

Changing the UNIX Kernel

To change the system configuration defined in /etc/sysconfigtab:
1. Create a file named sapr3.stanza in any directory <path> (for example,
/etc/sapr3.stanza). It must contain the following lines for the subsystem entries ipc
and proc:
ipc:
sem-mni = 512
sem-msl = 512
sem-opm = 512
sem-ume = 512
shm-max = 2139095040
shm-mni = 512
shm-seg = 512
proc:
maxusers = 512
max-per-proc-address-space = 8589934592
max-per-proc-data-size = 8589934592
max-per-proc-stack-size = 268435456
max-proc-per-user = 512
per-proc-address-space = 8589934592
per-proc-data-size = 8589934592
per-proc-stack-size = 268435456

 

2. Insert the following lines for the subsystem entry vm into the file sapr3.stanza.
vm:
ubc-minpercent = 3
vm-ubcseqstartpercent = 3
ubc-borrowpercent = 3
ubc-maxpercent = 7
vm-maxvas = 17179869184
vm-vpagemax = 1048576
3. Use the following commands to newly add the three subsystem entries to
/etc/sysconfigtab:
sysconfigdb -a -f <path>/sapr3.stanza ipc
sysconfigdb -a -f <path>/sapr3.stanza proc
sysconfigdb -a -f <path>/sapr3.stanza vm

or if the subsystem entries are already present in /etc/sysconfigtab use:
sysconfigdb -u -f <path>/sapr3.stanza
to update the complete subsystem entries with your new settings in sapr3.stanza.
4. Reboot the system after changing the kernel parameters. Check the kernel parameter
settings after rebooting the system.

Compaq Tru64 UNIX: Mounting a CD-ROM

1. Log on as user root.
2. Create a mount point for the CD-ROM with the command:
mkdir <CD-mountdir> (for example, <CD-mountdir> is /sapcd)
3. Mount the CD-ROM with the command:
mount -dr -t cdfs /dev/rz<n>c <CD-mountdir>
<n> is the hardware or SCSI address of the CD-ROM (0-6).
If the command fails with the message Invalid argument, the kernel is not configured
for the use of CD-ROMs. In this case, proceed as follows:
a. Edit the file /usr/sys/conf/<HOST>
Insert the following line in the appropriate section:
options CDFS

b. Generate a new kernel with
/usr/sbin/doconfig -c <HOST>
<HOST> is the hostname of the computer in uppercase letters.
c. Copy the new kernel to the root directory
cp /usr/sys/<HOST>/vmunix /.
d. Reboot the system.