用裸设备扩数据库表空间
欢迎进入Oracle社区论坛,与200万技术人员互动交流 >>进入 硬件环境:小型机 IBM P670,存储:IBM SHARK F-20 软件环境:操作系统 AIX5.1 数据库oracle9i 主题思想:物理卷PV-;卷组VG-;逻辑卷LV(类型:raw)-;添加表空间 操作过程: 一、 首先 #lsvg ?
欢迎进入Oracle社区论坛,与200万技术人员互动交流 >>进入
硬件环境:小型机 IBM P670,存储:IBM SHARK F-20
软件环境:操作系统 AIX5.1 数据库oracle9i
主题思想:物理卷PV->;卷组VG->;逻辑卷LV(类型:raw)->;添加表空间
操作过程:
一、 首先 #lsvg ? o //查看所有可用卷组
datavg03
datavg02
datavg01
datavg00
rootvg
二、 然后对用来专为数据库准备的卷组进行如下操作:
#lsvg ?l datavg03
datavg09:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
lvdata0316 raw 64 64 1 open/syncd N/A
lvdata0317 raw 64 64 1 open/syncd N/A
lvdata0318 raw 64 64 1 closed/syncd N/A
lvdata0319 raw 64 64 1 closed/syncd N/A
lvdata0320 raw 64 64 1 closed/syncd N/A
lvdata0321 raw 64 64 1 closed/syncd N/A
lvdata0322 raw 64 64 1 closed/syncd N/A
lvdata0323 raw 64 64 1 closed/syncd N/A
lvdata0324 raw 64 64 1 closed/syncd N/A
lvdata0325 raw 64 64 1 closed/syncd N/A
lvdata0326 raw 64 64 1 closed/syncd N/A
lvdata0327 raw 64 64 1 closed/syncd N/A
lvdata0328 raw 64 64 1 closed/syncd N/A
lvdata0329 raw 64 64 1 closed/syncd N/A
lvdata0330 raw 64 64 1 closed/syncd N/A
由显示可知:该卷组还有13个逻辑卷(裸设备)未被使用(如果在显示结果中没有closed/syncd状态的逻辑卷,可进入第3步)但如何知道这13个逻辑卷有多大容量呢,可以机使用如下命令:
#lslv lvdata0315
LOGICAL VOLUME: lvdata0309 VOLUME GROUP: datavg09
LV IDENTIFIER: 0037de1d00004c0000000105cd3b6816.11 PERMISSION: read/write
VG STATE: active/complete LV STATE: opened/syncd
TYPE: raw WRITE VERIFY: off
MAX LPs: 512 PP SIZE: 64 megabyte(s)
COPIES: 1 SCHED POLICY: parallel
LPs: 64 PPs: 64
STALE PPs: 0 BB POLICY: relocatable
INTER-POLICY: minimum RELOCATABLE: yes
INTRA-POLICY: middle UPPER BOUND: 32
MOUNT POINT: N/A LABEL: None
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
可看到物理分区大小为64M,由于在同一卷组当中,所以可以知道所有物理分区大小都是64M,从lsvg - l datavg09 的显示结果可看到,PPs:LPs=1:1所以,每个逻辑卷的大小是:LPs×PP SIZE=64*64M=4096M=4G,进而可知还有13个4G的逻辑卷,未被使用。
但到此还不能完全保证就可以使用这13个逻辑卷对数据库的表空间进行扩充,因为我们还不知到这些裸设备的属主,所以还需要如下步骤:
#cd /dev
# ls ?l rlvdata03* //显示以rlvdata03开头的文件属性
crw-rw---- 1 oracle dba 58, 20 Aug 22 11:33 rlvdata0318
crw-rw---- 1 oracle dba 58, 21 Aug 22 11:35 rlvdata0319
crw-rw---- 1 oracle dba 58, 22 Aug 22 11:37 rlvdata0320
crw-rw---- 1 oracle dba 58, 23 Aug 22 12:35 rlvdata0321
crw-rw---- 1 oracle dba 58, 24 Aug 22 12:37 rlvdata0322
crw-rw---- 1 oracle dba 58, 25 Aug 22 12:39 rlvdata0323
crw-rw---- 1 oracle dba 58, 26 Aug 22 12:39 rlvdata0324
crw-rw---- 1 oracle dba 58, 27 Aug 19 16:14 rlvdata0325
从查询结果可知,裸设备的属主已经是oracle了,oracle可以添加这些裸设备了,但如果裸设备的属主不是oracle而是其他用户,那么需要
#chown oracle:dab rlvdata03* //要根据实际情况修改,千万小心
三、添加表空间 我们可以登录数据库了,使用有创建或修改表空间权限的用户登录数据库(有多种方法),我们以sqlplus为例:
#su - oracle
$ sqlplus /nolog
SQL*Plus: Release 9.2.0.5.0 - Production on Mon Aug 22 12:49:55 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL>;conn /as sysdba
Connected.
SQL>;alter tablespace ts_index add datafile
2 ‘/dev/rlvdata0318’ size 4090; //size 是4090而不是4096,如果4096全部使用的话,容易出错
SQL>; Tablespace altered
可以反复以上操作,完成其它裸设备的添加,从而达到表空间扩充的目的。
但是如果以上13个逻辑卷还不能满足扩充需求,那么可以继续以下步骤
四、#lsvg datavg09 //查看卷组信息和使用情况,看是否还有足够的空间
VOLUME GROUP: datavg09 VG IDENTIFIER: 0037de1d00004c000000010
5cd3b6816
VG STATE: active PP SIZE: 64 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 2605 (166720 megabytes)
MAX LVs: 256 FREE PPs: 557 (35648 megabytes)
LVs: 32 USED PPs: 2048 (131072 megabytes)
OPEN LVs: 16 QUORUM: 3
TOTAL PVs: 5 VG DESCRIPTORS: 5
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 5 AUTO ON: no
MAX PPs per PV: 1016 MAX PVs: 32
LTG size: 128 kilobyte(s) AUTO SYNC: no
HOT SPARE: no
显示信息可以看到,该卷组目前还有35648M空间供使用,则可以进行如下操作:
#mklv -y ‘lvdata0331’ - t ‘raw’ datavg09 64
说明:在卷组datavg09上创建逻辑卷lvdata0331,逻辑卷的类型是raw,逻辑卷的lps是64
逻辑卷大小太大对会影响数据库性能,所以不宜创建过大的裸设备。
然后进行前面的‘三’节
但是如果当前所有的卷组都已使用完,没有可以用来添加裸设备的卷组,那么还要,创建卷组。
五、创建卷组 在创建之前,我们首先看一下有没有可用的物理卷
#lspv
vpath53 000b273dbe31ff50 datavg03
vpath54 000b273dbe320138 datavg03
vpath55 000b273dbe320303 datavg03
vpath56 000b273dbe320795 None
vpath57 000b273dbe320a46 None
vpath58 000b273dbe320c29 None
可以看到vpath56、vpath57、vpath58、还没有备卷组使用。由于当前环境的存储提供是磁盘阵列,所以vpath 是在阵列上指定了大小的,在小型机系统认到的所谓的“物理卷”(其实真正的物理卷,应该是
hdisk)。
# mkvg -f -y'datavg04' -s'64' '-n' vpath56 vpath57 vpath58
说明:用 vpath56 vpath57 vpath58 创建卷组datavg04,并且物理分区大小是64M
卷组创建好后,重复前面的步骤即可完成。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Oracle database server hardware configuration requirements: Processor: multi-core, with a main frequency of at least 2.5 GHz. For large databases, 32 cores or more are recommended. Memory: At least 8GB for small databases, 16-64GB for medium sizes, up to 512GB or more for large databases or heavy workloads. Storage: SSD or NVMe disks, RAID arrays for redundancy and performance. Network: High-speed network (10GbE or higher), dedicated network card, low-latency network. Others: Stable power supply, redundant components, compatible operating system and software, heat dissipation and cooling system.

