xref: /illumos-gate/usr/src/cmd/fs.d/nfs/svc/server.xml (revision e8921a52c53ee69f7b65f054d9b2e886139daa59)
1<?xml version="1.0"?>
2<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
3<!--
4
5 CDDL HEADER START
6
7 The contents of this file are subject to the terms of the
8 Common Development and Distribution License (the "License").
9 You may not use this file except in compliance with the License.
10
11 You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12 or http://www.opensolaris.org/os/licensing.
13 See the License for the specific language governing permissions
14 and limitations under the License.
15
16 When distributing Covered Code, include this CDDL HEADER in each
17 file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18 If applicable, add the following below this CDDL HEADER, with the
19 fields enclosed by brackets "[]" replaced with your own identifying
20 information: Portions Copyright [yyyy] [name of copyright owner]
21
22 CDDL HEADER END
23
24	Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
25	Copyright (c) 2012 by Delphix. All rights reserved.
26	Copyright 2014 Nexenta Systems, Inc.  All rights reserved
27	Copyright 2016 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
28	Copyright (c) 2012, 2014 by Delphix. All rights reserved.
29
30	NOTE:  This service manifest is not editable; its contents will
31	be overwritten by package or patch operations, including
32	operating system upgrade.  Make customizations in a different
33	file.
34
35	Note: if this service is modified to consist of anything other
36	than a single instance named 'default', you must make changes to
37	$SRC/head/rpcsvc/daemon_utils.h and libnsl:open_daemon_lock().
38-->
39
40<service_bundle type='manifest' name='SUNWnfssr:nfs-server'>
41
42<service
43	name='network/nfs/server'
44	type='service'
45	version='2'>
46
47	<dependency name='network'
48	    grouping='require_any'
49	    restart_on='error'
50	    type='service'>
51		<service_fmri value='svc:/milestone/network' />
52	</dependency>
53
54	<dependency name='nlockmgr'
55	    grouping='require_all'
56	    restart_on='error'
57	    type='service'>
58		<service_fmri value='svc:/network/nfs/nlockmgr' />
59	</dependency>
60
61	<dependency name='mapid'
62	    grouping='optional_all'
63	    restart_on='error'
64	    type='service'>
65		<service_fmri value='svc:/network/nfs/mapid' />
66	</dependency>
67
68	<dependency name='rpcbind'
69	    grouping='require_all'
70	    restart_on='restart'
71	    type='service'>
72		<service_fmri value='svc:/network/rpc/bind' />
73	</dependency>
74
75	<dependency name='keyserv'
76	    grouping='optional_all'
77	    restart_on='none'
78	    type='service'>
79		<service_fmri value='svc:/network/rpc/keyserv' />
80	</dependency>
81
82	<dependency name='gss'
83	    grouping='optional_all'
84	    restart_on='none'
85	    type='service'>
86		<service_fmri value='svc:/network/rpc/gss' />
87	</dependency>
88
89	<dependency name='share-group'
90	    grouping='optional_all'
91	    restart_on='none'
92	    type='service'>
93		<service_fmri value='svc:/network/shares/group' />
94	</dependency>
95
96	<dependency name='reparse'
97	    grouping='optional_all'
98	    restart_on='none'
99	    type='service'>
100		<service_fmri value='svc:/system/filesystem/reparse' />
101	</dependency>
102
103	<!-- Must have all local filesystems mounted before we share them -->
104	<dependency name='filesystem-local'
105	    grouping='require_all'
106	    restart_on='error'
107	    type='service'>
108	    	<service_fmri value='svc:/system/filesystem/local' />
109	</dependency>
110
111	<dependent
112		name='nfs-server_multi-user-server'
113		grouping='optional_all'
114		restart_on='none'>
115		<service_fmri value='svc:/milestone/multi-user-server' />
116	</dependent>
117
118	<!--
119	  The shareall done as part of the nfs-server method may take a
120	  long time, as the contents of dfstab can be arbitrarily large.
121	  Set the timeout appropriately for both 'start' and 'refresh'.
122	-->
123	<exec_method
124	    type='method'
125	    name='start'
126	    exec='/lib/svc/method/nfs-server %m'
127	    timeout_seconds='3600' />
128
129	<exec_method
130	    type='method'
131	    name='refresh'
132	    exec='/lib/svc/method/nfs-server %m'
133	    timeout_seconds='3600' />
134
135	<!--
136	  The stop method runs unshareall as well as up to a 10 second
137	  sleep to do graceful versus forceful shutdown of daemons.  Set
138	  the timeout appropriately.
139	-->
140	<exec_method
141	    type='method'
142	    name='stop'
143	    exec='/lib/svc/method/nfs-server %m %{restarter/contract}'
144	    timeout_seconds='3600' />
145
146	<property_group name='application' type='framework'>
147		<stability value='Evolving' />
148		<propval name='auto_enable' type='boolean' value='true' />
149	</property_group>
150
151	<property_group name='firewall_context' type='com.sun,fw_definition'>
152		<propval name='name' type='astring' value='nfsd' />
153		<propval name='ipf_method' type='astring'
154		    value='/lib/svc/method/nfs-server ipfilter' />
155	</property_group>
156
157	<property_group name='firewall_config' type='com.sun,fw_configuration'>
158		<propval name='policy' type='astring' value='use_global' />
159		<propval name='block_policy' type='astring'
160			value='use_global' />
161		<propval name='apply_to' type='astring' value='' />
162		<propval name='apply_to_6' type='astring' value='' />
163		<propval name='exceptions' type='astring' value='' />
164		<propval name='exceptions_6' type='astring' value='' />
165		<propval name='target' type='astring' value='' />
166		<propval name='target_6' type='astring' value='' />
167		<propval name='value_authorization' type='astring'
168			value='solaris.smf.value.firewall.config' />
169	</property_group>
170	<instance name='default' enabled='false'>
171	 <property_group name='nfs-props' type='com.oracle.nfs,props'>
172	   <propval name='device' type='astring' value=''/>
173	   <propval name='listen_backlog' type='integer' value='32'/>
174	   <propval name='max_connections' type='integer' value='-1'/>
175	   <propval name='protocol' type='astring' value='ALL'/>
176	   <propval name='server_delegation' type='astring' value='on'/>
177	   <propval name='server_versmax' type='integer' value='4'/>
178	   <propval name='server_versmin' type='integer' value='2'/>
179	   <propval name='servers' type='integer' value='1024'/>
180	   <propval name='mountd_listen_backlog' type='integer' value='64'/>
181	   <propval name='mountd_max_threads' type='integer' value='16'/>
182	   <propval name='mountd_port' type='integer' value='0'/>
183	 </property_group>
184	</instance>
185
186	<stability value='Stable' />
187
188	<template>
189		<common_name>
190			<loctext xml:lang='C'>
191				NFS server
192			</loctext>
193		</common_name>
194		<documentation>
195			<manpage title='nfsd' section='1M'
196				manpath='/usr/share/man' />
197		</documentation>
198	</template>
199</service>
200
201</service_bundle>
202