0% found this document useful (0 votes)
37 views7 pages

Solaris Commands

The document discusses disk labels and how they contain information about a disk's controller, geometry, and slices. It describes the two main types of disk labels supported in Oracle Solaris - SMI and EFI. It notes that if a disk is not labeled after creating slices, the slices will be unavailable because the operating system has no way of knowing about them.

Uploaded by

suffee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views7 pages

Solaris Commands

The document discusses disk labels and how they contain information about a disk's controller, geometry, and slices. It describes the two main types of disk labels supported in Oracle Solaris - SMI and EFI. It notes that if a disk is not labeled after creating slices, the slices will be unavailable because the operating system has no way of knowing about them.

Uploaded by

suffee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 7

About Disk Labels

A special area of every disk is set aside for storing information about the disk
's controller, geometry, and slices. This information is called the disk's label
. Another term that is used to described the disk label is the VTOC (Volume Tabl
e of Contents) on a disk with a VTOC label. To label a disk means to write slice
information onto the disk. You usually label a disk after you change its slices
.
The Oracle Solaris release supports the following two disk labels:
SMI

The traditional VTOC label for disks that are less than 2 TB in size.

EFI Provides support for disks that are larger than 2 TB. The Extensible Fir
mware Interface GUID Partition Table (EFI GPT) disk label is also available for
disks less than 2 TB.
If you fail to label a disk after you create slices, the slices will be unavaila
ble because the OS has no way of knowing about the slices.

root@opensolaris:/# zfs list rpool


NAME
USED AVAIL REFER MOUNTPOINT
rpool 2.65G 15.9G
72K /rpool
root@opensolaris:/# zpool list rpool
NAME
SIZE USED AVAIL
CAP HEALTH ALTROOT
rpool 18.9G 2.65G 16.2G
14% ONLINE root@opensolaris:/# zpool status
pool: rpool
state: ONLINE
scrub: none requested
config:
NAME
rpool
c3d0s0

STATE
ONLINE
ONLINE

READ WRITE CKSUM


0
0
0
0
0
0

errors: No known data errors


root@opensolaris:/#
root@opensolaris:/etc# zfs list rpool
NAME
USED AVAIL REFER MOUNTPOINT
rpool 2.71G 15.9G
72K /rpool
root@opensolaris:/etc# zpool list rpool
NAME
SIZE USED AVAIL
CAP HEALTH ALTROOT
rpool 18.9G 2.71G 16.2G
14% ONLINE root@opensolaris:/etc# zpool status
pool: rpool
state: ONLINE
scrub: none requested
config:
NAME
rpool
c3d0s0

STATE
ONLINE
ONLINE

READ WRITE CKSUM


0
0
0
0
0
0

errors: No known data errors


root@opensolaris:/etc# prtvtoc /dev/dsk/c3d0s0
* /dev/dsk/c3d0s0 partition map
*

*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*

Dimensions:
512 bytes/sector
63 sectors/track
255 tracks/cylinder
16065 sectors/cylinder
2609 cylinders
2607 accessible cylinders
Flags:
1: unmountable
10: read-only
Unallocated space:
First
Sector
Last
Sector
Count
Sector
0 2120580 2120579

First
Sector
Last
Partition Tag Flags
Sector
Count
Sector Mount Directory
0
2
00
2120580 39760875 41881454
1
3
01
16065 2104515 2120579
2
5
01
0 41881455 41881454
8
1
01
0
16065
16064
root@opensolaris:/etc#
root@opensolaris:/etc# grep /export /etc/mnttab - shows mounted fs type
rpool/export
/export zfs
rw,devices,setuid,nonbmand,exec,xattr,atime,dev=
2d90006 1384869126
root@opensolaris:/etc# grep /tmp /etc/vfstab
swap
/tmp
root@opensolaris:/etc#

tmpfs

yes

root@opensolaris:/etc# pkg list -uv


No installed packages have available updates
root@opensolaris:/etc#
root@opensolaris:/etc# arch
i86pc
root@opensolaris:/etc# isainfo -v
32-bit i386 applications
ssse3 ahf mon sse3 sse2 sse fxsr mmx cmov cx8 tsc fpu
root@opensolaris:/etc# more /etc/release
OpenSolaris 2008.11 snv_101b_rc2 X86
Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 19 November 2008
root@opensolaris:/etc# uname -r
5.11
root@opensolaris:/etc#
root@opensolaris:/etc# prtconf
System Configuration: Sun Microsystems i86pc
Memory size: 768 Megabytes
System Peripherals (Software Nodes):
i86pc
scsi_vhci, instance #0
isa, instance #0

