Wednesday, June 13, 2012

Creation of partition in Linux

Command (m for help): p <-----------------I have the disk of 42GB in size




Disk /dev/sdb: 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





Command (m for help): n <---------------- create the first primary partition of 2GB

Command action

e extended

p primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-5221, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-5221, default 5221): +2000M



Command (m for help): n <---------------- create the second primary partition of 2GB

Command action

e extended

p primary partition (1-4)

p

Partition number (1-4): 2

First cylinder (245-5221, default 245):

Using default value 245

Last cylinder or +size or +sizeM or +sizeK (245-5221, default 5221): +2000M



Command (m for help): n <---------------- create the third primary partition of 2GB

Command action

e extended

p primary partition (1-4)

p

Partition number (1-4): 3

First cylinder (489-5221, default 489):

Using default value 489

Last cylinder or +size or +sizeM or +sizeK (489-5221, default 5221): +2000M



Command (m for help): n <---------------- create the extented partition

Command action

e extended

p primary partition (1-4)

e

Selected partition 4

First cylinder (733-5221, default 733):

Using default value 733

Last cylinder or +size or +sizeM or +sizeK (733-5221, default 5221):

Using default value 5221



Command (m for help): n <---------------- create the fourth primary partition of 2GB

First cylinder (733-5221, default 733):

Using default value 733

Last cylinder or +size or +sizeM or +sizeK (733-5221, default 5221): +2000m



Command (m for help): n <---------------- create the fifth primary partition of 2GB

First cylinder (977-5221, default 977):

Using default value 977

Last cylinder or +size or +sizeM or +sizeK (977-5221, default 5221): +2000m



Command (m for help): n <---------------- create the sixth primary partition of 2GB

First cylinder (1221-5221, default 1221):

Using default value 1221

Last cylinder or +size or +sizeM or +sizeK (1221-5221, default 5221): +2000m



Command (m for help): n <---------------- create the seventh primary partition of 2GB

First cylinder (1465-5221, default 1465):

Using default value 1465

Last cylinder or +size or +sizeM or +sizeK (1465-5221, default 5221): +2000m



Command (m for help): n <---------------- create the eighth primary partition of 2GB

First cylinder (1709-5221, default 1709):

Using default value 1709

Last cylinder or +size or +sizeM or +sizeK (1709-5221, default 5221): +2000m



Command (m for help): n <---------------- create the ninth primary partition of 2GB

First cylinder (1953-5221, default 1953):

Using default value 1953

Last cylinder or +size or +sizeM or +sizeK (1953-5221, default 5221): +2000m



Command (m for help): n <---------------- create the tenth primary partition of 2GB

First cylinder (2197-5221, default 2197):

Using default value 2197

Last cylinder or +size or +sizeM or +sizeK (2197-5221, default 5221): +2000m



Command (m for help): n <---------------- create the eleventh primary partition of 2GB

First cylinder (2441-5221, default 2441):

Using default value 2441

Last cylinder or +size or +sizeM or +sizeK (2441-5221, default 5221): +2000m



Command (m for help): n <---------------- create the twelfth primary partition of 2GB

First cylinder (2685-5221, default 2685):

Using default value 2685

Last cylinder or +size or +sizeM or +sizeK (2685-5221, default 5221): +2000m



Command (m for help): n <---------------- create the thirteen primary partition of 2GB

First cylinder (2929-5221, default 2929):

Using default value 2929

Last cylinder or +size or +sizeM or +sizeK (2929-5221, default 5221): +2000m



Command (m for help): n <---------------- create the fourteen primary partition of 2GB

First cylinder (3173-5221, default 3173):

Using default value 3173

Last cylinder or +size or +sizeM or +sizeK (3173-5221, default 5221): +2000m



Command (m for help): n <---------------- create the fifteen primary partition of 2GB

The maximum number of partitions has been created





Command (m for help): p



Disk /dev/sdb: 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/sdb1 1 244 1959898+ 83 Linux<------- 1st

/dev/sdb2 245 488 1959930 83 Linux<------- 2nd

/dev/sdb3 489 732 1959930 83 Linux<------- 3rd

/dev/sdb4 733 5221 36057892+ 5 Extended

/dev/sdb5 733 976 1959898+ 83 Linux<------- 4th

/dev/sdb6 977 1220 1959898+ 83 Linux<------- 5th

/dev/sdb7 1221 1464 1959898+ 83 Linux<------- 6th

