Link to home
Start Free TrialLog in
Avatar of walkerdba
walkerdba

asked on

partition

Can you please help me to find a solution for this problem ...


[root@RAC1 ~]# fdisk -l

Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 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        1288    10241437+  83  Linux
/dev/sda3            1289        1811     4200997+  82  Linux swap / Solaris
/dev/sda4            1812        5221    27390825    5  Extended
/dev/sda5            1812        2334     4200966   83  Linux
/dev/sda6            2335        5221    23189796   83  Linux

Disk /dev/sdb: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/sdc: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdc doesn't contain a valid partition table

Disk /dev/sdd: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdd doesn't contain a valid partition table

Disk /dev/sde: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sde doesn't contain a valid partition table

Disk /dev/sdf: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdf doesn't contain a valid partition table

Disk /dev/sdg: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdg doesn't contain a valid partition table

Disk /dev/sdh: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdh doesn't contain a valid partition table

Disk /dev/sdi: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdi doesn't contain a valid partition table

Disk /dev/sdj: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdj doesn't contain a valid partition table

Disk /dev/sdk: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdk doesn't contain a valid partition table

Disk /dev/sdl: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdl doesn't contain a valid partition table
[root@RAC1 ~]#


it says no free sectors  available
[root@RAC1 ~]# fdisk /dev/sda

The number of cylinders for this disk is set to 5221.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): u
Changing display/entry units to sectors

Command (m for help): n
No free sectors available

Command (m for help):



My goal is to achieve the below steps


Since there is not free sectors available what shoud I do

can I try fdisk /dev/sdb

Please help me the next step to achieve the below output goal...



========================================


3. Prepare the shared storage for Oracle RAC
This section describes how to prepare the shared storage for Oracle RAC
Each node in a cluster requires external shared disks for storing the Oracle Clusterware (Oracle Cluster
Registry and voting disk) files, and Oracle Database files. To ensure high availability of Oracle Clusterware
files on Oracle ASM, you need to have at least 2 GB of disk space for Oracle Clusterware files in three
separate failure groups, with at least three physical disks. Each disk must have at least 1 GB capacity to ensure
that there is sufficient space to create Oracle Clusterware files. Use the following guidelines when identifying
appropriate disk devices:
All of the devices in an Automatic Storage Management diskgroup should be the same size and have
the same performance characteristics.
·
· A diskgroup should not contain more than one partition on a single physical disk device.
Using logical volumes as a device in an Automatic Storage Management diskgroup is not supported
with Oracle RAC.
·
The user account with which you perform the installation (typically, 'oracle') must have write
permissions to create the files in the path that you specify.
·
3.1. Shared Storage
For this example installation we will be using ASM for Clusterware and Database storage on top of SAN
technology. The following Table shows the storage layout for this implementation:
Block Device ASMlib Name Size Comments
/dev/sda OCR_VOTE01 1 GB ASM Diskgroup for OCR and Voting Disks
/dev/sdb OCR_VOTE02 1 GB ASM Diskgroup for OCR and Voting Disks
/dev/sdc OCR_VOTE03 1 GB ASM Diskgroup for OCR and Voting Disks
/dev/sdd ASM_DATA01 2 GB ASM Data Diskgroup
/dev/sde ASM_DATA02 2 GB ASM Data Diskgroup
/dev/sdf ASM_DATA03 2 GB ASM Data Diskgroup
/dev/sdg ASM_DATA04 2 GB ASM Data Diskgroup
/dev/sdh ASM_DATA05 2 GB ASM Flash Recovery Area Diskgroup
/dev/sdi ASM_DATA06 2 GB ASM Flash Recovery Area Diskgroup
/dev/sdj ASM_DATA07 2 GB ASM Flash Recovery Area Diskgroup
/dev/sdk ASM_DATA08 2 GB ASM Flash Recovery Area Diskgroup
3.1.1. Partition the Shared Disks
1. Once the LUNs have been presented from the SAN to ALL servers in the cluster, partition the LUNs from
one node only, run fdisk to create a single whole-disk partition with exactly 1 MB offset on each LUN to be
used as ASM Disk.
Tip: From the fdisk prompt, type "u" to switch the display unit from cylinder to sector. Then create a single
primary partition starting on sector 2048 (1MB offset assuming sectors of 512 bytes per unit). See below
example for /dev/sda:
fdisk /dev/sda
Command (m for help): u
Changing display/entry units to sectors
3. Prepare the shared storage for Oracle RAC 10



Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First sector (61-1048575, default 61): 2048
Last sector or +size or +sizeM or +sizeK (2048-1048575, default 1048575):
Using default value 1048575
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
2. Load the updated block device partition tables by running the following on ALL servers participating in the
cluster:
#/sbin/partprobe
3.1.2. Installing and Configuring ASMLib
The ASMLib is highly recommended for those systems that will be using ASM for shared storage within the
cluster due to the performance and manageability benefits that it provides. Perform the following steps to
install and configure ASMLib on the cluster nodes:
NOTE: ASMLib automatically provides LUN persistence, so when using ASMLib there is no need to
manually configure LUN persistence for the ASM devices on the system.
1. Download the following packages from the ASMLib OTN page, if you are an Enterprise Linux customer
you can obtain the software through the Unbreakable Linux network.
NOTE: The ASMLib kernel driver MUST match the kernel revision number, the kernel revision number of
your system can be identified by running the "uname -r" command. Also, be sure to download the set of
RPMs which pertain to your platform architecture, in our case this is x86_64.
oracleasm-support-2.1.3-1.el5x86_64.rpm
oracleasmlib-2.0.4-1.el5.x86_64.rpm
oracleasm-2.6.18-92.1.17.0.2.el5-2.0.5-1.el5.x86_64.rpm
2. Install the RPMs by running the following as the root user:
# rpm -ivh oracleasm-support-2.1.3-1.el5x86_64.rpm \
oracleasmlib-2.0.4-1.el5.x86_64.rpm \
oracleasm-2.6.18-92.1.17.0.2.el5-2.0.5-1.el5.x86_64.rpm
3. Configure ASMLib by running the following as the root user:
NOTE: If using user and group separation for the installation (as documented here), the ASMLib driver
interface owner is 'grid' and the group to own the driver interface is 'asmadmin'. These groups were created in
section 2.1. If a more simplistic installation using only the Oracle user is performed, the owner will be 'oracle'
and the group owner will be 'dba'.
3.1.1. Partition the Shared Disks 11


