Useful shortcuts for vi editor

Showing posts with label logic volume. Show all posts
Showing posts with label logic volume. Show all posts

Monday, 13 October 2014

What should you do if electricty down or reboot exists in lvm system?

For this case,
You should mount the logic volume (lv) to related path. 

For example, you are using ftp server;
Run this command after system is up:

mount /dev/my_vg_ora/vol01 /srv/ftp/myhome/​
(mount - logic volume path - mounted path)

How to add datafile as logic volume (LV) on the tablespace in Linux?

On linux terminal;
chown -R oracle:dba /dev/my_vg_ora/example01
chown -R oracle:dba /dev/mapper/my_vg_ora-example01
chmod 777 /dev/my_vg_ora
chmod 660 /dev/my_vg_ora/*

$ sqlplus
Enter user-name: sys as sysdba
@sys
to add database file please execute under query as system database role

SQL> ALTER TABLESPACE MYTABLESPACE ADD DATAFILE '/dev/my_vg_ora/example01' size 8000m reuse

To execute the command, make sure the instance is open and the tablespace is online and also check database datafiles;

SELECT * FROM dba_data_files;