Linux 下Oracle基於RAW擴充資料表空間步驟

來源:互聯網
上載者:User

資料中基於RAW格式的資料表空間擴容。以下是詳細步驟: 查看已有裸裝置#cd /dev/raw#ls -rtl 查看之前裸裝置大小情況/查看之前lv大小#blockdev --getsize /dev/raw/raw3720488192#blockdev --getsize /dev/raw/raw3820488192#blockdev --getsize /dev/raw/raw3010248192#lvscan ACTIVE'/dev/datavgsda/indxsda07' [4.89 GB] inheritACTIVE'/dev/datavgsda/datasda08' [9.77 GB] inheritACTIVE'/dev/datavgsda/indxsda08' [4.89 GB] inheritACTIVE'/dev/datavgsda/datasda05' [9.77 GB] inherit............................................................. 查看裸裝置與lv的綁定關係#cd /etc/sysconfig#more rawdevices 查看VG的空閑空間情況#vgdisplayFreePE / Size27301 / 106.64 GB  建立lv#lvcreate –L 10240m -n datasda11 datavgsda#lvcreate –L 10240m -n datasda12 datavgsda 綁定lv到RAW#raw /dev/raw/raw39 /dev/datavgsda/datasda11#raw /dev/raw/raw40 /dev/datavgsda/datasda12修改/etc/syscnfig/rawdevices檔案中,加入下面二行,開機時自動載入裸裝置/dev/raw/raw39 /dev/datavgsda/datasda11/dev/raw/raw40 /dev/datavgsda/datasda12######先不執行此步:執行 /etc/init.d/rawdevices restart 使設定檔中的裸裝置生效 授權#chown Oracle:dba /dev/raw/raw39#chown oracle:dba /dev/raw/raw40#chown 660 /dev/raw/raw39#chown 660 /dev/raw/raw40#此步已經做完:在/etc/rc.local中已經有一句/bin/chown -R oracle:dba /dev/raw,用來保證開機重啟後授權有效 #raw -qa可以查看當前raw的資訊 建立連結檔案查看之前的連結# pwd/oracle/data/EJETDB# ls -rtl總用量 188lrwxrwxrwx1 oracle dba14 2010-06-06undotbs03 -> /dev/raw/raw12lrwxrwxrwx1 oracle dba14 2010-06-06undotbs02 -> /dev/raw/raw11建立連結(用oracle使用者建)ln -s /dev/raw/raw39 /oracle/data/EJETDB/datasda11ln -s /dev/raw/raw40 /oracle/data/EJETDB/datasda12 ALTER TABLESPACE USERS ADD DATAFILE '/oracle/data/EJETDB/datasda11' SIZE 10200M REUSE;ALTER TABLESPACE USERS ADD DATAFILE '/oracle/data/EJETDB/datasda12' SIZE 10200M REUSE;

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.