#/etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library driver. The following questions will
determine whether the driver is loaded on boot and what permissions it will have. The current values will be
shown in brackets ('[]'). Hitting <ENTER> without typing an answer will keep that current value. Ctrl-C will
abort.
Default user to own the driver interface []: grid
Default group to own the driver interface []: asmadmin
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
4. Repeat steps 2 - 4 on ALL cluster nodes.
3.1.3. Using ASMLib to Mark the Shared Disks as Candidate Disks
To create ASM disks using ASMLib:
1. As the root user, use oracleasm to create ASM disks using the following syntax:
# /usr/sbin/oracleasm createdisk disk_name device_partition_name
In this command, disk_name is the name you choose for the ASM disk. The name you choose must contain
only ASCII capital letters, numbers, or underscores, and the disk name must start with a letter, for example,
DISK1 or VOL1, or RAC_FILE1. The name of the disk partition to mark as an ASM disk is the
device_partition_name. For example:
# /usr/sbin/oracleasm createdisk OCR_VOTE01 /dev/sda1
# /usr/sbin/oracleasm createdisk OCR_VOTE02 /dev/sdb1
# /usr/sbin/oracleasm createdisk OCR_VOTE03 /dev/sdc1
# /usr/sbin/oracleasm createdisk ASMDATA01 /dev/sdd1
# /usr/sbin/oracleasm createdisk ASMDATA02 /dev/sde1
# /usr/sbin/oracleasm createdisk ASMDATA03 /dev/sdf1
# /usr/sbin/oracleasm createdisk ASMDATA04 /dev/sdg1
# /usr/sbin/oracleasm createdisk ASMDATA05 /dev/sdh1
# /usr/sbin/oracleasm createdisk ASMDATA06 /dev/sdi1
# /usr/sbin/oracleasm createdisk ASMDATA07 /dev/sdj1
# /usr/sbin/oracleasm createdisk ASMDATA08 /dev/sdk1
If you need to unmark a disk that was used in a createdisk command, you can use the following syntax as the
root user:
# /usr/sbin/oracleasm deletedisk disk_name
2. Repeat step 1 for each disk that will be used by Oracle ASM.
3.1.2. Installing and Configuring ASMLib 12