i8042, instance #0
keyboard, instance #0
mouse, instance #0
lp, instance #0
pit_beep, instance #0
pci, instance #0
pci8086,1237 (driver not attached)
pci8086,7000 (driver not attached)
pci-ide, instance #0
ide, instance #0
cmdk, instance #0
ide, instance #1
sd, instance #0
display, instance #0
pci1022,2000, instance #0
pci80ee,cafe (driver not attached)
pci8086,0 (driver not attached)
pci106b,3f, instance #0
pci8086,7113 (driver not attached)
pseudo, instance #0
agpgart, instance #0
options, instance #0
xsvc, instance #0
used-resources (driver not attached)
cpus, instance #0
cpu (driver not attached)
root@opensolaris:/etc#
----------------------------------------------------------------root@opensolaris:/# getconf -a = shows kernel parameters
----------------------------------------------------------------System Administration Commands
ndd(1M)
NAME
ndd - get and set driver configuration parameters
SYNOPSIS
ndd [-set] driver parameter [value]
root@opensolaris:/# last
reboot
system boot
reboot
system down
reboot
system boot
reboot
system down
reboot
system boot
reboot
system down
reboot
system boot
reboot
system down
reboot
system boot
reboot
system down
reboot
system boot
reboot
system down
reboot
system boot

Tue
Tue
Tue
Fri
Fri
Fri
Fri
Thu
Thu
Thu
Thu
Thu
Thu

Nov
Nov
Nov
Dec
Dec
Dec
Dec
Dec
Dec
Dec
Dec
Dec
Dec

19
19
19
5
5
5
5
4
4
4
4
4
4

08:51
08:49
08:13
09:22
09:20
09:17
09:11
21:09
21:07
21:05
21:01
21:00
20:45

wtmp begins Thu Dec 4 20:45


root@opensolaris:/# swap -s
total: 244956k bytes allocated + 52912k reserved = 297868k used, 1026296k availa
ble

root@opensolaris:/# swap -l
swapfile
dev
swaplo blocks
free
/dev/dsk/c3d0s1
102,1
8 2104504 2097560
root@opensolaris:/#
root@opensolaris:/# kstat -n pcn0 | egrep 'ifspeed | duplex'
ifspeed
0
ifspeed
0
root@opensolaris:/# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index
1
inet 127.0.0.1 netmask ff000000
pcn0: flags=201004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,CoS> mtu 1500 ind
ex 5
inet 0.0.0.0 netmask ff000000
ether 8:0:27:b9:96:cc
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index
1
inet6 ::1/128
=============================================
root@opensolaris:/# svccfg -s system/identity:node listprop
general
framework
general/enabled
boolean true
start
method
start/exec
astring /lib/svc/method/identity-node
start/timeout_seconds
count
60
start/type
astring method
tm_common_name
template
tm_common_name/C
ustring "system identity (nodename)"
tm_man_nodename
template
tm_man_nodename/manpath
astring /usr/share/man
tm_man_nodename/section
astring 4
tm_man_nodename/title
astring nodename
restarter
framework
NONPERSISTENT
restarter/logfile
astring /var/svc/log/system-identity:node.lo
g
restarter/start_pid
count
25
restarter/start_method_timestamp time
1384869108.094310000
restarter/start_method_waitstatus integer 0
restarter/transient_contract
count
restarter/auxiliary_state
astring none
restarter/next_state
astring none
restarter/state
astring online
restarter/state_timestamp
time
1384869108.109161000
root@opensolaris:/# svccfg -s system/identity:node listprop config
root@opensolaris:/#
=================================================================
root@opensolaris:/etc# sysdef -h = shows host id
*
* Hostid
*
00484ae5
root@opensolaris:/etc# uname -mp = shows machine type (m) and processor (p)
i86pc i386
---------------------------------root@opensolaris:/etc# ls -l /sbin/rc* = runlevel scripts

-rwxr--r--rwxr--r--rwxr--r--rwxr--r--rwxr--r--rwxr--r--rwxr--r--

3
1
1
1
3
3
1

root
root
root
root
root
root
root

sys
sys
sys
sys
sys
sys
sys

2634
2893
2884
2807
2634
2634
4901

2008-11-19
2008-11-19
2008-11-19
2008-11-19
2008-11-19
2008-11-19
2008-11-19

19:13
19:13
19:13
19:13
19:13
19:13
19:13

/sbin/rc0
/sbin/rc1
/sbin/rc2
/sbin/rc3
/sbin/rc5
/sbin/rc6
/sbin/rcS

