# mkdir /hisback # mkdir /hisback --------------- hisback
#[root@his2 hisback]# ll / ---------- hisback ,u=roo,g=root
total 162
drwxr-xr-x 2 oracle oinstall 36864 Mar 12 19:43 archive
drwxr-xr-x 2 root root 4096 Mar 12 20:15 hisback
drwxr-xr-x 2 oracle oinstall 4096 Mar 8 00:51 rman
drwxr-xr-x. 4 root oinstall 4096 Mar 13 2016 u01
[root@his2 /]# chown -R oracle:oinstall hisback ---------- hisback oracle, oinstall;
drwxr-xr-x 2 oracle oinstall 4096 Mar 12 20:15 hisback
--------------- oracle, oracle ,raman ,permission denied;
[root@his2 /]# chmod 777 hisback --------------- hisback 777,u=7,g=7,o=7
[root@his2//]#mount-o username=hisbackup,password=hisbackup//192.168.1.1/his 1 rman/hisback--------私は当時このコマンドでマウントしていましたが、ネットディスクは確かにマウントされていましたが、このコマンドは権限を付与できませんでした. [root@his2hisback]#id oracle-----------oracleのuidとgid uid=1002(oracle)gid=1001(oinstall)groups=1001(oinstall)、1002(dba)、1004(asmdba)を表示
[root@his2//]#mount-t smbfs-o username=「hisbackup」、password=「hisbackup」、gid=「1001」、uid=「1002」//172.16.2.99/his 1 rman/hisbackmount:unknown filesystem type'smbfs'-----------------------------エラーが検出されましたcifs を使用してみてください
[root@his2/]#mount-t cifs-o username=“hisbackup”、password=“hisbackup”、gid=“1001”、uid=“1002”//192.168.1.1/his 1 rman/his 1 rman/his 1 rmanはローカルエリアネットワークwindowsネットワーク共有ディスクであり、/hisbackはマウントポイントである.Refer to the mount.cifs(8)manual page(e.g.man mount.cifs)----------のマウントに成功
####uid、gid、マウント時デフォルト所有者、所属グループrootを追加しない場合、マウント時デフォルト所有者と所属グループoracle を変更します.
[root@his2//]#mount----------mountちょっと見て、マウント状態/dev/mapper/vg_his2-lv_root on/type ext4 (rw) proc on/proc type proc (rw) sysfs on/sys type sysfs (rw) devpts on/dev/pts type devpts (rw,gid=5,mode=620) tmpfs on/dev/shm type tmpfs (rw)/dev/sda2 on/boot type ext4 (rw)/dev/sda1 on/boot/efi type vfat (rw,umask=0077,shortname=winnt)/dev/mapper/vg_his2-lv_home on/home type ext4 (rw) none on/proc/sys/fs/binfmt_misc type binfmt_misc (rw) none on/sys/kernel/config type configfs (rw) sunrpc on/var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) oracleasmfs on/dev/oracleasm type oracleasmfs (rw) gvfs-fuse-daemon on/root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev)//192.168.1.1/his1rman on/hisback type cifs (rw) [root@his2//]#su-oracle his 2:/home/oracle>rman target/---------------rmanバックアップRecovery Management:Release 11.2.0.4.0-Production on Tue Mar 12 20:43:31 2019 Copyright(c)1982,2011,Oracle and/or its affiliates. All rights reserved. connected to target database:KTYYDB(DBID=231736913)RMAN>run{2>allocate channel d 1 type disk;----------割当チャネル番号d 13>allocate channel d 2 type disk;4>allocate channel d 3 type disk;5>allocate channel d 4 type disk;6>backup database format='/hisback/kty_db_%U';------------------------------------hisbackバックアップするパス7>} using target database control file instead of recovery catalog allocated channel: d1 channel d1: SID=1906 instance=ktyydb2 device type=DISK allocated channel: d2 channel d2: SID=1271 instance=ktyydb2 device type=DISK allocated channel: d3 channel d3: SID=1283 instance=ktyydb2 device type=DISK allocated channel: d4 channel d4: SID=507 instance=ktyydb2 device type=DISK Starting backup at 12-MAR-19 channel d1: starting full datafile backup set channel d1: specifying datafile(s) in backup set input datafile file number=00006 name=+DG/ktyydb/datafile/ufhis_data01.dbf input datafile file number=00005 name=+DG/ktyydb/datafile/undotbs2.262.906346667 input datafile file number=00011 name=+DG/ktyydb/datafile/ufhis_data05.dbf channel d1: starting piece 1 at 12-MAR-19 channel d2: starting full datafile backup set channel d2: specifying datafile(s) in backup set input datafile file number=00007 name=+DG/ktyydb/datafile/ufhis_data02.dbf input datafile file number=00001 name=+DG/ktyydb/datafile/system.264.906346485 input datafile file number=00010 name=+DG/ktyydb/datafile/sysaux01.260906346485 channel d2: starting piece 1 at 12-MAR-19 channel d3: starting full datafile backup set channel d3: specifying datafile(s) in backup set input datafile file number=00008 name=+DG/ktyydb/datafile/ufhis_data03.dbf input datafile file number=00004 name=+DG/ktyydb/datafile/users.257.906346485 input datafile file number=00009 name=+DG/ktyydb/datafile/ufhis_data04.dbf channel d3: starting piece 1 at 12-MAR-19 channel d4: starting full datafile backup set channel d4: specifying datafile(s) in backup set input datafile file number=00002 name=+DG/ktyydb/datafile/sysaux.259.906346485 input datafile file number=00003 name=+DG/ktyydb/datafile/undotbs1.258.906346485 channel d4: starting piece 1 at 12-MAR-19 channel d4: finished piece 1 at 12-MAR-19 piece handle=/hisback/ktyy_db_3uts9ctc_1_1 tag=TAG20190312T204635 comment=NONE channel d4: backup set complete, elapsed time: 00:19:25 channel d1: finished piece 1 at 12-MAR-19 piece handle=/hisback/ktyy_db_3rts9ctc_1_1 tag=TAG20190312T204635 comment=NONE channel d1: backup set complete, elapsed time: 00:20:15 channel d2: finished piece 1 at 12-MAR-19 piece handle=/hisback/ktyy_db_3sts9ctc_1_1 tag=TAG20190312T204635 comment=NONE channel d2: backup set complete, elapsed time: 00:20:15 channel d3: finished piece 1 at 12-MAR-19 piece handle=/hisback/ktyy_db_3tts9ctc_1_1 tag=TAG20190312T204635 comment=NONE channel d3: backup set complete,elapsed time:00:24:36 Finished backup at 12-MAR-19 Starting Control File and SPFILEAutobackup at 12-MAR-19 piece handle=/rman/c-23217369113-c-23217369113-2020-2321736312-00 comment=NONE Finshed Control File and SPFILEAutobackup at 12-MAR-19 rereeased channel:d 1 reeased channel:d reeased channel:d 3 reeased channel:d 4 RMAN>exit------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------e.his 2:/home/oracle>exit---------------oracle を終了
[root@his2//]#ls-lh hisback----------------------バックアップしたデータファイルtotal 160 G-rwxr-xr-x 1 oracle oinstall 34 G Mar 12:58 ktyy_db_3rts9ctc_1_1 -rwxr-xr-x 1 oracle oinstall 34G Mar 12 12:58 ktyy_db_3sts9ctc_1_1 -rwxr-xr-x 1 oracle oinstall 62G Mar 12 13:03 ktyy_db_3tts9ctc_1_1 -rwxr-xr-x 1 oracle oinstall 32G Mar 12 12:58 ktyy_db_3uts9ctc_1_1 [root@his2//]#ls-lh/rman----------------バックアップの制御ファイルtotal 21 M-rw-r---1 oracle asmadmin 21 M Mar 12 21:11 c-2321736913-20190312-00 永久マウント:vim/etc/fstabを変更することでマウントを実現し、
例えば、/dev/sdb 1/home/newdisk ext 4 default 0/*を追加してsdb 1ディスクを追加し、起動自動マウント*/ 追加が完了すると、mount-aを実行すると有効になります。