/dev/sdb8 1465 1708 1959898+ 83 Linux<------- 7th

/dev/sdb9 1709 1952 1959898+ 83 Linux<------- 8th

/dev/sdb10 1953 2196 1959898+ 83 Linux<------- 9th

/dev/sdb11 2197 2440 1959898+ 83 Linux<------- 10th

/dev/sdb12 2441 2684 1959898+ 83 Linux<------- 11th

/dev/sdb13 2685 2928 1959898+ 83 Linux<------- 12th

/dev/sdb14 2929 3172 1959898+ 83 Linux<------- 13th

/dev/sdb15 3173 3416 1959898+ 83 Linux<------- 14th



Command (m for help): w

The partition table has been altered!



Calling ioctl() to re-read partition table.

Syncing disks.



[root@localhost ~]# partprobe



[root@localhost ~]# 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 274 2096482+ 82 Linux swap / Solaris

/dev/sda3 275 2610 18763920 83 Linux



Disk /dev/sdb: 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/sdb1 1 244 1959898+ 83 Linux

/dev/sdb2 245 488 1959930 83 Linux

/dev/sdb3 489 732 1959930 83 Linux

/dev/sdb4 733 5221 36057892+ 5 Extended

/dev/sdb5 733 976 1959898+ 83 Linux

/dev/sdb6 977 1220 1959898+ 83 Linux

/dev/sdb7 1221 1464 1959898+ 83 Linux

/dev/sdb8 1465 1708 1959898+ 83 Linux

/dev/sdb9 1709 1952 1959898+ 83 Linux

/dev/sdb10 1953 2196 1959898+ 83 Linux

/dev/sdb11 2197 2440 1959898+ 83 Linux

/dev/sdb12 2441 2684 1959898+ 83 Linux

/dev/sdb13 2685 2928 1959898+ 83 Linux

/dev/sdb14 2929 3172 1959898+ 83 Linux

/dev/sdb15 3173 3416 1959898+ 83 Linux



[root@localhost ~]# oracleasm createdisk ASMDISK01 /dev/sdb1

Writing disk header: done

Instantiating disk: done



[root@localhost ~]# oracleasm createdisk ASMDISK02 /dev/sdb2

Writing disk header: done

Instantiating disk: done



[root@localhost ~]# oracleasm createdisk ASMDISK03 /dev/sdb3

Writing disk header: done

Instantiating disk: done



[root@localhost ~]# oracleasm createdisk ASMDISK04 /dev/sdb5

Writing disk header: done

Instantiating disk: done



[root@localhost ~]# oracleasm createdisk ASMDISK05 /dev/sdb6

Writing disk header: done

Instantiating disk: done



[root@localhost ~]# oracleasm createdisk ASMDISK06 /dev/sdb7

Writing disk header: done

Instantiating disk: done



[root@localhost ~]# oracleasm createdisk ASMDISK07 /dev/sdb8

Writing disk header: done

Instantiating disk: done



[root@localhost ~]# oracleasm createdisk ASMDISK08 /dev/sdb9

Writing disk header: done

Instantiating disk: done



[root@localhost ~]# oracleasm createdisk ASMDISK09 /dev/sdb10

Writing disk header: done

Instantiating disk: done



[root@localhost ~]# oracleasm createdisk ASMDISK10 /dev/sdb11

Writing disk header: done

Instantiating disk: done



[root@localhost ~]# oracleasm createdisk ASMDISK11 /dev/sdb12

Writing disk header: done

Instantiating disk: done



[root@localhost ~]# oracleasm createdisk ASMDISK12 /dev/sdb13

Writing disk header: done

Instantiating disk: done



[root@localhost ~]# oracleasm createdisk ASMDISK13 /dev/sdb14

Writing disk header: done

Instantiating disk: done



[root@localhost ~]# oracleasm scandisks

Reloading disk partitions: done

Cleaning any stale ASM disks...

Scanning system for ASM disks...



[root@localhost ~]# oracleasm listdisks

ASMDISK01

ASMDISK02

ASMDISK03

ASMDISK04

ASMDISK05

ASMDISK06

ASMDISK07

ASMDISK08

ASMDISK09

ASMDISK10

ASMDISK11

ASMDISK12

ASMDISK13



[root@localhost ~]#







No comments:

Post a Comment

ORA-12519: TNS:no appropriate service handler found error

ORA-12519: TNS: no appropriate service handler found error The real problem lies in the PROCESSES parameter All you need ...