Creating Partition Space In Sun Solaris 10

Share

Open  console and start with this :Oracle Database,DBA immam,DBA imam,oracle issues,oracle database,oracle clone issues,oracle clone,oracle autoconfig,oracle autoconfig issues

bash-3.00# format

It gives the following output.

Searching for disks…done
AVAILABLE DISK SELECTIONS:
0. c0d0 <DEFAULT cyl 2085 alt 2 hd 255 sec 63>
/pci@0,0/pci-ide@1,1/ide@0/cmdk@0,0
Specify disk (enter its number):


Check out, AVAILABLE DISK SELECTIONS. Now, I have only one disk (c0d0). Select the ‘0’ (Zero) no. disk to make partitioned in it.

Specify disk (enter its number): 0

It will give the following output.

selecting c0d0
Controller working list found
[disk formatted, defect list found]
Warning: Current Disk has mounted partitions.
/dev/dsk/c0d0s0 is currently mounted on /. Please see umount(1M).
/dev/dsk/c0d0s1 is currently used by swap. Please see swap(1M).
/dev/dsk/c0d0s3 is currently mounted on /mytest. Please see umount(1M).
FORMAT MENU:
disk          – select a disk
type         – select (define) a disk type
partition – select (define) a partition table
current    – describe the current disk
format     –  format and analyze the disk
fdisk         – run the fdisk program
repair      – repair a defective sector
show       – translate a disk address
label       – write label to the disk
analyze – surface analysis
defect    – defect list management
backup   – search for backup labels
verify     – read and display labels
save        – save new disk/partition definitions
volname – set 8-character volume name
!<cmd> – execute <cmd>, then return
quit
format>

Now enter ‘p’ (Partition) to initiate partitioning procedure in it.

format> p

It will give following output :

PARTITION MENU:
0 – change `0′ partition
1 – change `1′ partition
2 – change `2′ partition
3 – change `3′ partition
4 – change `4′ partition
5 – change `5′ partition
6 – change `6′ partition
7 – change `7′ partition
select – select a predefined table
modify – modify a predefined partition table
name – name the current table
print – display the current table
label – write partition map and label to the disk
!<cmd> – execute <cmd>, then return
quit
partition>

To see existing partitions, issue ‘p’ (print).

partition> p

It will give following output.

Current partition table (original):
Total disk cylinders available: 2085 + 2 (reserved cylinders)

Part      Tag     Flag      Cylinders         Size               Blocks
0       root    wm       3 – 1308       10.00GB          (1306/0/0)     20980890
1       swap    wu    1309 – 1570        2.01GB          (262/0/0)       4209030
2     backup    wm       0 – 2084       15.97GB         (2085/0/0)    33495525
3 unassigned    wu    1571 – 1672      800.11MB    (102/0/0)   1638630
4 unassigned    wm                     0               0                      (0/0/0)           0
5 unassigned    wm                     0               0                      (0/0/0)           0
6 unassigned    wm                     0               0                      (0/0/0)           0
7 unassigned    wm                     0               0                      (0/0/0)           0
8       boot    wu                          0 –    0        7.84MB    (1/0/0)       16065
9 alternates    wu                     1 –    2       15.69MB    (2/0/0)       32130

partition>

Checkout the table. No 0, 1, 2,8 and 9 is not usable. no. 3 is not usable as already created a partition there. 4,5,6 and 7 is available to make partition. So, I have selected 4.

partition> 4

It will give following output :

Part      Tag           Flag     Cylinders        Size            Blocks
4 unassigned    wm       0               0         (0/0/0)           0

Enter partition id tag[unassigned]:

Keep partition id and permission flags empty.

Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]:

Now, check previous partition of no. 4. It is number 3. Its Cylinders count ended at 1672. So, we will start from 1673. (If there is no no. 3 that i created previously, then we would have look for part no. 1. Not 2, because it is not usable, it represents whole disk size).

Now enter 1673

Enter new starting cyl[0]: 1673

and partition size 500mb.

Enter partition size[0b, 0c, 1673e, 0.00mb, 0.00gb]: 500mb

