In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Today, when a friend installed oracle 10g on the aix 5.3 system to build the database using a bare device, dbca reported an error exit when it was built to 2%. Looking at the alert log, it was found that the lack of temp tablespace was caused. The capacity of the bare device where the tablespace data file is located is 512m, and the size of the data file given when the database is built is 512m. Perhaps it is because the aix system is calculated in 1000, while the calculation capacity of oracle database is calculated in 1024, and then the oracle data file size is changed to 500m, then it passes normally.
However, warning prompts keep popping up in the alert log: WARNING: You are creating datafile / dev/temp01.
WARNING: Oracle recommends creating new datafiles on devices with zero offset. The command "/ usr/sbin/mklv-y LVname-T O-w n-s n-r n VGname NumPPs" can be used. Please contact Oracle customer support for more details . Through the inquiry of information and the help of friends, we finally found the cause of the problem and got the solution.
AIX has three vg types to choose from when creating a vg, which are Original Volume Group,Big Volume Group and Scalable Volume Group
For normal VG (Original Volume Group), no matter what command you use to create lv, it is a normal DS_LV type of LV.
For Big VG, it is the only VG that allows both LV types. If we specify-T O (note that this is the uppercase letter O), create a LV of type DS_LVZ; otherwise, create a normal type of LV. Such as
/ usr/sbin/mklv-y LVname-T O-w n-s n-r n VGname NumPPs.
For VG of type Scalable-type VG, no matter how you use the command to create lv, it is an extended LV of type DS_LVZ.
As can be seen from Oracle's warning log, when Oracle uses raw devices, it is recommended to set lv without 4k.
AIX calls this 4k offset lvcb (logical volume control block). It will occupy the first 512 bytes of 4k. It is similar to the Oracle data file header and retains the creation time of lv, mirror copy information, file system mount point, and so on.
You can see whether lv has a 4k offset from two aspects.
1. Host level
There is no 4k offset:
Quote
# lslv jfkdb_2G_044
LOGICAL VOLUME: jfkdb_2G_044 VOLUME GROUP: jfk_dbvg_01
LV IDENTIFIER: 00c3dff400004c00000001217a9d839e.84 PERMISSION: read/write
VG STATE: active/complete LV STATE: closed/syncd
TYPE: raw WRITE VERIFY: off
MAX LPs: 1024 PP SIZE: 32 megabyte
COPIES: 1 SCHED POLICY: parallel
LPs: 64 PPs: 64
STALE PPs: 0 BB POLICY: relocatable
INTER-POLICY: maximum RELOCATABLE: yes
INTRA-POLICY: middle UPPER BOUND: 1024
MOUNT POINT: N/A LABEL: None
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV?: yes
Serialize IO?: NO
DEVICESUBTYPE: DS_LVZ
There is a 4k offset:
Quote
[root@jfk_p560q /] # lslv jfkdb_2G_044
LOGICAL VOLUME: jfkdb_2G_044 VOLUME GROUP: jfk_db_vg01
LV IDENTIFIER: 00ce76de00004c00000001134ee6bc51.84 PERMISSION: read/write
VG STATE: active/complete LV STATE: opened/syncd
TYPE: raw WRITE VERIFY: off
MAX LPs: 1024 PP SIZE: 32 megabyte
COPIES: 1 SCHED POLICY: parallel
LPs: 64 PPs: 64
STALE PPs: 0 BB POLICY: relocatable
INTER-POLICY: maximum RELOCATABLE: yes
INTRA-POLICY: middle UPPER BOUND: 16
MOUNT POINT: N/A LABEL: None
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV?: yes
Serialize IO?: NO
(2) Oracle level:
Oracle provides a small tool dbfsize (under $ORACLE_HOME/bin) to observe whether lv has a 4k offset
No 4k offset:
Quote
$dbfsize / dev/rlvsysaux_1g
Database file: / dev/rlvsysaux_1g
Database file type: raw device without 4K starting offset
Database file size: 40960 8192 byte blocks
There is a 4k offset:
Quote
[oracle@jfk_p560q / dev] $dbfsize / dev/rjfkdb_2G_054
Database file: / dev/rjfkdb_2G_054
Database file type: raw device
Database file size: 262016 8192 byte blocks
If the database uses a block size of 16k, create a lv with a 4k offset across the pv with a stripe block size of 64k. This will result in the fourth block spanning two pv (striping operation in which the lvcb is also counted in the stripe block). This will lead to
The fourth Oracle block of a stripe block spans across disks. Apart from performance considerations, if the system or storage goes down abnormally, it is very easy to cause database block damage and ora-01578 errors. (metalink ID 261460.1)
Quote
$oerr ora 01578
01578, 00000, "ORACLE data block corrupted (file # s, block # s)"
/ / * Cause: The data block indicated was corrupted, mostly due to software
/ / errors.
/ / * Action: Try to restore the segment containing the block indicated. This
/ / may involve dropping the segment and recreating it. If there
/ / is a trace file, report the errors in it to your ORACLE
/ / representative.
That is, you cannot cancel 4k offerset with parameters when using Original Volume Group, and the only way is to set the oracle database db_block_size to 4k. (not recommended)
When using big VG, you can create a LV of type DS_LVZ by creating the LV plus-T-O parameter, thus canceling the offset of the previous 4K. However, it is said that big vg has a known bug, and Gu does not recommend it.
On the other hand, for VG of Scalable-type VG type, no matter how to create LV, there is no 4K offset, and more pp are supported, which supports the maximum capacity of a single file. (highly recommended)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.