===============================================================
opens@opensolaris:~$ bootadm list-menu
The location for the active GRUB menu is: /rpool/boot/grub/menu.lst
default 0
timeout 30
0 OpenSolaris 2008.11 snv_101b_rc2 X86
1 OpenSolaris 2008.11 snv_101b_rc2 X86 text boot
opens@opensolaris:~$
opens@opensolaris:~$ eeprom
ata-dma-enabled=1
atapi-cd-dma-enabled=1
ttyb-rts-dtr-off=false
ttyb-ignore-cd=true
ttya-rts-dtr-off=false
ttya-ignore-cd=true
ttyb-mode=9600,8,n,1,ttya-mode=9600,8,n,1,lba-access-ok=1
keyboard-layout=Unknown
console=text
opens@opensolaris:~$ su - root
Password:
Sun Microsystems Inc. SunOS 5.11
snv_101b
You have new mail.
root@opensolaris:~# eeprom keyboard-layout=US-English
root@opensolaris:~# eeprom
ata-dma-enabled=1
atapi-cd-dma-enabled=1
ttyb-rts-dtr-off=false
ttyb-ignore-cd=true
ttya-rts-dtr-off=false
ttya-ignore-cd=true
ttyb-mode=9600,8,n,1,ttya-mode=9600,8,n,1,lba-access-ok=1
keyboard-layout=US-English
console=text
root@opensolaris:~#
****************************************************
318 dladm show-phys
319 kstat -n pcn0 | egrep 'ifspeed | duplex
320 '
321 kstat -n e1000g0
322 kstat -n pcn0 | egrep 'ifspeed | duplex'
323 kstat -n e1000g0 | egrep 'ifspeed | duplex'
324 netadm list
325 where netadm
326 ipadm create-ip e1000g0
327 man ipadm

November 2008

328 arch
329 cat /etc/release
330 who -r
331 uname -r
332 cat /etc/hostname.hme0
333 ls -l /etc/hostname*
334 cat /etc/hostname.pcn0
335 ifconfig pcn0 up && ifconfig -a
336 ifconfig e1000g0 up && ifconfig -a
337 dladm show-phys
338 kstat -n e1000g0 | egrep 'ifspeed | duplex'
339 ifconfig e1000g0 plumb
340 dladm show-phys
341 cat /etc/hostname.pcn0
342 cat /etc/defaultrouter
343 cat /etc/hosts
344 vi /etc/hosts
345 cat /etc/hosts
346 ping opensolaris
347 ifconfig -a
348 ifconfig e1000g0 down && ifconfig -a
349 dladm show-hys
350 dladm show-phys
351 ifconfig e1000g0 down
352 dladm show-phys
353 ifconfig pcn0 192.168.56.2 broadcast 192.168.56.1 netmask 255.255.255.0 p
lumb up
354 ifconfig pcn0 down
355 ifconfig e1000g0 192.168.56.2 broadcast 192.168.56.1 netmask 255.255.255.
0
356 ifconfig -a
357 arp -a
358 ls -ltr hostname*
359 cat hostname.pcn0
360 vi hostname.e1000g0
361 ls -ltr hostname*
362 cat /etc/inet/hosts
363 vi hosts
364 ifconfig -a
365 ifconfig e1000g0 10.0.0.10 broadcast 10.0.0.1 netmask 255.255.255.0
366 dladm show-phys
367 ifconfig
368 ifconfig -a
369 netstat -r
370 exit
371 history
372 dladm show-phys
373 ifconfig -a
374 history
375 ping 10.0.2.15
376 vi /etc/hosts
377 cat /etc/hosts
378 ping opensolaris
379 netstat -r
380 ping 10.0.2.2
381 netstat -rn
382 ping 10.0.0.1
383 history
You have new mail in /var/mail/root
root@opensolaris:~#

-----------------------------------------------------------root@opensolaris:/dev/dsk# prtvtoc /dev/dsk/c3d0s1 = VTOC (Volume Table of Conte


nts) Disk label
* /dev/dsk/c3d0s1 partition map
*
* Dimensions:
*
512 bytes/sector
*
63 sectors/track
*
255 tracks/cylinder
* 16065 sectors/cylinder
*
2609 cylinders
*
2607 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* Unallocated space:
*
First
Sector
Last
*
Sector
Count
Sector
*
0 2120580 2120579
*
*
First
Sector
Last
* Partition Tag Flags
Sector
Count
Sector Mount Directory
0
2
00
2120580 39760875 41881454
1
3
01
16065 2104515 2120579
2
5
01
0 41881455 41881454
8
1
01
0
16065
16064
root@opensolaris:/dev/dsk#
--------------------------------------------root@opensolaris:/etc# svcadm refresh network:default - refresh or restart servi
ces...ie network
root@opensolaris:/etc# svcadm restart network:default
root@opensolaris:/etc# kstat -n e1000g0 | egrep 'ifspeed | duplex'
ifspeed
1000000000
ifspeed
1000000000
root@opensolaris:/etc# dladm show-link
LINK
CLASS
MTU
STATE
OVER
e1000g0
phys
1500 up
-root@opensolaris:/etc# dladm show-phys
LINK
MEDIA
STATE
SPEED DUPLEX
DEVICE
e1000g0
Ethernet
up
1000 full
e1000g0
root@opensolaris:/etc#
root@opensolaris:/etc# dladm show-dev
LINK
STATE SPEED
DUPLEX
e1000g0
up
1000Mb full
root@opensolaris:/etc#

You might also like