xref: /illumos-gate/usr/src/cmd/fs.d/nfs/svc/server.xml (revision a386cc11a86ecb60f5a48078d22c1500e2ad003e)
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 2014 Nexenta Systems, Inc.  All rights reserved.
26
27	NOTE:  This service manifest is not editable; its contents will
28	be overwritten by package or patch operations, including
29	operating system upgrade.  Make customizations in a different
30	file.
31
32	Note: if this service is modified to consist of anything other
33	than a single instance named 'default', you must make changes to
34	$SRC/head/rpcsvc/daemon_utils.h and libnsl:open_daemon_lock().
35-->
36
37<service_bundle type='manifest' name='SUNWnfssr:nfs-server'>
38
39<service
40	name='network/nfs/server'
41	type='service'
42	version='1'>
43
44	<dependency name='network'
45	    grouping='require_any'
46	    restart_on='error'
47	    type='service'>
48		<service_fmri value='svc:/milestone/network' />
49	</dependency>
50
51	<dependency name='nlockmgr'
52	    grouping='require_all'
53	    restart_on='error'
54	    type='service'>
55		<service_fmri value='svc:/network/nfs/nlockmgr' />
56	</dependency>
57
58	<dependency name='mapid'
59	    grouping='optional_all'
60	    restart_on='error'
61	    type='service'>
62		<service_fmri value='svc:/network/nfs/mapid' />
63	</dependency>
64
65	<dependency name='rpcbind'
66	    grouping='require_all'
67	    restart_on='restart'
68	    type='service'>
69		<service_fmri value='svc:/network/rpc/bind' />
70	</dependency>
71
72	<dependency name='keyserv'
73	    grouping='optional_all'
74	    restart_on='none'
75	    type='service'>
76		<service_fmri value='svc:/network/rpc/keyserv' />
77	</dependency>
78
79	<dependency name='gss'
80	    grouping='optional_all'
81	    restart_on='none'
82	    type='service'>
83		<service_fmri value='svc:/network/rpc/gss' />
84	</dependency>
85
86	<dependency name='share-group'
87	    grouping='optional_all'
88	    restart_on='none'
89	    type='service'>
90		<service_fmri value='svc:/network/shares/group' />
91	</dependency>
92
93	<dependency name='reparse'
94	    grouping='optional_all'
95	    restart_on='none'
96	    type='service'>
97		<service_fmri value='svc:/system/filesystem/reparse' />
98	</dependency>
99
100	<!-- Must have all local filesystems mounted before we share them -->
101	<dependency name='filesystem-local'
102	    grouping='require_all'
103	    restart_on='error'
104	    type='service'>
105	    	<service_fmri value='svc:/system/filesystem/local' />
106	</dependency>
107
108	<dependent
109		name='nfs-server_multi-user-server'
110		grouping='optional_all'
111		restart_on='none'>
112		<service_fmri value='svc:/milestone/multi-user-server' />
113	</dependent>
114
115	<!--
116	  The shareall done as part of the nfs-server method may take a
117	  long time, as the contents of dfstab can be arbitrarily large.
118	  Set the timeout appropriately for both 'start' and 'refresh'.
119	-->
120	<exec_method
121	    type='method'
122	    name='start'
123	    exec='/lib/svc/method/nfs-server %m'
124	    timeout_seconds='3600' />
125
126	<exec_method
127	    type='method'
128	    name='refresh'
129	    exec='/lib/svc/method/nfs-server %m'
130	    timeout_seconds='3600' />
131
132	<!--
133	  The stop method runs unshareall as well as up to a 10 second
134	  sleep to do graceful versus forceful shutdown of daemons.  Set
135	  the timeout appropriately.
136	-->
137	<exec_method
138	    type='method'
139	    name='stop'
140	    exec='/lib/svc/method/nfs-server %m %{restarter/contract}'
141	    timeout_seconds='3600' />
142
143	<property_group name='application' type='framework'>
144		<stability value='Evolving' />
145		<propval name='auto_enable' type='boolean' value='true' />
146	</property_group>
147
148	<property_group name='firewall_context' type='com.sun,fw_definition'>
149		<propval name='name' type='astring' value='nfsd' />
150		<propval name='ipf_method' type='astring'
151		    value='/lib/svc/method/nfs-server ipfilter' />
152	</property_group>
153
154	<property_group name='firewall_config' type='com.sun,fw_configuration'>
155		<propval name='policy' type='astring' value='use_global' />
156		<propval name='apply_to' type='astring' value='' />
157		<propval name='exceptions' type='astring' value='' />
158		<propval name='value_authorization' type='astring'
159			value='solaris.smf.value.firewall.config' />
160	</property_group>
161	<instance name='default' enabled='false'>
162	 <property_group name='nfs-props' type='com.oracle.nfs,props'>
163	   <propval name='device' type='astring' value=''/>
164	   <propval name='listen_backlog' type='integer' value='32'/>
165	   <propval name='max_connections' type='integer' value='-1'/>
166	   <propval name='protocol' type='astring' value='ALL'/>
167	   <propval name='server_delegation' type='astring' value='on'/>
168	   <propval name='server_versmax' type='integer' value='4'/>
169	   <propval name='server_versmin' type='integer' value='2'/>
170	   <propval name='servers' type='integer' value='16'/>
171	   <propval name='mountd_listen_backlog' type='integer' value='64'/>
172	   <propval name='mountd_max_threads' type='integer' value='16'/>
173	 </property_group>
174	</instance>
175
176	<stability value='Stable' />
177
178	<template>
179		<common_name>
180			<loctext xml:lang='C'>
181				NFS server
182			</loctext>
183		</common_name>
184		<documentation>
185			<manpage title='nfsd' section='1M'
186				manpath='/usr/share/man' />
187		</documentation>
188	</template>
189</service>
190
191</service_bundle>
192