If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > permissions for db2 dir

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-12-12, 19:34
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
permissions for db2 dir

How do you set permissions for:

- instance home dir
- dir's for tablespace containers
- dir's for active and archive transaction logs
- dir's for backup images


read/write for instance owner
read for instance's group
nothing for other


Does this look ok? Or does "other" need read for the instance home dir?
Reply With Quote
  #2 (permalink)  
Old 01-12-12, 21:16
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by db2girl View Post
Or does "other" need read for the instance home dir?
May be not for the entire home directory (depends on your server defaults), but definitely for sqllib, if only to run db2profile.
Reply With Quote
  #3 (permalink)  
Old 01-12-12, 21:43
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
Normally you create the instance owner and make the primary group of the instance owner to be db2iadm (or similar). The home directory and all database and tablespace mount points are owned by the instance owner before the instance is created. The instance owner permissions to home directory are automatically set correctly when useradd is used to create the user if the primary group is also specified.

Then when you create the instance, the persmissions should be set correctly for you and the primary group (who will automatically show up in the DBM cfg as SYSADM GROUP, or something like that).

Backup mount points are different, and are not changed by DB2 once you set them.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390

Last edited by Marcus_A; 01-12-12 at 21:51.
Reply With Quote
  #4 (permalink)  
Old 01-13-12, 00:30
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
All db2 mount points are currently owned by root which is incorrect (building a brand new server). I installed db2 but haven't created the instance yet, waiting for them to correct the instance home dir (they used /home which is not what we need) as well as the permissions for all db2 mount points.

For tablespaces/logs/backups mount points, I think rw for the instance owner and r for the instance owner's primary group should be correct (ownership would be db2inst1:db2iadm1).

But I'm not sure how to set instance home mount point (in my example, /sis/db2 is the mount point and /sis/db2/db2inst1 is the home dir) - should "other" have r(ead) for /sis/db2 and/or /sis/db2/db2inst1 before creating an instance? Or change permissions manually for .../sqllib/db2profile as Nick suggested (if not done during db2icrt). Does your instance home mount point or instance home dir have r for "other"?
Reply With Quote
  #5 (permalink)  
Old 01-13-12, 00:39
amitrai4 amitrai4 is offline
Registered User
 
Join Date: Aug 2011
Posts: 46
Reply With Quote
  #6 (permalink)  
Old 01-13-12, 07:45
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
Quote:
Originally Posted by amitrai4 View Post
In the link above, it specifies the following for the home directory of the instance owner:
For example, the permissions for the instance, db2inst1, in /home are:
drwxr-xr-x 36 db2inst1 db2grp1 4096 Jun 15 11:13 db2inst1
These are default permissions assigned to the home directory when the useradd command in Linux (or mkuser in AIX) is used to create the user. Normally, you want the instance owner to be a different mount point than the default home directory for all other users (which may be local disk for the default instead of a SAN mount point you may want to use).
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390

Last edited by Marcus_A; 01-13-12 at 07:57.
Reply With Quote
  #7 (permalink)  
Old 01-13-12, 19:05
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
I decided to leave the instance home's permissions unchanged (set as per the manual), but I will have to ensure that this doesn't violate their ITCS104 standards. I redirected all tablespace containers and transaction logs away from the instance home, so I hope the default permissions are ok.

Thank you.
Reply With Quote
  #8 (permalink)  
Old 01-13-12, 22:08
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
Quote:
Originally Posted by db2girl View Post
I decided to leave the instance home's permissions unchanged (set as per the manual), but I will have to ensure that this doesn't violate their ITCS104 standards. I redirected all tablespace containers and transaction logs away from the instance home, so I hope the default permissions are ok.

Thank you.
Transaction logs should always be on a different mount than the data, and make sure you tell your storage team that it cannot share any physical spindles with the data, (for redundancy purposes).

So long as intance owner is the owner of the transaction log mount point (and the others), DB2 will automatically set up the correct permissions underneath the mount point for the various paths.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #9 (permalink)  
Old 01-13-12, 23:56
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
Based on what I've seen so far, the LUW databases are relatively small (most important databases are all on z/OS). They used one filesystem for the instance home/tablespaces/logs/backups. I'm not sure how many disks there are. iostat is not installed. I found fdisk which shows:

[root@xxxxxxxxx ~]# fdisk -l

Disk /dev/sda: 899.6 GB, 899678208000 bytes
255 heads, 63 sectors/track, 109379 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 523 4096575 82 Linux swap / Solaris
/dev/sda3 524 109379 874385820 8e Linux LVM


Do you know if this means there is only one disk, /dev/sda, divided into 3 partitions? Is there some other command to get disk info on RHEL 5.7?
Reply With Quote
  #10 (permalink)  
Old 01-14-12, 00:59
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
Not sure about your question, but the reason putting them on separate disks is for redundancy, even when they are small enough for there not be a performance issue.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #11 (permalink)  
Old 01-14-12, 15:16
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
Thanks, I will check with them.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On