The amount of memory required by Oracle depends on database size, activity level, and required performance level: for storing data buffers, index buffers, executing SQL statements, and managing the data dictionary cache. The exact amount is affected by database size, activity level, and required performance level. Best practices include setting the appropriate SGA size, sizing SGA components, using AMM, and monitoring memory usage.

After some users have updated and upgraded the win11 system, the computer has no sound. The problem of loving you is usually caused by no device, missing sound card driver, or unknown error. So how should we solve these problems? , this issue of win11 tutorial is here to answer everyone’s questions. Next, let’s take a look at the detailed steps. Solution to no sound after win11 upgrade: 1. No device 1. If we are using a desktop computer, it is probably because there is no device. 2. Because ordinary desktop computers do not come with built-in speakers, we need to plug in speakers or headphones to have sound. 2. The sound card driver is missing 1. After we update the Win11 system, the original sound card or audio device driver may not be available.

The amount of memory required for an Oracle database depends on the database size, workload type, and number of concurrent users. General recommendations: Small databases: 16-32 GB, Medium databases: 32-64 GB, Large databases: 64 GB or more. Other factors to consider include database version, memory optimization options, virtualization, and best practices (monitor memory usage, adjust allocations).

Recently, Samsung Display and Microsoft signed an important cooperation agreement. According to the agreement, Samsung Display will develop and supply hundreds of thousands of OLEDoS panels for mixed reality (MR) head-mounted devices to Microsoft. Microsoft is developing an MR device for multimedia content such as games and movies. This device is expected to It will be launched after the OLEDoS specifications are finalized, mainly serving the commercial field, and is expected to be delivered as early as 2026. OLEDoS (OLED on Silicon) technology OLEDoS is a new display technology that deposits OLED on a silicon substrate. Compared with traditional glass substrates, it is thinner and has higher pixels. OLEDoS display and ordinary display

How to use MySQLi to establish a database connection in PHP: Include MySQLi extension (require_once) Create connection function (functionconnect_to_db) Call connection function ($conn=connect_to_db()) Execute query ($result=$conn->query()) Close connection ( $conn->close())

Apple's latest releases of iOS18, iPadOS18 and macOS Sequoia systems have added an important feature to the Photos application, designed to help users easily recover photos and videos lost or damaged due to various reasons. The new feature introduces an album called "Recovered" in the Tools section of the Photos app that will automatically appear when a user has pictures or videos on their device that are not part of their photo library. The emergence of the "Recovered" album provides a solution for photos and videos lost due to database corruption, the camera application not saving to the photo library correctly, or a third-party application managing the photo library. Users only need a few simple steps

According to news on July 24, Apple recently pushed the highly anticipated visionOS1.3RC version update to VisionPro headset users. This update marks Apple’s continued innovation and progress in the field of virtual reality. Although the official did not clearly disclose the specific content of this update, users generally expect it to include performance optimization, functional improvements, and bug fixes. The internal version number of this update is 21O771, 141 days have passed since the last update. However, due to caching issues with node server configurations in Apple's various regions, some users may experience delays in upgrades and updates. Apple recommends users to back up their data before installing updates to ensure information security. 1.VisionPro users can use the "
