Docker run OGG Classic Architecture container from CIFS with docker-volume-netshare Plugin

Docker run OGG Classic Architecture container from CIFS with docker-volume-netshare_0.36_linux_amd64 Plugin

1. Mount SMB storage to Linux as CIFS
[root@linuxvm01 docker-volume-netshare_0.36_linux_amd64]# sudo mount -t cifs -o username=smb_user,file_mode=0777,dir_mode=0777,uid=54321,gid=54321 \\\\191.168.11.122\\shared /u01
\\191.168.11.122\shared on /u01 type cifs (rw,relatime,vers=default,cache=strict,username=smb_user,domain=,uid=54321,forceuid,gid=54321,forcegid,addr=191.168.11.122,file_mode=0777,dir_mode=0777,soft,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1)

2. Run docker-volume-netshare plugin with CIFS
[root@linuxvm01 docker-volume-netshare_0.36_linux_amd64]# sudo ./docker-volume-netshare cifs

2019/08/16 19:13:44 Entering go-plugins-helpers getPath
2019/08/16 19:13:44 Entering go-plugins-helpers createPath
2019/08/16 19:13:44 Entering go-plugins-helpers hostVirtualPath
2019/08/16 19:14:01 Entering go-plugins-helpers getPath
2019/08/16 19:14:01 Entering go-plugins-helpers getPath
2019/08/16 19:14:01 Entering go-plugins-helpers mountPath
INFO[3201] Mount: mediashare, ID: 4e7fc7953fe02237b30c8184eeaf14671d85cffa3efe1541e050dd60e743053c
INFO[3201] Mounting CIFS volume //191.168.11.122/shared/dirdat on /var/lib/docker-volumes/netshare/cifs/mediashare
INFO[3201] Incrementing for mediashare
INFO[3201] Previous connections state : 0
INFO[3201] Current connections state : 1

3. Create a volume of CIFS
docker volume create \
-d cifs \
-o share=191.168.11.122/shared/dirdat \
–opt username=smb_user \
–opt password=****. \
–opt fileMode=0777 \
–opt dirMode=0777 \
–opt noperm \
–opt forceuid \
–opt forcegid \
–opt rw \
–opt uid=54321 \
–opt gid=54321 \
–name vol-dirdat

[oracle@linuxvm01 ]$ docker volume ls
DRIVER VOLUME NAME
cifs vol-dirdat
[oracle@linuxvm01 ]$ docker volume inspect vol-dirdat
[
{
“Driver”: “cifs”,
“Labels”: {},
“Mountpoint”: “/var/lib/docker-volumes/netshare/cifs/vol-dirdat”,
“Name”: “vol-dirdat”,
“Options”: {
“dirMode”: “0777”,
“fileMode”: “0777”,
“forcegid”: “”,
“forceuid”: “”,
“gid”: “54321”,
“noperm”: “”,
“password”: “****.”,
“rw”: “”,
“share”: “191.168.11.122/shared/dirdat”,
“uid”: “54321”,
“username”: “smb_user”
},
“Scope”: “local”
}
]

4. Doker run ogg ca container from CIFS volume
docker run -d –network host -e PORT_BASE=7609 -v vol-dirdat:/u01/app/ogg/dirdat \
–name ogg-ca \
–cap-add SYS_RESOURCE \
-e https_proxy=”” \
-e http_proxy=”” \
linuxvm01:/goldengate-standard:12.3.0.1.4

[oracle@linuxvm01 ~]$ docker exec -it –user oracle ogg-ca bash
[oracle@linuxvm01 ogg]$ ls -lrt |grep dirdat
drwxrwxrwx. 2 root root 0 Aug 12 08:16 dirdat
[oracle@linuxvm01 ogg]$ cd dir
dirchk/ dircrd/ dirdat/ dirdef/ dirdmp/ diretc/ dirout/ dirpcs/ dirprm/ dirrpt/ dirsca/ dirsql/ dirtmp/ dirwlt/
[oracle@linuxvm01 ogg]$ cd dirdat/
[oracle@linuxvm01 dirdat]$ ls -lrt
total 0
drwxrwxrwx. 2 root root 0 Aug 13 15:05 u01
[oracle@linuxvm01 dirdat]$ cd u01/
[oracle@linuxvm01 dirdat]$ ls -lrt
total 22336
-rwxrwxrwx. 1 root root 22837307 Aug 15 20:50 RP000000000
[oracle@linuxvm01 dirdat]$
[oracle@linuxvm01 dirdat]$ touch tst
[oracle@linuxvm01 dirdat]$ ls -lrt
total 22336
-rwxrwxrwx. 1 root root 22837307 Aug 15 20:50 RP000000000
-rwxrwxrwx. 1 root root 0 Aug 16 17:15 tst
[oracle@linuxvm01 dirdat]$ exit
[oracle@linuxvm01 ~]$ cd /u01/oracle/dirdat/
[oracle@linuxvm01 dirdat]$ ls -lrt
total 22336
-rwxr-xr-x. 1 oracle oinstall 22837307 Aug 15 22:50 RP000000000
-rwxr-xr-x. 1 oracle oinstall 0 Aug 16 19:15 tst

Leave a Reply

Your email address will not be published. Required fields are marked *