diff options
| author | David Greenman <dg@FreeBSD.org> | 1995-08-30 09:28:31 +0000 |
|---|---|---|
| committer | David Greenman <dg@FreeBSD.org> | 1995-08-30 09:28:31 +0000 |
| commit | a422d41b561b3c4cd45eb03c030ccf730e326c9b (patch) | |
| tree | 3128de43947b44cbc095eeeef630fe1399c0f876 /sbin | |
| parent | 665f944e8d8e289be4ec3821072e9a4b8493fd54 (diff) | |
Notes
Diffstat (limited to 'sbin')
| -rw-r--r-- | sbin/tunefs/tunefs.8 | 14 | ||||
| -rw-r--r-- | sbin/tunefs/tunefs.c | 27 |
2 files changed, 41 insertions, 0 deletions
diff --git a/sbin/tunefs/tunefs.8 b/sbin/tunefs/tunefs.8 index b95ff9ddc878..e62662ddb41a 100644 --- a/sbin/tunefs/tunefs.8 +++ b/sbin/tunefs/tunefs.8 @@ -39,10 +39,12 @@ .Nd tune up an existing file system .Sh SYNOPSIS .Nm tunefs +.Op Fl A .Op Fl a Ar maxcontig .Op Fl d Ar rotdelay .Op Fl e Ar maxbpg .Op Fl m Ar minfree +.Op Fl p .Bk -words .Op Fl o Ar optimize_preference .Ek @@ -54,6 +56,10 @@ which affect the layout policies. The parameters which are to be changed are indicated by the flags given below: .Bl -tag -width Ds +.It Fl A +The file system has several backups of the super-block. Specifying +this option will cause all backups to be modified as well as the +primary super-block. This is potentially dangerous - use with caution. .It Fl a Ar maxcontig This specifies the maximum number of contiguous blocks that will be laid out before forcing a rotational delay (see @@ -103,6 +109,12 @@ fragmentation on the disk. Optimization for space has much higher overhead for file writes. The kernel normally changes the preference automatically as the percent fragmentation changes on the file system. +.It Fl p +This option shows a summary of what the current tuneable settings +are on the selected file system. More detailed information can be +obtained in the +.Xr dumpfs 8 +manual page. .El .Sh SEE ALSO .Xr fs 5 , @@ -128,6 +140,8 @@ the changes will only take effect if the program is run on dismounted file systems. To change the root file system, the system must be rebooted after the file system is tuned. +.\" Take this out and a Unix Demon will dog your steps from now until +.\" the time_t's wrap around. .Pp You can tune a file system, but you can't tune a fish. .Sh HISTORY diff --git a/sbin/tunefs/tunefs.c b/sbin/tunefs/tunefs.c index e277a71ce2b3..3677d8957811 100644 --- a/sbin/tunefs/tunefs.c +++ b/sbin/tunefs/tunefs.c @@ -74,6 +74,7 @@ void bwrite(daddr_t, char *, int); int bread(daddr_t, char *, int); void getsb(struct fs *, char *); void usage __P((void)); +void printfs __P((void)); int main(argc, argv) @@ -117,6 +118,10 @@ again: Aflag++; continue; + case 'p': + printfs(); + exit(0); + case 'a': name = "maximum contiguous block count"; if (argc < 1) @@ -233,6 +238,7 @@ usage() fprintf(stderr, "\t-e maximum blocks per file in a cylinder group\n"); fprintf(stderr, "\t-m minimum percentage of free space\n"); fprintf(stderr, "\t-o optimization preference (`space' or `time')\n"); + fprintf(stderr, "\t-p no change - just prints current tuneable settings\n"); exit(2); } @@ -253,6 +259,27 @@ getsb(fs, file) } void +printfs() +{ + warnx("maximum contiguous block count: (-a) %d", + sblock.fs_maxcontig); + warnx("rotational delay between contiguous blocks: (-d) %d ms", + sblock.fs_rotdelay); + warnx("maximum blocks per file in a cylinder group: (-e) %d", + sblock.fs_maxbpg); + warnx("minimum percentage of free space: (-m) %d%%", + sblock.fs_minfree); + warnx("optimization preference: (-o) %s", + sblock.fs_optim == FS_OPTSPACE ? "space" : "time"); + if (sblock.fs_minfree >= MINFREE && + sblock.fs_optim == FS_OPTSPACE) + warnx(OPTWARN, "time", ">=", MINFREE); + if (sblock.fs_minfree < MINFREE && + sblock.fs_optim == FS_OPTTIME) + warnx(OPTWARN, "space", "<", MINFREE); +} + +void bwrite(blk, buf, size) daddr_t blk; char *buf; |
