[go: up one dir, main page]

File: INSTALL

package info (click to toggle)
smartmontools 5.32-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,692 kB
  • ctags: 1,555
  • sloc: ansic: 14,892; sh: 3,677; asm: 597; makefile: 275
file content (473 lines) | stat: -rw-r--r-- 18,773 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
Smartmontools installation instructions
=======================================

$Id: INSTALL,v 1.49 2004/05/27 17:19:39 card_captor Exp $

Please also see the smartmontools home page:
http://smartmontools.sourceforge.net/

Table of contents:

[1] System requirements
[2] Installing from CVS
[3] Installing from source tarball
[4] Guidelines for different Linux distributions
[5] Guidelines for FreeBSD
[6] Guidelines for NetBSD
[7] Guidelines for Solaris
[8] Guidelines for Cygwin
[9] Guidelines for Windows
[10] Comments
[11] Detailed description of ./configure options

[1] System requirements
=======================

    A) Linux

    Any Linux distribution will support smartmontools if it has a
    kernel version greater than or equal to 2.2.14. So any recent
    Linux distribution should support smartmontools.

    There are two parts of smartmontools that may require a patched or
    nonstandard kernel:

    (1) To get the ATA RETURN SMART STATUS command, the kernel needs
    to support the HDIO_DRIVE_TASK ioctl().

    (2) To run Selective Self-tests, the kernel needs to support the
    HDIO_DRIVE_TASKFILE ioctl().

    If your kernel does not support one or both of these ioctls, then
    smartmontools will "mostly" work.  The things that don't work will
    give you harmless warning messages.

    For item (1) above, any 2.4 or 2.6 series kernel will provide
    HDIO_DRIVE_TASK support.  Some 2.2.20 and later kernels also
    provide this support IF they're properly patched and
    configured. [Andre Hedrick's IDE patches may be found at
    http://www.funet.fi/pub/linux/kernel/people/hedrick/ide-2.2.20/ or
    are available from your local kernel.org mirror.  They are not
    updated for 2.2.21 or later, and may contain a few bugs.].
    If the configuration option CONFIG_IDE_TASK_IOCTL
    exists in your 2.2.X kernel source code tree, then your 2.2.X
    kernel will probably support this ioctl. [Note that this kernel
    configuration option does NOT need to be enabled. Its presence
    merely indicates that the required HDIO_DRIVE_TASK ioctl() is
    supported.]

    For item (2) above, your kernel must be configured with the kernel
    configuration option CONFIG_IDE_TASKFILE_IO enabled.  This
    configuration option is present in all 2.4 and 2.6 series
    kernels. Some 2.2.20 and later kernels also provide this support
    IF they're properly patched and configured as described above.

    Please see FAQ section of the URL above for additional details.

    If you are using 3ware controllers, for full functionality you
    must either use version 1.02.00.037 or greater of the 3w-xxxx
    driver, or patch earlier 3ware 3w-xxxx drivers.  See
    http://smartmontools.sourceforge.net/3w-xxxx.txt
    for the patch.  The version 1.02.00.037 3w-xxxx.c driver was
    incorporated into kernel 2.4.23-bk2 on 3 December 2003 and into
    kernel 2.6.0-test5-bk11 on 23 September 2003.

    B) FreeBSD

    For FreeBSD support, a 5-current kernel that includes ATAng is
    required in order to support ATA drives.  Even current versions of
    ATAng will not support 100% operation, as the SMART status can not
    be reliably retrieved.  There is patch pending approval of the
    ATAng driver maintainer that will address this issue.

    C) Solaris

    The SCSI code has been tested on a variety of Solaris 8 and 9
    systems.  ATA/IDE code only works on SPARC platform.  All tested
    kernels worked correctly.

    D) NetBSD

    The code was tested on a 1.6ZG (i.e., 1.6-current) system. It should
    also function under 1.6.1 and later releases (unverified).  Currently
    it doesn't support ATA devices on 3ware RAID controllers.

    E) Cygwin

    The code was tested on Cygwin 1.5.7 and should also work on other
    recent releases.

    Both Cygwin and Windows versions of smartmontools share the same code
    to access the IDE/ATA or SCSI devices. The information in the "Windows"
    section below also applies to the Cygwin version.

    F) Windows

    The code was tested on Windows 98SE, NT4, 2000 and XP. It should also
    work on Windows 95(OSR2), 98, and ME.

    On 9x/ME, only standard (legacy) IDE/ATA devices 0-3 are supported.
    The driver SMARTVSD.VXD must be present in WINDOWS\SYSTEM\IOSUBSYS
    to get loaded at Windows startup. The default location in a new
    installation of some versions of Windows is the WINDOWS\SYSTEM folder.
    In this case, move SMARTVSD.VXD to WINDOWS\SYSTEM\IOSUBSYS and reboot
    (http://support.microsoft.com/default.aspx?scid=kb;en-us;265854).

    On NT4/2000/XP, also other ATA or SATA devices are supported if
    the device driver implements the SMART IOCTL.

    The IDE/ATA read log command (smartctl -l, --log, -a, --all) is
    not supported on NT4. On 2000/XP, the undocumented and possibly buggy
    IOCTL_IDE_PASS_THROUGH is used for this purpose (see WARNINGS file).

    SCSI devices are supported on all versions of Windows. An installed
    ASPI interface (WNASPI32.DLL) is required to access SCSI devices.

[2] Installing from CVS
=======================
    Get the sources from the CVS repository:
    cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/smartmontools login
    cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/smartmontools co sm5
    (when prompted for a password, just press Enter)

    Then type:
    ./autogen.sh
    and continue with step [3] below, skipping the "unpack the tarball" step.

    Further details of using CVS can be found at the URL above.

    The autogen.sh command is ONLY required when installing from
    CVS. You need GNU Autoconf (version 2.50 or greater), GNU Automake
    (version 1.6 or greater) and their dependencies installed in order
    to run it.  You can get these here:
    http://www.gnu.org/directory/GNU/autoconf.html
    http://www.gnu.org/directory/GNU/automake.html

[3] Installing from the source tarball
======================================

    If you are NOT installing from CVS, then unpack the tarball: 
    tar zxvf smartmontools-5.VERSION.tar.gz

    Then:
    ./configure
    make
    make install (you may need to be root to do this)

    As shown (with no options to ./configure) this defaults to the
    following set of installation directories:   
    --prefix=/usr/local
    --sbindir=/usr/local/sbin
    --sysconfdir=/usr/local/etc
    --mandir=/usr/local/share/man
    --with-docdir=/usr/local/share/doc/smartmontools-VERSION
    --with-initscriptdir=/usr/local/etc/rc.d/init.d
    --disable-sample

    These will usually not overwrite existing "distribution" installations on
    Linux Systems since the FHS reserves this area for use by the system
    administrator.

    For different installation locations or distributions, simply add
    arguments to ./configure as shown in [4] below.

    If you wish to alter the default C compiler flags, set an
    environment variable CFLAGS='your options' before doing
    ./configure, or else do:
    make CFLAGS='your options'

[4] Guidelines for different Linux distributions
================================================

Note: Please send corrections/additions to:
smartmontools-support@lists.sourceforge.net

Debian:
  If you don't want to overwrite any distribution package, use:
  ./configure

Filesystem Hierarchy Standard (FHS, http://www.pathname.com/fhs/):
  ./configure --sbindir=/usr/local/sbin                               \
              --sysconfdir=/usr/local/etc                             \
              --mandir=/usr/local/man                                 \
              --with-initscriptdir=/usr/local/etc/rc.d/init.d         \
              --with-docdir=/usr/local/share/doc/smartmontools-VERSION

Red Hat:
  ./configure --sbindir=/usr/sbin                               \
	      --sysconfdir=/etc                                 \
	      --mandir=/usr/share/man                           \
	      --with-initscriptdir=/etc/rc.d/init.d             \
	      --with-docdir=/usr/share/doc/smartmontools-VERSION

Slackware:
  If you don't want to overwrite any "distribution" package, use:
  ./configure

  Otherwise use:
  ./configure --sbindir=/usr/sbin                               \
              --sysconfdir=/etc                                 \
              --mandir=/usr/share/man                           \
              --with-initscriptdir=/etc/rc.d                    \
              --with-docdir=/usr/share/doc/smartmontools-VERSION

  And
  removepkg smartmontools smartsuite (only root can do this)
  before make install

  The init script works on Slackware. You just have to add an entry like
  the following in /etc/rc.d/rc.M or /etc/rc.d/rc.local:

  if [ -x /etc/rc.d/smartd ]; then
    . /etc/rc.d/smartd start
  fi

  To disable it:
  chmod 644 /etc/rc.d/smartd

  For a list of options:
  /etc/rc.d/smartd

SuSE:
  ./configure --sbindir=/usr/sbin                                        \
              --sysconfdir=/etc                                          \
              --mandir=/usr/share/man                                    \
              --with-initscriptdir=/etc/init.d                           \
              --with-docdir=/usr/share/doc/packages/smartmontools-VERSION

[5] Guidelines for FreeBSD
==========================
  To match the way it will installed when it becomes available as a PORT, use
  the following:

  ./configure --prefix=/usr/local                                      \
              --with-initscriptdir=/usr/local/etc/rc.d/                \
              --with-docdir=/usr/local/share/doc/smartmontools-VERSION \
	      --enable-sample

  Also, it is important that you use GNU make (gmake from /usr/ports/devel/gmake)
  to build smartmontools, as the default FreeBSD make doesn't know how to build
  the man pages.

  NOTE: --enable-sample will cause the smartd.conf and smartd RC files to
  be installed with the string '.sample' append to the name, so you will end
  up with the following:
	/usr/local/etc/smartd.conf.sample
	/usr/local/etc/rc.d/smartd.sample

[6] Guidelines for NetBSD
=========================
  ./configure --prefix=/usr/pkg                                       \
	      --with-docdir=/usr/pkg/share/doc/smartmontools

[7] Guidelines for Solaris
==========================

    smartmontools has been partially but not completely ported to
    Solaris.  It includes complete SCSI support but no ATA or 3ware
    support.  It can be compiled with either cc or gcc. To compile
    with gcc:

    ./configure [args]
    make

    To compile with Sun cc:

    setenv CC cc  [csh syntax], or
    CC=cc         [sh syntax]
    ./configure [args]
    make

    The correct arguments [args] to configure are:
     --sbindir=/usr/sbin                                \
     --sysconfdir=/etc                                  \
     --mandir=/usr/share/man                            \
     --with-docdir=/usr/share/doc/smartmontools-VERSION \
     --with-initscriptdir=/etc/init.d

    To start the script automatically on bootup, create hardlinks that
    indicate when to start/stop in:
		    /etc/rc[S0123].d/
    pointing to /etc/init.d/smartd. Create:
	    K<knum>smartd in rcS.d, rc0.d, rc1.d, rc2.d
	    S<snum>smartd in rc3.d
    where <knum> is related to <snum> such that the higher snum is the
    lower knum must be.

    On usual configuration, '95' would be suitable for <snum> and '05'
    for <knum> respectively.  If you choose these value, you can
    create hardlinks by:

    cd /etc
    sh -c 'for n in S 0 1 2; do ln init.d/smartd rc$n.d/K05smartd; done'
    sh -c 'for n in 3      ; do ln init.d/smartd rc$n.d/S95smartd; done'

[8] Guidelines for Cygwin
=========================

Same as Red Hat:
  ./configure --prefix=/usr                 \
              --sysconfdir=/etc             \
              --mandir='${prefix}/share/man'

  OR EQUIVALENTLY
  ./configure --sbindir=/usr/sbin                               \
              --sysconfdir=/etc                                 \
              --mandir=/usr/share/man                           \
              --with-initscriptdir=/etc/rc.d/init.d             \
              --with-docdir=/usr/share/doc/smartmontools-VERSION

  Using DOS text file type as default for the working directories ("textmode"
  mount option) is not recommended. Building the binaries and man pages using
  "make" is possible, but "make dist" and related targets work only with UNIX
  file type ("binmode" mount option) set. The "autogen.sh" script prints a
  warning if DOS type is selected.

[9] Guidelines for Windows
==========================

To compile the Windows release with MinGW, use the following on Cygwin:

  ./configure --build=mingw32
  make

  Instead of using "make install", copy the .exe files into
  some directory in the PATH.

[10] Comments
============

To compile from another directory, you can replace the step
  ./configure [options]
by the following:
  mkdir objdir
  cd objdir
  ../configure [options]

To install to another destination (used mainly by package maintainers,
or to examine the package contents without risk of modifying any
system files) you can replace the step:
  make install
with:
  make DESTDIR=/home/myself/smartmontools-package install

Use a full path. Paths like ~/smartmontools-package may not work.

After installing smartmontools, you can read the man pages, and try
out the commands:
   
man smartd.conf
man smartctl
man smartd

/usr/sbin/smartctl -s on -o on -S on /dev/hda (only root can do this)
/usr/sbin/smartctl -a /dev/hda (only root can do this)

Note that the default location for the manual pages are
/usr/share/man/man5 and /usr/share/man/man8.  If "man" doesn't find
them, you may need to add /usr/share/man to your MANPATH environment
variable.

Source and binary RPM packages are available at
http://sourceforge.net/project/showfiles.php?group_id=64297

Refer to http://smartmontools.sourceforge.net/index.html#howtodownload
for any additional download and installation instructions.

The following files are installed if ./configure has no options:

/usr/local/sbin/smartd                                  [Executable daemon]
/usr/local/sbin/smartctl                                [Executable command-line utility]
/usr/local/etc/smartd.conf                              [Configuration file for smartd daemon]
/usr/local/etc/rc.d/init.d/smartd                       [Init/Startup script for smartd]
/usr/local/share/man/man5/smartd.conf.5                 [Manual page]
/usr/local/share/man/man8/smartctl.8                    [Manual page]
/usr/local/share/man/man8/smartd.8                      [Manual page]
/usr/local/share/doc/smartmontools-5.X/AUTHORS          [Information about the authors and developers]
/usr/local/share/doc/smartmontools-5.X/CHANGELOG        [A log of changes. Also see CVS]
/usr/local/share/doc/smartmontools-5.X/COPYING          [GNU General Public License Version 2]
/usr/local/share/doc/smartmontools-5.X/INSTALL          [Installation instructions: what you're reading!]
/usr/local/share/doc/smartmontools-5.X/NEWS             [Significant bugs discovered in old versions]
/usr/local/share/doc/smartmontools-5.X/README           [Overview]
/usr/local/share/doc/smartmontools-5.X/TODO             [Things that need to be done/fixed]
/usr/local/share/doc/smartmontools-5.X/WARNINGS         [Systems where lockups or other serious problems were reported]
/usr/local/share/doc/smartmontools-5.X/smartd.conf      [Example configuration file for smartd]
/usr/local/share/doc/smartmontools-5.X/examplescripts   [Executable scripts for -M exec of smartd.conf (4 files)]


[11] Detailed description of arguments to configure command
===========================================================

When you type:
./configure [options]
there are six particularly important variables that affect where the
smartmontools software is installed.  The variables are listed here,
with their default values in square brackets, and the quantities that
they affect described following that.  This is a very wide table: please read
it in a wide window.

OPTIONS              DEFAULT                                      AFFECTS
-------              -------                                      -------
--prefix             /usr/local                                   Please see below
--sbindir            ${prefix}/sbin                               Directory for smartd/smartctl executables;
                                                                  Contents of smartd/smartctl man pages
--mandir             ${prefix}/share/man                          Directory for smartctl/smartd/smartd.conf man pages
--sysconfdir         ${prefix}/etc                                Directory for smartd.conf;
                                                                  Contents of smartd executable;
                                                                  Contents of smartd/smartd.conf man pages;
                                                                  Directory for rc.d/init.d/smartd init script
--with-initscriptdir  ${sysconfdir}/init.d/rc.d                   Location of init scripts       
--with-docdir	      ${prefix}/share/doc/smartmontools-5.X       Location of the documentation
--enable-sample	      --disable-sample				  Adds the string '.sample' to the names of the smartd.conf file and the smartd RC file

Here's an example:
If you set --prefix=/home/joe and none of the other four
variables then the different directories that are used would be:
--sbindir             /home/joe/sbin
--mandir              /home/joe/share/man
--sysconfdir          /home/joe/etc
--with-initscriptdir  /home/joe/etc/init.d/rc.d
--with-docdir	      /home/joe/doc/smartmontools-5.X

This is useful for test installs in a harmless subdirectory somewhere.

Here are the four possible cases for the four variables above:

Case 1:
--prefix not set
--variable not set
===> VARIABLE gets default value above

Case 2:
--prefix set
--variable not set
===> VARIABLE gets PREFIX/ prepended to default value above

Case 3:
--prefix not set
--variable set
===> VARIABLE gets value that is set

Case 4:
--prefix is set
--variable is set
===> PREFIX is IGNORED, VARIABLE gets value that is set


Here are the differences with and without --enable-sample, assuming
no other options specified (see above for details)

Case 1:
--enable-sample provided
==> Files installed are:
	/usr/local/etc/smartd.conf.sample
	/usr/local/etc/rc.d/init.d/smartd.sample

Case 2:
--disable-sample provided or parameter left out
==> Files installed are:
	/usr/local/etc/smartd.conf
	/usr/local/etc/rc.d/init.d/smartd

Additional information about using configure can be found here:
http://www.gnu.org/manual/autoconf-2.57/html_mono/autoconf.html#SEC139