3. After you have created all the ASM disks for your cluster, use the listdisks command to verify their
availability:
# /usr/sbin/oracleasm listdisks
OCR_VOTE01
OCR_VOTE02
OCR_VOTE03
ASMDATA01
ASMDATA02
ASMDATA03
ASMDATA04
ASMDATA05
ASMDATA06
ASMDATA07
ASMDATA08
4. On all the other nodes in the cluster, use the scandisks command as the root user to pickup the newly
created ASM disks. You do not need to create the ASM disks on each node, only on one node in the cluster.
# /usr/sbin/oracleasm scandisks
Scanning system for ASM disks [ OK ]
5. After scanning for ASM disks, display the available ASM disks on each node to verify their availability:
# /usr/sbin/oracleasm listdisks
OCR_VOTE01
OCR_VOTE02
OCR_VOTE03
ASMDATA01
ASMDATA02
ASMDATA03
ASMDATA04
ASMDATA05
ASMDATA06
ASMDATA07
ASMDATA08
4. Oracle Grid Infrastructure Install
4.1. Basic Grid Infrastructure Install (without GNS and IPMI)
As the grid user (Grid Infrastructure software owner) start the installer by running "runInstaller" from the
staged installation media.
NOTE: Be sure the installer is run as the intended software owner, the only supported method to change the
software owner is to reinstall.
3.1.3. Using ASMLib to Mark the Shared Disks as Candidate Disks 13
Avatar of skullnobrains
skullnobrains

it would be easier if you stated which operation is producing the no free sectors message and gave a little background regarding the steps you already took

what is the output of "df -h" ? and "df -hi" ?

what the hell are you trying to do with that bunch of small disks ? are they actually disks ? usb keys ? small flah cards ?

have you setup a shared storage as required ?
Avatar of walkerdba

ASKER

[root@RAC1 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2             9.5G  6.2G  2.9G  69% /
/dev/sda6              22G  173M   21G   1% /u01
/dev/sda5             3.9G  137M  3.6G   4% /tmp
/dev/sda1              99M   11M   83M  12% /boot
tmpfs                 2.0G     0  2.0G   0% /dev/shm
[root@RAC1 ~]# df -hi
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/sda2               2.5M    127K    2.4M    6% /
/dev/sda6               5.6M      20    5.6M    1% /u01
/dev/sda5               1.1M      78    1.1M    1% /tmp
/dev/sda1                26K      33     26K    1% /boot
tmpfs                   213K       1    213K    1% /dev/shm
[root@RAC1 ~]#
ok, so you have plenty of space left in your existing filesystems

what operation produces the no free sectors message ?

i cannot help if you don't say the following
-> i'm attempting this operation
-> i'm expecting this result
-> i had this result instead

... and if possible answer my other questions
[root@RAC1 ~]# fdisk /dev/sda

The number of cylinders for this disk is set to 5221.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): u
Changing display/entry units to sectors

Command (m for help): n
No free sectors available

Command (m for help):

It says not sectors available...


I want to  create partition in sda
ASKER CERTIFIED SOLUTION
Avatar of skullnobrains
skullnobrains

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Your /dev/sda has already been used for OS, but you still have sdb, sdc, sdd, sde, sdf, sdg, sdh, sdi, sdj etc availible for using. Following th instruction, just don't use sda.
I gave /dev/sdb

What is the problem now..

[root@RAC1 ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-261, default 1): 100
Last cylinder or +size or +sizeM or +sizeK (100-261, default 261): w
Last cylinder or +size or +sizeM or +sizeK (100-261, default 261):
First cylinder usually started at "1", and Last cylinder is what you want, eg 100MB etc.
there is no problem except that the drive is not partitioned yet so fdisk complains that it cannot read the partition table. just write a valid partition table, and it will be ok

but then i do not know what you expect from a 2Gb drive if you want to run a database

what the hell is this bunch of small drives ?
created..