Now enter ‘label’ to confirm your partition.

partition> label
Ready to label disk, continue? y

Now, again see your partitioning summary.

partition> p
Current partition table (unnamed):
Total disk cylinders available: 2085 + 2 (reserved cylinders)

Part      Tag     Flag      Cylinders         Size               Blocks
0       root    wm       3 – 1308       10.00GB          (1306/0/0)     20980890
1       swap    wu    1309 – 1570        2.01GB          (262/0/0)       4209030
2     backup    wm       0 – 2084       15.97GB         (2085/0/0)    33495525
3 unassigned    wu    1571 – 1672      800.11MB    (102/0/0)   1638630
4 unassigned      wm    1673 – 1736     502.03MB   (64/0/0) 1028160
5 unassigned    wm                     0               0                      (0/0/0)           0
6 unassigned    wm                     0               0                      (0/0/0)           0
7 unassigned    wm                     0               0                      (0/0/0)           0
8       boot    wu                          0 –    0        7.84MB    (1/0/0)       16065
9 alternates    wu                     1 –    2       15.69MB    (2/0/0)       32130

Well, its done.

Now, issue ‘q’ to exit partition and again ‘q’ to exit format.

partition> q
FORMAT MENU:
disk – select a disk
type – select (define) a disk type
partition – select (define) a partition table
current – describe the current disk
format – format and analyze the disk
fdisk – run the fdisk program
repair – repair a defective sector
show – translate a disk address
label – write label to the disk
analyze – surface analysis
defect – defect list management
backup – search for backup labels
verify – read and display labels
save – save new disk/partition definitions
volname – set 8-character volume name
!<cmd> – execute <cmd>, then return
quit
format> q
bash-3.00#

Then, format file system.

bash-3.00# newfs /dev/rdsk/c0d0s4

Result :

bash-3.00# newfs /dev/rdsk/c0d0s4
newfs: construct a new file system /dev/rdsk/c0d0s4: (y/n)? y
Warning: 4032 sector(s) in last cylinder unallocated
/dev/rdsk/c0d0s4:           1028160 sectors in 168 cylinders of 48 tracks, 128 sectors
502.0MB in 13 cyl groups (13 c/g, 39.00MB/g, 18624 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 80032, 160032, 240032, 320032, 400032, 480032, 560032, 640032, 720032,
800032, 880032, 960032

Now, we have to mount this partition.

Create a directory in root directory.

bash-3.00# cd /
bash-3.00# mkdir oracle

Our partition is at ‘/dev/dsk/c0d0s4’. We will mount it to previously created oracle directory.

bash-3.00# mount /dev/dsk/c0d0s4 /oracle

Check newly created partition.

bash-3.00# cd /oracle/
bash-3.00# ls
lost+found
bash-3.00# df -h
Filesystem                         size   used  avail capacity  Mounted on
/dev/dsk/c0d0s0        9.9G   3.4G   6.4G    35%    /
/devices                             0K     0K     0K     0%    /devices
ctfs                                 0K     0K     0K     0%    /system/contract
proc                                 0K     0K     0K     0%    /proc
mnttab                               0K     0K     0K     0%    /etc/mnttab
swap                               2.3G   548K   2.3G     1%    /etc/svc/volatile
objfs                                0K     0K     0K     0%    /system/object
sharefs                              0K     0K     0K     0%    /etc/dfs/sharetab
fd                                   0K     0K     0K     0%    /dev/fd
swap                               2.3G   136K   2.3G     1%    /tmp
swap                               2.3G    32K   2.3G     1%    /var/run
/dev/dsk/c0d0s3        752M   1.0M   698M     1%    /mytest
/dev/dsk/c0d0s4        472M   1.0M   424M     1%    /oracle
bash-3.00#

To make it permanent. you need to edit the file ( /etc/vfstab ) {stands for Virtual File System Table} using command:

vi /etc/vfstab

now : enter your new partition information in the last line device to mount device

/dev/dsk/c0d0s4 /dev/rdsk/c0d0s4 /oracle ufs 1 yes –
Share

Comments

comments

Tags: , , , ,

Leave a Reply