2009-05-05

LINUX RAID

1. Disk partioning:
fdisk /dev/sda
n - create new partition
t - create partition with type RAID (fd - Linux raid autodetect)

2. Create array:
mdadm --create /dev/md[nr] --level=[0|1|etc] --raid-devices=2 /dev/sda1 /dev/sdb1
3. Format array:
mkfs.ext3 /dev/md[nr]
4. Create directory
5. Mount array
6. Add to /etc/fstab
echo "/dev/md[nr] /[katalog] defaults 0 2" >>etc/fstab
7. Create file /etc/mdadm.conf
echo "DEVICE /dev/sda1 /dev/sdb1" > /etc/mdadm.conf
mdadm --detail --scan >> /etc/mdadm.conf

General:
mdadm --add /dev/md[nr] /dev/sda2 #add disk to synchronize with array
mdadm -E /dev/sda1 #info about device inside array
cat /proc/mdstat #present state of array
mdadm --stop /dev/md[nr] #stop array, free devices
mdadm --assemble #mount arrary
mdadm --detail --scan #info about components from /proc/mdstat

2009-05-03

ORACLE STARTUP

Startup mode:

STARTUP NOMOUNT

  • startup instance and occupy memory
  • read pfile in order:
    • spfile$ORACLE_SID.ora or
    • spfile.ora or
    • init$ORACLE_SID.ora
    • init.ora

STARTUP MOUNT

  • mount database to instance,
  • read controlfile,
  • allocating database structure

STARTUP OPEN

  • open database for all users

STARTUP READ ONLY

  • open database for all users but read only

STARTUP FORCE

  • restart database as SHUTDOWN ABORT and startup again

STARTUP RESTRICT

  • open database for users with privilege RESTRICTED SESSION, if you want to open for all put ALTER SYSTEM DISABLE RESTRICTED SESSION

STARTUP UPGRADE

  • open database for AS SYSDBA, prepare database to upgrade

Shutdown mode:

SHUTDOWN

  • disallow new connections and wait for finish session for present users

SHUTDOWN TRANSACTIONAL

  • disallow new connections, disallow new transactions, when transactions was finished, all users are disconnected

SHUTDOWN IMMEDIATE

  • disallow new connections, all transactions which was not commit are rollback and users are disconnected

SHUTDOWN ABORT

  • disallow new connections, all transactions are interupted, not rollback, users are disconnected, during next startup database allow recovery