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 > Problem creating tablespace on raw device on AIX system

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-10-11, 02:34
nobody1 nobody1 is offline
Registered User
 
Join Date: Jun 2011
Posts: 9
Problem creating tablespace on raw device on AIX system

Hi,

I am trying to backup a tablespace created on a raw device on AIX system.
I have created a raw device in AIX using 'mklv'. I have executed the following command to create a tablespace on raw device:
db2 => create tablespace ts4 managed by database using (device '/dev/rawlv' 100)

It gives the below error:
DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned:
SQL0298N Bad container path. SQLSTATE=428B2

I have attached the db2diag.log file for reference.
Any suggestions where I am going wrong?

Thanks in advance
Attached Files
File Type: txt db2diag_log.txt (7.7 KB, 29 views)
Reply With Quote
  #2 (permalink)  
Old 06-10-11, 03:39
nvk@vhv nvk@vhv is offline
Registered User
 
Join Date: Jan 2010
Posts: 294
Code:
2011-06-09-06.32.50.898281-240 E2053A1288         LEVEL: Error (OS)
PID     : 569388               TID  : 2315        PROC : db2sysc 0
INSTANCE: db2inst1             NODE : 000         DB   : DB2DATA
APPHDL  : 0-7                  APPID: *LOCAL.db2inst1.110609102615
AUTHID  : DB2INST1
EDUID   : 2315                 EDUNAME: db2agent (DB2DATA) 0
FUNCTION: DB2 UDB, oper system services, sqlodelete, probe:40
MESSAGE : ZRC=0x840F0001=-2079391743=SQLO_ACCD "Access Denied"
          DIA8701C Access denied for resource "", operating system return code
          was "".
CALLED  : OS, -, unlink
OSERR   : EACCES (13) "Permission denied"
DATA #1 : File name, 11 bytes
Check the Permissions.
Reply With Quote
  #3 (permalink)  
Old 06-10-11, 04:57
nobody1 nobody1 is offline
Registered User
 
Join Date: Jun 2011
Posts: 9
Question

Permissions for the raw device created are as follows:

brw-rw---- 1 db2inst1 system 10, 16 Jun 09 06:14 /dev/rawdev

Do I need to changethem?
Reply With Quote
  #4 (permalink)  
Old 06-10-11, 08:20
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by nobody1 View Post
create tablespace ts4 managed by database using (device '/dev/rawlv' 100)
Quote:
Originally Posted by nobody1 View Post
brw-rw---- 1 db2inst1 system 10, 16 Jun 09 06:14 /dev/rawdev
Are you sure?
Reply With Quote
  #5 (permalink)  
Old 06-13-11, 01:51
nobody1 nobody1 is offline
Registered User
 
Join Date: Jun 2011
Posts: 9
Unhappy

Sorry that was just a typo error

Correct cmd is:
create tablespace ts4 managed by database using (device '/dev/rawdev' 100M)
Reply With Quote
  #6 (permalink)  
Old 06-13-11, 02:25
nobody1 nobody1 is offline
Registered User
 
Join Date: Jun 2011
Posts: 9
Question

Do I have to perform binding of raw device to a block device before creating a tablespace on it?
Reply With Quote
  #7 (permalink)  
Old 06-13-11, 03:06
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
Nobody (except apparently nobody1) uses raw devices any more for DB2 tablespaces.
__________________
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
  #8 (permalink)  
Old 06-13-11, 03:42
nobody1 nobody1 is offline
Registered User
 
Join Date: Jun 2011
Posts: 9
Question

But this is an requirement, Can you please let me know the steps for creating tablespace on raw devices in db2?
Reply With Quote
  #9 (permalink)  
Old 06-13-11, 04:26
vinubaby vinubaby is offline
Registered User
 
Join Date: Jun 2011
Posts: 4
Wink Nobody1

Going through the conversations I feel that the issue is with the permissions on the file system.

Plz answer me the following points,
1) Are you able to see the Filesystem.
2) However UNMOUNT & REMOUNT the partition once.
3) Check the permissions on the FS using the command below,
ls -ld 'FS' --> ls -ld '/dev/mapper'

Kindly check the URL below for steps to create a TBS on a RAW Device.

DB2 Database for Linux, UNIX, and Windows
Reply With Quote
  #10 (permalink)  
Old 06-13-11, 04:53
nobody1 nobody1 is offline
Registered User
 
Join Date: Jun 2011
Posts: 9
Question

Quote:
Originally Posted by vinubaby View Post
Going through the conversations I feel that the issue is with the permissions on the file system.

Plz answer me the following points,
1) Are you able to see the Filesystem.
2) However UNMOUNT & REMOUNT the partition once.
3) Check the permissions on the FS using the command below,
ls -ld 'FS' --> ls -ld '/dev/mapper'

Kindly check the URL below for steps to create a TBS on a RAW Device.

DB2 Database for Linux, UNIX, and Windows

Do I need to mount a Filesystem on the raw partition?
If yes how do I do that?
Reply With Quote
  #11 (permalink)  
Old 06-13-11, 05:15
vinubaby vinubaby is offline
Registered User
 
Join Date: Jun 2011
Posts: 4
Wink

Dear,

I have asked few questions, I need answers on that,



Kindly find the below to mount a partition,

http://www.building43.com/blogs/2010...scue-in-linux/
Reply With Quote
  #12 (permalink)  
Old 06-13-11, 05:31
nobody1 nobody1 is offline
Registered User
 
Join Date: Jun 2011
Posts: 9
Red face

Quote:
Originally Posted by vinubaby View Post
Dear,

I have asked few questions, I need answers on that,



Kindly find the below to mount a partition,

http://www.building43.com/blogs/2010...scue-in-linux/
I am working on an AIX platform and I didnt find any steps to mount a filesystem on the raw partition.

But is it required to mount a filesystem on a raw partion?
If yes then what is the use of creating tablespaces on raw devices?

Last edited by nobody1; 06-13-11 at 06:15.
Reply With Quote
  #13 (permalink)  
Old 06-13-11, 07:54
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by vinubaby View Post
Plz answer me the following points,
1) Are you able to see the Filesystem.
2) However UNMOUNT & REMOUNT the partition once.
3) Check the permissions on the FS using the command below,
ls -ld 'FS' --> ls -ld '/dev/mapper'
Vinubaby, we're discussing raw devices here; they're called raw because they have no filesystems on them. Your advice is totally out of whack.
Reply With Quote
  #14 (permalink)  
Old 06-13-11, 07:59
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by nobody1 View Post
Do I have to perform binding of raw device to a block device before creating a tablespace on it?
As far as I know, character raw devices are not supported in DB2 9.7; you'd need to use block devices.

Configuring and setting up DMS direct disk access (Linux) - IBM DB2 9.7 for Linux, UNIX, and Windows
Reply With Quote
  #15 (permalink)  
Old 06-13-11, 08:47
nobody1 nobody1 is offline
Registered User
 
Join Date: Jun 2011
Posts: 9
Quote:
Originally Posted by n_i View Post
As far as I know, character raw devices are not supported in DB2 9.7; you'd need to use block devices.

Configuring and setting up DMS direct disk access (Linux) - IBM DB2 9.7 for Linux, UNIX, and Windows
using mklv the following raw device file is created:

brw-rw---- 1 db2inst1 system 10, 16 Jun 09 06:14 /dev/rawdev
crw-rw---- 1 db2inst1 system 10, 16 Jun 09 06:14 /dev/rrawdev

and I am using /dev/rawdev to create tablespace on.
Am I correct in using the block device for tablespace creation? Or are there any steps to be followed before this?

I am working on AIX platform
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