Posts Tagged ‘sun solaris 10’

Creating Partition Space In Sun Solaris 10

November 3rd, 2019, posted in Solaris
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

Tar: .file too large to archive. Use E function modifier

April 30th, 2018, posted in Solaris
Share

Tar, .file too large to archive, Use E function modifier,E function modifier,solaris 10,unix,linux,sun solaris 10,solaris administrator,Using TAR for big files

tar: .file too large to archive. Use E function modifier.

Using TAR for big files ( > 8GB)

In Unix environment, If you are trying to “tar” OS files that is bigger than 8 GB of size. Following error is observed.

Regular tar command:

tar -cvf test.dmp.tar test.dmp

Error:

tar: test.dmp too large to archive.  Use E function modifier.

Solution:

tar -cvEf test.dmp.tar test.dmp
Share

Fixing the ORA-27102: out of memory Error in Oracle on Solaris 10

April 8th, 2018, posted in Oracle Queries, Solaris
Share

Symptom:

As part of a database tuning effort you increase the SGA/PGA sizes; and Oracle greets with anORA-27102: out of memoryerror message. The system had enough free memory to serve the needs of Oracle.

SQL> startup
ORA-27102: out of memory
SVR4 Error: 22: Invalid argument

Diagnosis

$ oerr ORA 27102
27102, 00000, "out of memory"
// \*Cause: Out of memory
// \*Action: Consult the trace file for details

 

Not so helpful. Let’s look the alert log for some clues.

 

% tail -2 alert.log
WARNING: EINVAL creating segment of size 0x000000028a006000
fix shm parameters in /etc/system or equivalent

 

Oracle is trying to create a 10G shared memory segment (depends on SGA/PGA sizes), but operating system (Solaris in this example) responded with an invalid argument (EINVAL) error message. There is a little hint about setting shm parameters in/etc/system.

Prior to Solaris 10,shmsys:shminfo_shmmaxparameter has to be set in/etc/systemwith maximum memory segment value that can be created. 8M is the default value on Solaris 9 and prior versions; where as 1/4th of the physical memory is the default on Solaris 10 and later. On a Solaris 10 (or later) system, it can be verified as shown below:

 

% prtconf | grep Mem
Memory size: 32760 Megabytes
% id -p
uid=59008(oracle) gid=10001(dba) projid=3(default)
% prctl -n project.max-shm-memory -i project 3
project: 3: default
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
project.max-shm-memory
        privileged      7.84GB      -   deny                                 -
        system          16.0EB    max   deny                                 -

 

Now it is clear that the system is using the default value of 8G in this scenario, where as the application (Oracle) is trying to create a memory segment (10G) larger than 8G. Hence the failure.

So, the solution is to configure the system with a value large enough for the shared segment being created, so Oracle succeeds in starting up the database instance.

On Solaris 9 and prior releases, it can be done by adding the following line to/etc/system, followed by a reboot for the system to pick up the new value.

set shminfo_shmmax = 0x000000028a006000Howevershminfo_shmmaxparameter was obsoleted with the release of Solaris 10; and Sun doesn’t recommend setting this parameter in/etc/systemeven though it works as expected.

On Solaris 10 and later, this value can be changed dynamically on a per project basis with the help of resource control facilities . This is how we do it on Solaris 10 and later:

 

% prctl -n project.max-shm-memory -r -v 10G -i project 3
% prctl -n project.max-shm-memory -i project 3
project: 3: default
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
project.max-shm-memory
        privileged      10.0GB      -   deny                                 -
        system          16.0EB    max   deny                                 -

 

Note that changes made with theprctlcommand on a running system are temporary, and will be lost when the system is rebooted. To make the changes permanent, create a project withprojaddcommand and associate it with the user account as shown below:

 

% projadd -p 3  -c 'eBS benchmark' -U oracle -G dba  -K 'project.max-shm-memory=(privileged,10G,deny)' OASB
% usermod -K project=OASB oracle

 

Finally make sure the project is created withprojects -lorcat /etc/projectcommands.

 

% projects -l
...
...
OASB
        projid : 3
        comment: "eBS benchmark"
        users  : oracle
        groups : dba
        attribs: project.max-shm-memory=(privileged,10737418240,deny)
% cat /etc/project
...
...
OASB:3:eBS benchmark:oracle:dba:project.max-shm-memory=(privileged,10737418240,deny)

 

With these changes, Oracle would start the database up normally.

 

SQL> startup
ORACLE instance started.
Total System Global Area 1.0905E+10 bytes
Fixed Size                  1316080 bytes
Variable Size            4429966096 bytes
Database Buffers         6442450944 bytes
Redo Buffers               31457280 bytes
Database mounted.
Database opened.

 


 

Addendum : Oracle RAC settings

Anonymous Bob suggested the following settings for Oracle RAC in the form of a comment for the benefit of others who run into similar issue(s) when running Oracle RAC. I’m pasting the comment as is (Disclaimer: I have not verified these settings):

Thanks for a great explanation, I would like to add one comment that will help those with an Oracle RAC installation. Modifying the default project covers oracle processes great and is all that is needed for a single instance DB. In RAC however, the CRS process starts the DB and it is a root owned process and root does not use the default project. To fix ORA-27102 issue for RAC I added the following lines to an init script that runs before the init.crs script fires.

 

# Recommended Oracle RAC system params
ndd -set /dev/udp udp_xmit_hiwat 65536
ndd -set /dev/udp udp_recv_hiwat 65536
# For root processes like crsd
prctl -n project.max-shm-memory -r -v 8G -i project system
prctl -n project.max-shm-ids -r -v 512 -i project system
# For oracle processes like sqlplus
prctl -n project.max-shm-memory -r -v 8G -i project default
prctl -n project.max-shm-ids -r -v 512 -i project default

So simple yet it took me a week working with Oracle and SUN to come up with that answer…Hope that helps someone out.

Share