I have a hard disk. After inserting this what are the
recommended steps to install it on your solaris



I have a hard disk. After inserting this what are the recommended steps to install it on your sola..

Answer / harish

First check for a new hardware: # devfsadm
New you will find a new disk on another bus c1t*do @ /dev/rdsk/c1t*d0s0 (here‘*’ indicates the diskette number) to list available disks # ls /dev/rdsk/*s0
Next have to format the new for creating the partitions
# format (it will list all the available disks)
Then select the disk number hit enter then it’ll show
Selecting c1t*d0
[Disk formatted]
If suppose it’s not formatted automatically, then type format at format prompt to low level format the disk and create a partition, then type ‘y’ to create the default partition.
# format> fdisk
No fdisk table exists. The default partition for the disk is: a 100% “SOLARIS System” partition Type “y” to accept the default partition, otherwise type “n” to edit the partition table. Y
Go to partition menu by typing partition at format prompt
Type print to display the default table
#partition > print
Then select partition 0 (zero) and create the partition
#partition> 0
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 0 (0/0/0) 0

Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]: 1
Enter partition size[0b, 0c, 1e, 0.00mb, 0.00gb]: 1.9gb
Then label the partition
#partition> label
Ready to label disk, continue? Y
Then quit
#partition> quit
#format> quit
#
Create a file system on the disk
bash-3.00# newfs /dev/rdsk/c2t1d0s0
newfs: construct a new file system /dev/rdsk/c2t1d0s0: (y/n)? y
/dev/rdsk/c2t1d0s0: 3985408 sectors in 973 cylinders of 128 tracks, 32 secto
rs
1946.0MB in 43 cyl groups (23 c/g, 46.00MB/g, 11264 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 94272, 188512, 282752, 376992, 471232, 565472, 659712, 753952, 848192,
3109952, 3204192, 3298432, 3392672, 3486912, 3581152, 3675392, 3769632,
3863872, 3958112
bash-3.00#
now the new file system is created

now mount this and use it
----------------------------------------------------
bash-3.00# ls /dev/rdsk/*s0 (checking the avalilable disks)
/dev/rdsk/c0d0s0 /dev/rdsk/c1t0d0s0 /dev/rdsk/c2t0d0s0
bash-3.00# devfsadm(checking for new hardware)
bash-3.00# ls /dev/rdsk/*s0
/dev/rdsk/c0d0s0 /dev/rdsk/c1t0d0s0 /dev/rdsk/c2t0d0s0 /dev/rdsk/c2t1d0s0(got the new disk)

bash-3.00# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
0. c0d0 <DEFAULT cyl 1302 alt 2 hd 255 sec 63>
/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0
1. c2t0d0 <DEFAULT cyl 1020 alt 2 hd 128 sec 32>
/pci@0,0/pci15ad,1976@10/sd@0,0
2. c2t1d0 <DEFAULT cyl 1021 alt 2 hd 128 sec 32>
/pci@0,0/pci15ad,1976@10/sd@1,0
Specify disk (enter its number): 2 (2 is the new disk)
selecting c2t1d0
[disk formatted]


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
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
inquiry - show vendor, product and revision
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
format> fdisk
No fdisk table exists. The default partition for the disk is:

a 100% "SOLARIS System" partition

Type "y" to accept the default partition, otherwise type "n" to edit the
partition table.
y
format> p


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> p
Current partition table (original):
Total disk cylinders available: 1020 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 0 (0/0/0) 0
1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 - 1019 1.99GB (1020/0/0) 4177920
3 unassigned wm 0 0 (0/0/0) 0
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 2.00MB (1/0/0) 4096
9 unassigned wm 0 0 (0/0/0) 0

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

Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]: 1
Enter partition size[0b, 0c, 1e, 0.00mb, 0.00gb]: 1.9gb(creating partiation with 1.9gb)
partition> p
Current partition table (unnamed):
Total disk cylinders available: 1020 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 unassigned wm 1 - 973 1.90GB (973/0/0) 3985408
1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 - 1019 1.99GB (1020/0/0) 4177920
3 unassigned wm 0 0 (0/0/0) 0
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 2.00MB (1/0/0) 4096
9 unassigned wm 0 0 (0/0/0) 0

partition> label
Ready to label disk, continue? y

