没有合适的资源?快使用搜索试试~ 我知道了~
Opensolaris下的存储管理资料
需积分: 0 2 下载量 179 浏览量
2010-01-08
13:45:49
上传
评论
收藏 3.97MB PDF 举报
温馨提示
试读
317页
关于Opensolaris系统的基本使用,其中详细介绍了一些主要的命令的用法和特征!
资源详情
资源评论
资源推荐
c0t0d0s0: Less known Solaris features
Joerg Moellenkamp
September 13th, 2008
Contents
I Introduction 14
1 The genesis of LKSF 15
1.1 How it started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.2 The scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.3 The disclaimer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2 The guide to LKSF 16
2.1 Solaris Administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.1.1 Liveupgrade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.1.2 Boot environments based on ZFS snapshots . . . . . . . . . . . . 16
2.1.3 Working with the Service Management Facility . . . . . . . . . . 16
2.1.4 Solaris Resource Manager . . . . . . . . . . . . . . . . . . . . . . 17
2.1.5 /home? /export/home? AutoFS? . . . . . . . . . . . . . . . . . . 17
2.1.6 lockfs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.2 Solaris Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.2.1 Role Based Access Control and Least Privileges . . . . . . . . . . 17
2.2.2 The Solaris Security Toolkit . . . . . . . . . . . . . . . . . . . . . 18
2.2.3 Auditing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.2.4 Basic Audit Reporting Tool . . . . . . . . . . . . . . . . . . . . . 18
2.2.5 IPsec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.2.6 On PAssword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.2.7 Signed binaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.3 Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.3.1 fssnap - snapshots for UFS . . . . . . . . . . . . . . . . . . . . . . 19
2.3.2 iSCSI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.3.3 Remote Mirroring with the Availability Suite . . . . . . . . . . . 20
2.3.4 Point-in-Time Copy with the Availability Suite . . . . . . . . . . 20
2.3.5 SamFS - the Storage Archive Manager FileSystem . . . . . . . . . 20
2.4 Solaris Administrators Toolbox . . . . . . . . . . . . . . . . . . . . . . . 20
2.4.1 fuser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.4.2 pfiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2
Contents
2.4.3 Installing Solaris Packages directly via web . . . . . . . . . . . . . 21
2.4.4 About crashes and cores . . . . . . . . . . . . . . . . . . . . . . . 21
2.5 Nontechnical feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.5.1 Long support cycles . . . . . . . . . . . . . . . . . . . . . . . . . . 21
II Solaris Administration 22
3 Liveupgrade 23
3.1 How to change the world . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.2 Whats Live Upgrade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.3 The concept behind Live Upgrade . . . . . . . . . . . . . . . . . . . . . . 23
3.4 A hint for testing this . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.5 Using Live Upgrade without Updating . . . . . . . . . . . . . . . . . . . 25
3.6 Using Live Upgrade for upgrading Solaris Express . . . . . . . . . . . . . 27
3.7 Do you want to learn more ? . . . . . . . . . . . . . . . . . . . . . . . . . 29
4 Boot environments based on ZFS snapshots 31
4.1 Using snapshots for boot environments . . . . . . . . . . . . . . . . . . . 31
4.2 A practical example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.3 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5 Working with the Service Management Facility 36
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.1.1 init.d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.1.2 Service Management Facility . . . . . . . . . . . . . . . . . . . . . 36
5.2 The foundations of SMF . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
5.2.1 Service and Service Instance . . . . . . . . . . . . . . . . . . . . . 37
5.2.2 Milestone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.2.3 Fault Manager Resource Identifier . . . . . . . . . . . . . . . . . . 38
5.2.4 Service Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.2.5 Transient service . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.2.6 Standalone model . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.2.7 Contract service . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.2.8 A short digression: Contracts . . . . . . . . . . . . . . . . . . . . 39
5.2.9 Service State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.2.10 Service Configuration Repository . . . . . . . . . . . . . . . . . . 42
5.2.11 Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.2.12 Master Restarter Daemon and Delegated Restarter . . . . . . . . 43
5.2.13 Delegated Restarter for inetd services . . . . . . . . . . . . . . . . 43
5.2.14 Enough theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.3 Working with SMF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3
Contents
5.3.1 Whats running on the system . . . . . . . . . . . . . . . . . . . . 44
5.3.2 Starting and stoping a service . . . . . . . . . . . . . . . . . . . . 44
5.3.3 Automatic restarting of a service . . . . . . . . . . . . . . . . . . 46
5.3.4 Obtaining the configuration of a service . . . . . . . . . . . . . . . 47
5.3.5 Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.4 Developing for SMF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.4.1 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.4.2 Preparing the server . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.4.3 Preparing the client . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.4.4 Before working with SMF itself . . . . . . . . . . . . . . . . . . . 49
5.4.5 The Manifest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
5.4.6 The exec methods script - general considerations . . . . . . . . . . 52
5.4.7 Implementing a exec method script . . . . . . . . . . . . . . . . . 52
5.4.8 Installation of the new service . . . . . . . . . . . . . . . . . . . . 54
5.4.9 Testing it . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5.6 Do you want to learn more . . . . . . . . . . . . . . . . . . . . . . . . . . 56
6 Solaris Resource Manager 57
6.1 Why do you need Resource Management? . . . . . . . . . . . . . . . . . 57
6.2 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
6.3 The basic idea of Solaris Resource Management . . . . . . . . . . . . . . 58
6.4 How to work with projects and tasks . . . . . . . . . . . . . . . . . . . . 58
6.5 A practical example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
6.6 Why do i need all this stuff? . . . . . . . . . . . . . . . . . . . . . . . . . 63
6.7 Limiting operating environment resources . . . . . . . . . . . . . . . . . . 64
6.8 Limiting CPU resources . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
6.8.1 Without Resource Mangement . . . . . . . . . . . . . . . . . . . . 66
6.8.2 Using the Fair Share Scheduler . . . . . . . . . . . . . . . . . . . 67
6.8.3 Shares . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
6.8.4 Behaviour of processes with Resource Management . . . . . . . . 68
6.9 Limiting memory resources . . . . . . . . . . . . . . . . . . . . . . . . . . 69
6.9.1 Without memory resource management . . . . . . . . . . . . . . . 69
6.9.2 With memory resource management . . . . . . . . . . . . . . . . 70
6.10 Resource Management and SMF . . . . . . . . . . . . . . . . . . . . . . . 72
6.10.1 Assigning a project to an already running service . . . . . . . . . 72
6.10.2 Configuring the project in a SMF manifest . . . . . . . . . . . . . 74
6.11 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
6.12 Do you want to learn more? . . . . . . . . . . . . . . . . . . . . . . . . . 75
7 /home? /export/home? AutoFS? 76
7.1 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
4
Contents
7.2 The use case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
7.3 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
7.4 Creating users and homedirectories . . . . . . . . . . . . . . . . . . . . . 78
7.5 Configuring the automounter . . . . . . . . . . . . . . . . . . . . . . . . . 79
7.6 Testing the configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
7.7 Explanation for the seperated /home and /export/home . . . . . . . . . 80
7.8 The /net directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
7.9 Do you want to learn more? . . . . . . . . . . . . . . . . . . . . . . . . . 81
8 lockfs 82
8.1 Types of Locks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
8.2 Write Lock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
8.3 Delete lock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
8.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
8.5 Do you want to learn more? . . . . . . . . . . . . . . . . . . . . . . . . . 85
9 CacheFS 86
9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
9.2 History of the feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
9.3 CacheFS in theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
9.4 A basic example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
9.4.1 Preparations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
9.4.2 Mounting a filesystem via CacheFS . . . . . . . . . . . . . . . . . 88
9.4.3 Statistics about the cache . . . . . . . . . . . . . . . . . . . . . . 89
9.5 The cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
9.6 On-demand consistency checking with CacheFS . . . . . . . . . . . . . . 91
9.7 An practical usecase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
9.8 The CacheFS feature in future Solaris Development . . . . . . . . . . . . 94
9.9 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
9.9.1 Do you want to learn more ? . . . . . . . . . . . . . . . . . . . . . 95
10 Having fun with processes 96
10.1 Getting rid of zombies . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
10.2 Getting arguments and environment of running processes . . . . . . . . . 97
III Solaris Security 99
11 Role Based Access Control and Least Privileges 100
11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
11.1.1 The Story of root . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
11.1.2 Superuser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
5
剩余316页未读,继续阅读
guangye1985
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0