/etc/skel,新建用户时拷贝到用户主目录下,用户登录时执行的脚本
/etc/profile全局登录脚本
pwconv命令将/etc/passwd中的密码转变成/etc/shadow,同时passwd中的密码域变为x
pwunconv命令撤消
# ioscan -fk
Class I H/W Path Driver S/W State H/W Type Description
==============================================================================
root 0 root CLAIMED BUS_NEXUS
ioa 0 0 sba CLAIMED BUS_NEXUS System Bus Adapter (1229)
ba 0 0/0 lba CLAIMED BUS_NEXUS Local PCI-X Bus Adapter (122e)
OO 0 0/0/1/0 UsbOhci CLAIMED INTERFACE USB OHCI Interface
OO 1 0/0/1/1 UsbOhci CLAIMED INTERFACE USB OHCI Interface
OO 2 0/0/1/2 UsbEhci CLAIMED INTERFACE USB EHCI Interface
sideba 0 0/0/2/0 side_multi CLAIMED INTERFACE CMD IDE controller
ext_bus 0 0/0/2/0.0 side CLAIMED INTERFACE IDE Primary Channel
target 0 0/0/2/0.0.0 tgt CLAIMED DEVICE
disk 0 0/0/2/0.0.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-B
target 1 0/0/2/0.0.7 tgt CLAIMED DEVICE
ctl 0 0/0/2/0.0.7.0 sctl CLAIMED DEVICE Initiator
ext_bus 1 0/0/2/0.1 side CLAIMED INTERFACE IDE Secondary Channel
target 2 0/0/2/0.1.7 tgt CLAIMED DEVICE
ctl 1 0/0/2/0.1.7.0 sctl CLAIMED DEVICE Initiator
lan 0 0/0/3/0 intl100 CLAIMED INTERFACE Intel PCI Pro 10/100Tx Server Adapter
ba 1 0/1 lba CLAIMED BUS_NEXUS Local PCI-X Bus Adapter (122e)
ext_bus 2 0/1/1/0 mpt CLAIMED INTERFACE SCSI Ultra320
target 3 0/1/1/0.0 tgt CLAIMED DEVICE
disk 1 0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 146 GMAP3147NC
target 4 0/1/1/0.1 tgt CLAIMED DEVICE
disk 2 0/1/1/0.1.0 sdisk CLAIMED DEVICE HP 146 GST3146707LC
target 5 0/1/1/0.7 tgt CLAIMED DEVICE
ctl 2 0/1/1/0.7.0 sctl CLAIMED DEVICE Initiator
ext_bus 3 0/1/1/1 mpt CLAIMED INTERFACE SCSI Ultra320
target 6 0/1/1/1.2 tgt CLAIMED DEVICE
disk 3 0/1/1/1.2.0 sdisk CLAIMED DEVICE HP 146 GMAP3147NC
target 7 0/1/1/1.7 tgt CLAIMED DEVICE
ctl 3 0/1/1/1.7.0 sctl CLAIMED DEVICE Initiator
lan 1 0/1/2/0 igelan CLAIMED INTERFACE HP PCI 1000Base-T Core
ba 2 0/2 lba CLAIMED BUS_NEXUS Local PCI-X Bus Adapter (122e)
ba 3 0/3 lba CLAIMED BUS_NEXUS Local PCI-X Bus Adapter (122e)
ba 4 0/4 lba CLAIMED BUS_NEXUS Local PCI-X Bus Adapter (122e)
lan 2 0/4/1/0 btlan CLAIMED INTERFACE HP A5230A/B5509BA PCI 10/100Base-TX Addon
ba 5 0/5 lba CLAIMED BUS_NEXUS Local PCI-X Bus Adapter (122e)
ba 6 0/6 lba CLAIMED BUS_NEXUS Local PCI-X Bus Adapter (122e)
tty 0 0/6/1/0 asio0 CLAIMED INTERFACE PCI SimpleComm (103c1290)
tty 1 0/6/1/1 asio0 CLAIMED INTERFACE PCI Serial (103c1048)
graphics 0 0/6/2/0 gvid_core CLAIMED INTERFACE PCI Display (10025159)
processor 0 120 processor CLAIMED PROCESSOR Processor
ba 7 250 pdh CLAIMED BUS_NEXUS Core I/O Adapter
ipmi 0 250/0 ipmi CLAIMED INTERFACE IPMI Controller
tty 2 250/1 asio0 CLAIMED INTERFACE Built-in RS232C
tty 3 250/2 asio0 CLAIMED INTERFACE Built-in RS232C
acpi_node 0 250/3 acpi_node CLAIMED INTERFACE Acpi Hardware
[rx260-01]/
实例号,硬件地址,驱动,驱动是否绑定,硬件类型,
# ioscan -fkC disk
Class I H/W Path Driver S/W State H/W Type Description
============================================================================
disk 0 0/0/2/0.0.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-B
disk 1 0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 146 GMAP3147NC
disk 2 0/1/1/0.1.0 sdisk CLAIMED DEVICE HP 146 GST3146707LC
disk 3 0/1/1/1.2.0 sdisk CLAIMED DEVICE HP 146 GMAP3147NC
[rx260-01]/
3个146G的磁盘.
0/1/1/0,0/1/1/1已经标志了scis卡的地址了.
# ioscan -fkH 0/1/1/1
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
ext_bus 3 0/1/1/1 mpt CLAIMED INTERFACE SCSI Ultra320
target 6 0/1/1/1.2 tgt CLAIMED DEVICE
disk 3 0/1/1/1.2.0 sdisk CLAIMED DEVICE HP 146 GMAP3147NC
target 7 0/1/1/1.7 tgt CLAIMED DEVICE
ctl 3 0/1/1/1.7.0 sctl CLAIMED DEVICE Initiator
0/1/1/0
0-SBA
1-LBA
1/0 PCI 1-device 0-function
HBA 0/1/1/0.target.lun(逻辑号)
这样我们可以用硬件地址来标识一个硬盘了
但系统管理员还是通过设备文件来访问硬盘的.
内核为我们屏蔽了这些内容.
将设备文件映射到硬盘的硬件地址
块设备文件,字符设备文件
/dev/rdsk只能连续的一个一个字节地访问
/dev/dsk可以随机IO,通过缓冲区
调制解调器是典型的字符设备
字符设备:提供连续的数据流,应用程序可以顺序读取,通常不支持随机存取。相反,此类设备支持按字节/字符来读写数据。举例来说,调制解调器是典型的字符设备。
(2) 块设备:应用程序可以随机访问设备数据,程序可自行确定读取数据的位置。硬盘是典型的块设备,应用程序可以寻址磁盘上的任何位置,并由此读取数据。此外,数据的读写只能以块(通常是512B)的倍数进行。与字符设备不同,块设备并不支持基于字符的寻址。
# ioscan -funC disk
Class I H/W Path Driver S/W State H/W Type Description
============================================================================
disk 0 0/0/2/0.0.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-B
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
disk 1 0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 146 GMAP3147NC
/dev/dsk/c2t0d0 /dev/dsk/c2t0d0s2 /dev/rdsk/c2t0d0 /dev/rdsk/c2t0d0s2
/dev/dsk/c2t0d0s1 /dev/dsk/c2t0d0s3 /dev/rdsk/c2t0d0s1 /dev/rdsk/c2t0d0s3
disk 2 0/1/1/0.1.0 sdisk CLAIMED DEVICE HP 146 GST3146707LC
/dev/dsk/c2t1d0 /dev/rdsk/c2t1d0
disk 3 0/1/1/1.2.0 sdisk CLAIMED DEVICE HP 146 GMAP3147NC
/dev/dsk/c3t2d0 /dev/rdsk/c3t2d0
[rx260-01]/dev/rdsk
# ioscan -fuH 0/1/1/0
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
ext_bus 2 0/1/1/0 mpt CLAIMED INTERFACE SCSI Ultra320
disk 1 0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 146 GMAP3147NC
disk 2 0/1/1/0.1.0 sdisk CLAIMED DEVICE HP 146 GST3146707LC
ctl 2 0/1/1/0.7.0 sctl CLAIMED DEVICE Initiator
[rx260-01]/dev/rdsk
#
最新的都是itanium安腾,
老式的是PARISC芯片
ia64就是指安腾64位芯片
# lsdev
Character Block Driver Class
0 -1 cn pseudo
1 -1 asio0 tty
2 -1 KeyboardMUX OO
3 -1 mm pseudo
4 -1 MouseMUX OO
5 -1 UsbBootKeyboard OO
6 -1 UsbBootMouse OO
7 -1 UsbEhci OO
8 -1 UsbOhci OO
9 9 ramdisc pseudo
10 -1 fclp fc
11 -1 dev_olar olar
12 -1 LCentIf ext_bus
13 -1 rmp3f01 unknown
14 -1 acpi_node acpi_node
15 -1 udp6 pseudo
16 -1 ptym ptym
17 -1 ptys ptys
18 -1 udp pseudo
19 -1 tcp6 pseudo
20 -1 tcp pseudo
21 -1 rawip6 pseudo
22 -1 rawip pseudo
23 -1 nuls pseudo
25 -1 ip6 pseudo
26 -1 ip pseudo
27 -1 dmem pseudo
31 -1 arp pseudo
32 -1 keybd_ps2 ps2
33 -1 gvid graf_pseudo
36 -1 olar_psm_if olar
37 -1 ciss ext_bus
44 -1 tlcotsod pseudo
45 -1 tlcots pseudo
46 -1 netdiag1 unknown
48 -1 tlclts pseudo
49 -1 devkrs pseudo
50 1 dmp vxvm
51 -1 usbd usbdev
54 -1 hub usbhub
57 -1 hid usbhid
58 -1 hcd usb
61 -1 evp pseudo
62 -1 fcd unknown
63 -1 fcp fcp
64 64 lv lvm
67 -1 ipmi ipmi
68 -1 ipsecpol pseudo
69 -1 dev_config pseudo
72 -1 clone pseudo
73 -1 strlog pseudo
74 -1 sad pseudo
75 -1 ipseckey pseudo
76 -1 mpt ext_bus
77 -1 stcpmap pseudo
78 -1 sasd escsi_ctlr
79 -1 td fc
95 -1 tels strtels
96 -1 telm strtelm
97 97 vxportal pseudo
98 -1 tun pseudo
99 2 vol vxvm
100 -1 vols vxvm
101 -1 asyncdsk pseudo
104 3 fdd unknown
105 -1 UsbHid OO
113 -1 fddi4 lan
114 -1 gvid_info gvid_pseudo
115 -1 rng pseudo
116 -1 echo pseudo
117 -1 ipf pseudo
119 -1 dlpi pseudo
156 -1 ptm strptym
157 -1 pts strptys
164 -1 pipedev unknown
188 31 sdisk disk
189 -1 klog pseudo
203 -1 sctl ctl
207 -1 sy pseudo
227 -1 kepd pseudo
229 -1 ite graf_pseudo
232 -1 diag2 diag
-1 0 fake pseudo
[rx260-01]/dev/rdsk
ioscan -funCdisk查看磁盘,同时列出对应的磁盘文件
磁盘分区
1. 文件系统
2. 裸数据区
3. 交换区 swap
4. 转储区 dump(分析操作系统为什么会崩溃)
5. 引导区
如何作分区:
1. 整盘管理方法
2. LVM(逻辑卷管理方法)
3. VxVM
物理卷(Physical Volume)-->一个物理卷就是一块盘
卷组(Volume Group 00)-->池子,资源池,一个或多个物理卷的集合
逻辑卷(Logical Volume)-->一个逻辑卷上的分区,从卷组里取空间
根卷组下有8个分区
都要通过设备文件来访问
pv->vg->lv
pv: disk /dev/dsk /dev/rdsk c#t#d#
vg: /dev/vg01/group
lv: /dev/vg01/lvname /dev/vg01/rlvname
strings /etc/lvmtab
ioscan -funCdisk
把一块盘变为物理卷
pvcreate [-f(强制)] /dev/rdsk/c3t2d0
创建一个卷组
mkdir /dev/vg01
mknod创建设备文件
mknod /dev/vg01/group(卷组的名称都可以叫group)
mknod /dev/vg01/group c(字符设备类型) 64(驱动编号) 0x01(卷组编号)00(保留)00(ID)
卷组只能是字符设备文件
创建卷组
vgcreate vg01 /dev/dsk/c3t2d0
LVM-物理盘区到逻辑盘区的映射关系
连续的逻辑空间映射到不连续的物理空间上
extend 4m PE LE
LE->PE映射关系放在VGRA里
vgcreate -s 指定extend的大小
vgcreate -s 16m vg01 /dev/dsk/c3t2d0
lvcreate -n myfs1(名字) -L 64m(创建的大小) vg01
指定大小的时候用-l表示指定盘区的个数
-l 32 32*16m
4LE -> 4PE
查看逻辑卷
lvdisplay /dev/vg01/myfs1
一个逻辑盘区映射到两个物理盘区上
查看物理卷
pvdisplay -v /dev/dsk/c3t2d0
vgdisplay -v vg01
##vgchange -a n vg01
vg
磁盘既可以通过块设备形式访问,也可以通过字符设备形式访问
张静波-上大久亿: 删除卷组:
张静波-上大久亿: # vgchange -a n vg01(停用)
张静波-上大久亿: # vgexport vg01(删掉)
==================================
=====================================
超级块
inode,指向文件的数据区
一个逻辑卷只能创建一个文件系统
创建文件系统
newfs /dev/vg01/rjimmy1
通过字符设备写入方式写入
没有路径,要通过路径访问
要挂载
要扩空间的话
首先要扩逻辑卷,然后要扩超级块(文件系统)
lvextend -L 128(扩后的大小,不是增加多大) /dev/vg01/myfs1 -->VGRA
fsadm -b 128 /myfs1 ->superblock
传统操作删除卷组
1. umount所有文件系统
2. lvremove卷组中所有LV
3. vgreduce卷组中物理卷,至少包含一块物理卷
4. vgremove vgname
灵活的做法:
1. umount
2. vgchange -a n vgname
3. vgexport vgname
查看网卡
ioscan -fuClan(看的是物理层的地址)
1-物理层
2-数据链路层 MAC
3-IP网络层 IP
4-传输层 TCP/UDP
5-会话层 port socket 应用?
6-表示层
7-应用层
lanscan
ifconfig lan2 192.168.20.215 netmask 255.255.0.0 up
看192.168.20.215你不知道哪个是网络位,哪个是主机位
vi /etc/rc.config.d/netconf
SD-UX(标准,文件集组织的标准)
来源:depot
DVD -s 挂载点
目录库 -s 目录的绝对路径
.depot文件库 -s 文件的绝对路径
tape -s 磁带机设备文件
/opt/echoapp/bin lbin(后台) share lib ...
swlist -l product看系统装的软件
l表示level,查看所有product级别的软件
swlist -l depot
查看库里有哪些产品
swlist -l product -d @ IP:/var/spool/sw
有哪些库
swlist -l depot @ 16.118.112.142
装了什么
swlist -l product @ 16.118.112.142
看库中有的软件
swlist -l product -d @ 16.118.112.142:/var/spool/sw
安装命令
swinstall -s 16.118.112.142:/var/spool/sw softwarename
swremove softwarename
swlist -l product @ IP
swlist -l depot @ IP
swlist -l product -d @ IP:/库目录
swinstall -s 库 产品名
swremove 产品名
阅读(3584) | 评论(0) | 转发(0) |