This only works if in a single system operation, where the read only root is 
not mounted to multiple systems at once, or you are in a full sysplex shared 
filesystem.

If you are sharing the root amongst multiple systems read only, your only 
option is to create a new root filesystem, and add the new directory, and then 
presumably, IPL it into use.

If you fit into one of those catagories, then a simple chmount -w / (or /your 
version root) to make it read/write, make your change and then chmount -r / (or 
/your version root) to set it back to read only again.

_________________________________________________________________
Dave Jousma
Manager Mainframe Engineering, Assistant Vice President
[email protected]
1830 East Paris, Grand Rapids, MI  49546 MD RSCB2H
p 616.653.8429
f 616.653.2717


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of John McKown
Sent: Tuesday, May 24, 2016 2:11 PM
To: [email protected]
Subject: Re: OMVS Directory RW change

On Tue, May 24, 2016 at 12:41 PM, zos reader <[email protected]> wrote:

> Hi All,
>
> In my environment, by default OMVS is root directories will be in Read 
> mode. I have request from DB2 to create a directory on root directory 
> and mount to zfs file.
>
> Directory to be created -     /products/DB2
>
> ZFS file to mounted - SYS1. OMVS.DB2V10.RSU.ZFS
>
> Once i am done with my directory creation and mounting i need to 
> revert back to Read mode itself.
>
> i am not much familiar on OMVS side, please help me to get this done
>

​The easiest way is to use ISHELL (from ISPF option 6). Put a slash, /, for the 
root directory in the lower area ​where the path goes. Put the cursor on 
"File_Systems" at the top & press ENTER. Select option 1 (Mount table).
Find the DSN of your root filesystem in the list. Put an M in front of it.
Select option 1 to remount as READ/WRITE. !! IMPORTANT !! make sure that you 
select the proper root system. z/OS has three: SYSPLEX, VERSION, and SYSTEM. 
You need to remount the appropriate one, in my case that is the SYSPLEX one. 
Use ISPF option 6 to create the directory. Most easily:

MKDIR '/products' MODE(7,5,5)
MKDIR '/products/DB2' MODE(7,5,5)

You only need the first MKDIR if the /products directory does not already 
exist. Which I assume that it does not. Strange that they're putting it there 
rather than /usr/lpp, but I don't know DB2 installation.

Remount the root as READONLY using ISHELL again.

One problem: the /products and /products/DB2 directories will be owned by the 
user who does the commands. Also, I am assuming that you have the proper UNIX 
authorities to do the commands to the root directory.

To me, it is easier to do the above in the OMVS (UNIX shell) environment.
On ISPF option 6, do: OMVS to get a UNIX shell. You can now enter the commands 
(pay attention to case, it matters!)

chmount -w / #change root to writable
mkdir -p -m 0755 /products/DB2 # create directory chown 0:0 /products # change 
owner to root chown 0:0 /products/DB2 chmount -r / # change back to readonly 
mount -f SYS1.OMVS.DBV2V10.RSU.ZFS /products/DB2 exit

The # mark tells the shell that the rest of the line is a comment, omit if you 
want to. I put it in just to let you know what each line is doing.
Update the appropriate BPXPRMxx member of PARMLIB to mount the filesystem at 
IPL time.




>
> Thanks,
> Samat.
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions, send 
> email to [email protected] with the message: INFO IBM-MAIN
>



--
The unfacts, did we have them, are too imprecisely few to warrant our certitude.

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO IBM-MAIN

This e-mail transmission contains information that is confidential and may be 
privileged.   It is intended only for the addressee(s) named above. If you 
receive this e-mail in error, please do not read, copy or disseminate it in any 
manner. If you are not the intended recipient, any disclosure, copying, 
distribution or use of the contents of this information is prohibited. Please 
reply to the message immediately by informing the sender that the message was 
misdirected. After replying, please erase it from your computer system. Your 
assistance in correcting this error is appreciated.


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to