免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1391 | 回复: 0
打印 上一主题 下一主题

solaris10常用命令实例分析(1) 学习sa200的总结 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-05-16 10:13 |只看该作者 |倒序浏览
  这篇文章写得有点晚阿!可是毕竟是我的这段时间的一个小结!
  总的来讲,solaris10在和其他版本在中级管理员的要求和考核上没有太大的变化!
那学习的重点也就是工作中的一些常用的命令和基本的概念的阐释!
  他从系统的boot的过程,到文件的管理,磁盘的结构,系统安全,备份恢复等等作了比较全面的讲述,使人感到有点罗嗦!可是也正是这样的罗嗦,让我从新温习了一下很多系统和硬件的基本原理!
  就以上的问题,我就把一些常用的命令,结合实际的操作来归下类!
  sun的系列产品从notebook,workstation,server,storage...是很全的一个系列,
那solaris10是如何管理这些设备那?
  我们就不能不说的一个问题:一般sun的硬件的架构!
    硬件(Hardware) --> Solaris 系统内核(Kernel)-->指令 Shell-->应用软件(Applications)
     o SUN 服务器的体系结构发展(Kernel and Application Architecture):
           [1] SPARC-->[2] SuperSPARC-->[3] UltraSPARC-->[4] sun4c,
           -->[5] sun4m-->[6] sun4u  
     常见硬件组成
           [1] 处理器 CUP,
           [2] 内存 Memory,
           [3] 系统总线 bus,
           [4] 硬盘 disk,
           [5] 显示器 monitor,
           [6] 键盘 keyboard,
           [7] 光驱 cdrom,
           [8] 磁带机 tape,
           [9] 网卡 net
一: 这里的重要命令是boot相关的命令:OpenBoot
   
1)PROM状态常用命令
help 各命令的使用方法
printenv NVRAM参数值
setenv 设置及修改NVRAM参数
set-default 设置某NVRAM参数值
set-defaults 将全部NVRAM设置为缺省值
test-all 检测所有设备
test net 检测网络连接
watch-clock 检测系统时钟
banner 系统加电提示信息
.enet-addr 系统以太地址
.idprom 已格式化的IDPROM内容
probe-scsi 与on-board SCSI控制器相连的设备
probe-scsi-all 与on-board SCSI及Sbus SCSI控制器相连设备
probe-fcal-all 在E3500上查看光纤通道上的设备
.version PROM版本
PROM状态的常用命令(续)
例:
banner:显示系统信息(包括机型、PROM版本号、内存、序列号、
         以太网地址和Host ID),可以在验货时查看系统的信息。
ok banner
Sun UltraSPARC 60 UPA/PCI (2 X UltraSPARC-II 296MHz), Keyboard Present
OpenBoot 3.11, 256 MB memory installed, Serial #3159808.
Ethernet address 8:0:22:1a:e7:3f, Host ID: 72303700.
show-devs:显示设备信息。
devalias:列设备别名和设备名。
boot [device] [-option]:启动系统
   [device-name]:表示启动设备名
   [option]: .a  完成交互式引导
r  完成一个重新配置引导,系统探测出所有被连接的设备。
s  将系统带至运行等级s。
v  显示详细的启动信息。
x  使文件系统可写。
1、使用缺省设备引导系统。
ok boot
2、利用可选引导设备引导系统。
Ok boot sd (0,3,0)
3、引导无盘客户。
Ok boot net
4、使用缺省设备引导系统至s级。
Ok boot –s
help:显示help信息
printenv:显示系统的PROM环境变量
2)EEPROM的参数
列出所有EEPROM的参数
# eeprom
列出一个EEPROM的参数
# eeprom boot-device
修改缺省的boot device
# eeprom boot-device=disk2
修改auto-boot?参数
# eeprom “auto-boot?”=true
二:Solaris系统的安装

1) boot cdrom -s
   boot cdrom