partition> quit


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
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
inquiry - show vendor, product and revision
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
format> quit
bash-3.00# newfs /dev/rdsk/c
c0d0p0 c0d0s15 c1t0d0p3 c1t0d0s4 c2t0d0s1 c2t0d0s7 c2t1d0s12
c0d0p1 c0d0s2 c1t0d0p4 c1t0d0s5 c2t0d0s10 c2t0d0s8 c2t1d0s13
c0d0p2 c0d0s3 c1t0d0s0 c1t0d0s6 c2t0d0s11 c2t0d0s9 c2t1d0s14
c0d0p3 c0d0s4 c1t0d0s1 c1t0d0s7 c2t0d0s12 c2t1d0p0 c2t1d0s15
c0d0p4 c0d0s5 c1t0d0s10 c1t0d0s8 c2t0d0s13 c2t1d0p1 c2t1d0s2
c0d0s0 c0d0s6 c1t0d0s11 c1t0d0s9 c2t0d0s14 c2t1d0p2 c2t1d0s3
c0d0s1 c0d0s7 c1t0d0s12 c2t0d0p0 c2t0d0s15 c2t1d0p3 c2t1d0s4
c0d0s10 c0d0s8 c1t0d0s13 c2t0d0p1 c2t0d0s2 c2t1d0p4 c2t1d0s5
c0d0s11 c0d0s9 c1t0d0s14 c2t0d0p2 c2t0d0s3 c2t1d0s0 c2t1d0s6
c0d0s12 c1t0d0p0 c1t0d0s15 c2t0d0p3 c2t0d0s4 c2t1d0s1 c2t1d0s7
c0d0s13 c1t0d0p1 c1t0d0s2 c2t0d0p4 c2t0d0s5 c2t1d0s10 c2t1d0s8
c0d0s14 c1t0d0p2 c1t0d0s3 c2t0d0s0 c2t0d0s6 c2t1d0s11 c2t1d0s9

bash-3.00# newfs /dev/rdsk/c2t1d0s
c2t1d0s0 c2t1d0s11 c2t1d0s14 c2t1d0s3 c2t1d0s6 c2t1d0s9
c2t1d0s1 c2t1d0s12 c2t1d0s15 c2t1d0s4 c2t1d0s7
c2t1d0s10 c2t1d0s13 c2t1d0s2 c2t1d0s5 c2t1d0s8
bash-3.00# newfs /dev/rdsk/c2t1d0s0
newfs: construct a new file system /dev/rdsk/c2t1d0s0: (y/n)? y
/dev/rdsk/c2t1d0s0: 3985408 sectors in 973 cylinders of 128 tracks, 32 secto
rs
1946.0MB in 43 cyl groups (23 c/g, 46.00MB/g, 11264 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 94272, 188512, 282752, 376992, 471232, 565472, 659712, 753952, 848192,
3109952, 3204192, 3298432, 3392672, 3486912, 3581152, 3675392, 3769632,
3863872, 3958112
bash-3.00# mkdir /harish (creating a directory to mount)
bash-3.00# mount /dev/dsk/c2t1d0s
c2t1d0s0 c2t1d0s11 c2t1d0s14 c2t1d0s3 c2t1d0s6 c2t1d0s9
c2t1d0s1 c2t1d0s12 c2t1d0s15 c2t1d0s4 c2t1d0s7
c2t1d0s10 c2t1d0s13 c2t1d0s2 c2t1d0s5 c2t1d0s8
bash-3.00# mount /dev/dsk/c2t1d0s0 /harish/
bash-3.00# df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0d0s0 6.9G 3.5G 3.3G 52% /
/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 1022M 984K 1021M 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap1.so.1
6.9G 3.5G 3.3G 52% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
swap 1021M 40K 1021M 1% /tmp
swap 1021M 32K 1021M 1% /var/run
/dev/dsk/c2t0d0s0 1.8G 1.9M 1.8G 1% /NFS
/dev/dsk/c0d0s7 2.4G 2.5M 2.3G 1% /export/home
/dev/dsk/c2t1d0s0 1.8G 1.9M 1.8G 1% /harish(now the new harddisk is formated and mounted)
bash-3.00#

Is This Answer Correct ?    10 Yes 0 No

Post New Answer

More Solaris AllOther Interview Questions

How would you freeze a service group?

1 Answers  


what is the command to replace a failed disk in vxvm with example?

3 Answers   TCS,


What is OBP and how u r going to access it?

3 Answers  


If ping command is not working then how to check the status of the server..?

2 Answers  


How to add a user without command?

6 Answers   Satyam,






What is meant by jumpstart?

2 Answers   IBM,


how to create nis master,slave,client

2 Answers   IBM,


When the system is hang?Unable to login,and console is available?what is the action u will take?

2 Answers  


what is file system ?can u explain briefly ?

2 Answers  


How can you check that a particular volume is mirrored?

5 Answers   CGI,


What is lofs in zones

2 Answers  


In solaris we have 2 directories for commands. what are they..? is there any difference b/w those..?

3 Answers  


Categories
  • Solaris Commands Interview Questions Solaris Commands (360)
  • Solaris Threads Interview Questions Solaris Threads (9)
  • Solaris IPC Interview Questions Solaris IPC (30)
  • Solaris Socket Programming Interview Questions Solaris Socket Programming (3)
  • Solaris System Calls Interview Questions Solaris System Calls (25)
  • Solaris General Interview Questions Solaris General (170)
  • Solaris AllOther Interview Questions Solaris AllOther (297)