Tuesday, December 9, 2008

Steps to create a new linux filesystem in a VMWare image

extend physical disk in vmware
create new partition on unallocated portion (fdisk /dev/sda, (n)ew primary partition, create on partition (2), (w)rite and exit
mkdir /opt/oracle/product/oradata2
reboot machine
create filesystem on new partition (mke2fs /dev/sda2)
add entry to /etc/fstab to mount the new partition on /dev/sda2 on /opt/oracle/product/oradata2 - for example:

/dev/sda2 /opt/oracle/product/oradata2 ext2 defaults 0 1

type 'mount' (or reboot)
create new oracle medium tablespace datafile on new filesystem

BTW the manual command to mount is:
mount -t ext2 /dev/sda2 /opt/oracle/product/oradata2

Friday, December 5, 2008

Using 7za, scp, and imp from the command line

Here's how to add the contents of multiple directories to the same zip file using command line:

7za -tzip a KCC4.zip src/* -r
7za -tzip a KCC4.zip conf/* -r
7za -tzip a KCC4.zip data-dumps/* -r


Here's how to use scp from the command line to copy a file from the local directory to the remote servers /tmp directory:

scp KCC4.zip purisma@as01.corp.purisma.com:/tmp/KCC4.zip


And to scp an entire directory:
scp -r mydatafordnb-3.7.1-Cushman8 purisma@ps03.corp.purisma.com:/tmp

Here's how to call Oracle's imp command from the command line

imp system/purisma1@vanredha file=kcc4_dmp.dmp fromuser=kcc4 touser=kcc4