1putdev(1M) System Administration Commands putdev(1M)
2
3
4
6 putdev - edits device table
7
9 putdev -a alias [attribute=value [...]]
10
11
12 putdev -m device attribute=value [attribute = value [...]]
13
14
15 putdev -d device [attribute [...]]
16
17
19 putdev adds a new device to the device table, modifies an existing
20 device description or removes a device entry from the table. The first
21 synopsis is used to add a device. The second synopsis is used to modify
22 existing entries by adding or changing attributes. If a specified
23 attribute is not defined, this option adds that attribute to the device
24 definition. If a specified attribute is already defined, it modifies
25 the attribute definition. The third synopsis is used to delete either
26 an entire device entry or, if the attribute argument is used, to delete
27 an attribute assignment for a device.
28
30 The following options are supported:
31
32 -a Add a device to the device table using the specified attributes.
33 The device must be referenced by its alias.
34
35
36 -d Remove a device from the device table, when executed without the
37 attributes argument. Used with the attribute argument, it deletes
38 the given attribute specification for device from the table.
39
40
41 -m Modify a device entry in the device table. If an entry already
42 exists, it adds any specified attributes that are not defined. It
43 also modifies any attributes which already have a value with the
44 value specified by this command.
45
46
48 The following operands are supported:
49
50 alias Designates the alias of the device to be added.
51
52
53 attribute Designates a device attribute to be added, modified, or
54 deleted. Can be any of the device attributes described
55 under DEVICE ATTRIBUTES except alias. This prevents an
56 accidental modification or deletion of a device's alias
57 from the table.
58
59
60 device Designates the pathname or alias of the device whose
61 attribute is to be added, modified, or removed.
62
63
64 value Designates the value to be assigned to a device's
65 attribute.
66
67
69 The following list shows the standard device attributes, used by appli‐
70 cations such as ufsdump(1M) and ufsrestore(1M), which can be defined
71 for a device. You are not limited to this list, you can define any
72 attribute you like.
73
74 alias The unique name by which a device is known. No two devices
75 in the database may share the same alias name. The name is
76 limited in length to 14 characters and should contain only
77 alphanumeric characters and the following special charac‐
78 ters if they are escaped with a backslash: underscore ( _
79 ), dollar sign ($), hyphen (−), and period (.).
80
81
82 bdevice The pathname to the block special device node associated
83 with the device, if any. The associated major/minor combi‐
84 nation should be unique within the database and should
85 match that associated with the cdevice field, if any. (It
86 is the administrator's responsibility to ensure that these
87 major/minor numbers are unique in the database.)
88
89
90 capacity The capacity of the device or of the typical volume, if
91 removable.
92
93
94 cdevice The pathname to the character special device node associ‐
95 ated with the device, if any. The associated major/minor
96 combination should be unique within the database and
97 should match that associated with the bdevice field, if
98 any. (It is the administrator's responsibility to ensure
99 that these major/minor numbers are unique in the data‐
100 base.)
101
102
103 cyl Used by the command specified in the mkfscmd attribute.
104
105
106 desc A description of any instance of a volume associated with
107 this device (such as floppy diskette).
108
109
110 dpartlist The list of disk partitions associated with this device.
111 Used only if type=disk. The list should contain device
112 aliases, each of which must have type=dpart.
113
114
115 dparttype The type of disk partition represented by this device.
116 Used only if type=dpart. It should be either fs (for file
117 system) or dp (for data partition).
118
119
120 erasecmd The command string that, when executed, erases the device.
121
122
123 fmtcmd The command string that, when executed, formats the
124 device.
125
126
127 fsname The file system name on the file system administered on
128 this partition, as supplied to the /usr/sbin/labelit com‐
129 mand. This attribute is specified only if type=dpart and
130 dparttype=fs.
131
132
133 gap Used by the command specified in the mkfscmd attribute.
134
135
136 mkfscmd The command string that, when executed, places a file sys‐
137 tem on a previously formatted device.
138
139
140 mountpt The default mount point to use for the device. Used only
141 if the device is mountable. For disk partitions where
142 type=dpart and dparttype=fs, this attribute should specify
143 the location where the partition is normally mounted.
144
145
146 nblocks The number of blocks in the file system administered on
147 this partition. Used only if type=dpart and dparttype=fs.
148
149
150 ninodes The number of inodes in the file system administered on
151 this partition. Used only if type=dpart and dparttype=fs.
152
153
154 norewind The name of the character special device node that allows
155 access to the serial device without rewinding when the
156 device is closed.
157
158
159 pathname Defines the pathname to an i-node describing the device
160 (used for non-block or character device pathnames, such as
161 directories).
162
163
164 type A token that represents inherent qualities of the device.
165 Standard types include: 9-track, ctape, disk, directory,
166 diskette, dpart, and qtape.
167
168
169 volname The volume name on the file system administered on this
170 partition, as supplied to the /usr/sbin/labelit command.
171 Used only if type=dpart and dparttype=fs.
172
173
174 volume A text string used to describe any instance of a volume
175 associated with this device. This attribute should not be
176 defined for devices which are not removable.
177
178
180 The following exit values are returned:
181
182 0 Successful completion.
183
184
185 1 Command syntax was incorrect, an invalid option was used, or an
186 internal error occurred.
187
188
189 2 The device table could not be opened for reading, or a new device
190 table could not be created.
191
192
193 3 If executed with the -a option, indicates that an entry in the
194 device table with the alias alias already exits. If executed with
195 the -m or -d options, indicates that no entry exists for device
196 device.
197
198
199 4 Indicates that -d was requested and one or more of the specified
200 attributes were not defined for the device.
201
202
204 /etc/device.tab
205
206
208 See attributes(5) for descriptions of the following attributes:
209
210
211
212
213 ┌─────────────────────────────┬─────────────────────────────┐
214 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
215 ├─────────────────────────────┼─────────────────────────────┤
216 │Availability │SUNWcsu │
217 └─────────────────────────────┴─────────────────────────────┘
218
220 devattr(1M), putdgrp(1M), ufsdump(1M), ufsrestore(1M), attributes(5)
221
222
223
224
225
226
227SunOS 5.11 3 Apr 1997 putdev(1M)