2)详细的请参考
http://www.cublog.cn/u/9710/?u=http://www.cublog.cn/u/9710/showart.php?id=83063
其总还包括了patches的更新等等

三:solaris的磁盘管理
1)硬盘的控制器等基本概念
E6800上磁盘的设备路径
/sbus@7,0/SUNW,fas@3,8800000/sd@0,0:a
磁盘阵列上的一块raid盘的设备路径,1表示target address,3表示LUN
/sbus@3,0/fcaw@2,0/sd@1,3

#format
AVAILABLE DISK SELECTIONS:
       0. c1t0d0
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf789a1d,0
       1. c1t1d0
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf789761,0
       2. c1t2d0
          /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w2100002037f8a786,0

2)lun的概念:lun 就是logical unit NO
就是阵列里面做出来的逻辑硬盘
3)创建disk array 文件系统的一个实例:
[email=root@test01]root@test01[/email]
# format
Searching for disks...Mar 15 16:57:00 DMAP01 scsi: WARNING: /pci@1d,700000/SUNW,qlc@1/fp@0,0/ssd@w50060e8000542270,4 (ssd5):
done
c3t50060E8000542270d4: configured with capacity of 128.96GB
AVAILABLE DISK SELECTIONS:
       0. c1t0d0
          /pci@1c,600000/scsi@2/sd@0,0
       1. c3t50060E8000542270d4
          /pci@1d,700000/SUNW,qlc@1/fp@0,0/ssd@w50060e8000542270,4
Specify disk (enter its number): Mar 15 16:57:00 DMAP01         corrupt label - wrong magic number
Specify disk (enter its number): 1
selecting c3t50060E8000542270d4
[disk formatted]
Disk not labeled.  Label it now? y
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
        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
        !     - execute , then return
        quit
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
        ! - execute , then return
        quit
partition> p
Current partition table (default):
Total disk cylinders available: 7043 + 2 (reserved cylinders)
Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm       0 -    6      131.25MB    (7/0/0)       268800
  1       swap    wu       7 -   13      131.25MB    (7/0/0)       268800
  2     backup    wu       0 - 7042      128.96GB    (7043/0/0) 270451200
  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        usr    wm      14 - 7042      128.70GB    (7029/0/0) 269913600
  7 unassigned    wm       0               0         (0/0/0)            0
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
        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
        !     - execute , then return
        quit
format> q

[email=root@test01]root@test01[/email]
# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
       0. c1t0d0
          /pci@1c,600000/scsi@2/sd@0,0
       1. c3t50060E8000542270d4
          /pci@1d,700000/SUNW,qlc@1/fp@0,0/ssd@w50060e8000542270,4
Specify disk (enter its number): ^d
[email=root@test01]root@test01[/email]
#
[email=root@test01]root@test01[/email]
# newfs /dev/rdsk/c3t50060E8000542270d4s2
newfs: construct a new file system /dev/rdsk/c3t50060E8000542270d4s2: (y/n)? y
/dev/rdsk/c3t50060E8000542270d4s2:      270451200 sectors in 7043 cylinders of 50 tracks, 768 sectors
        132056.2MB in 3522 cyl groups (2 c/g, 37.50MB/g, 4480 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 77600, 155168, 232736, 310304, 387872, 465440, 543008, 620576, 698144,
775712, 853280, 930848, 1008416, 1085984, 1163552, 1241120, 1318688, 1396256,
1473824, 1551392, 1628960, 1706528, 1784096, 1861664, 1939232, 2016800,
2094368, 2171936, 2249504, 2327072, 2404640, 2482208, 2559776, 2637344,
2714912, 2792480, 2870048, 2947616, 3025184, 3102752, 3180320, 3257888,
3335456, 3413024, 3490592, 3568160, 3645728, 3723296, 3800864, , 7940384, 8017952, 8095520, 8173088,
8250656, 8328224, 8405792, 8483360, 8560928, 8638496, 8716064,
....

[email=root@test01]root@test01[/email]
#
创建完成!


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/9710/showart_113273.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP