more file system > filesystem
This commit is contained in:
parent
4481bee462
commit
3468b317cb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=96707
@ -42,13 +42,13 @@ is always set to UTC, and the CMOS clock, which may be set to local
|
||||
time.
|
||||
.Nm Adjkerntz
|
||||
also informs the kernel about machine timezone shifts to
|
||||
maintain proper timestamps for local time file systems such as the MS-DOS
|
||||
file system.
|
||||
maintain proper timestamps for local time filesystems such as the MS-DOS
|
||||
filesystem.
|
||||
The main purpose of this thing is not general fixing of
|
||||
initially broken MS-DOS file timestamp idea but keeping
|
||||
the same timestamps between
|
||||
.Fx
|
||||
MS-DOS file system
|
||||
MS-DOS filesystem
|
||||
and MS-DOS operating system installed on the same
|
||||
machine.
|
||||
If the file
|
||||
@ -84,7 +84,7 @@ also stores the local time zone offset into the
|
||||
.Pa machdep.adjkerntz
|
||||
kernel variable, for use by subsequent invocations of
|
||||
.Em "'adjkerntz -a'"
|
||||
and by local time file systems.
|
||||
and by local time filesystems.
|
||||
.Pp
|
||||
For a local time CMOS clock
|
||||
.Em "'adjkerntz -i'"
|
||||
|
@ -54,7 +54,7 @@ The technique used by this program is also less general than
|
||||
bad block forwarding, as
|
||||
.Nm
|
||||
can't make amends for
|
||||
bad blocks in the i-list of file systems or in swap areas.
|
||||
bad blocks in the i-list of filesystems or in swap areas.
|
||||
.Pp
|
||||
On some disks,
|
||||
adding a sector which is suddenly bad to the bad sector table
|
||||
@ -68,8 +68,8 @@ do not support the bad-blocking standard
|
||||
may be used to good effect.
|
||||
.Pp
|
||||
.Nm Badsect
|
||||
is used on a quiet file system in the following way:
|
||||
First mount the file system, and change to its root directory.
|
||||
is used on a quiet filesystem in the following way:
|
||||
First mount the filesystem, and change to its root directory.
|
||||
Make a directory
|
||||
.Li BAD
|
||||
there.
|
||||
@ -80,12 +80,12 @@ giving as argument the
|
||||
directory followed by
|
||||
all the bad sectors you wish to add.
|
||||
(The sector numbers must be relative to the beginning of
|
||||
the file system, but this is not hard as the system reports
|
||||
the filesystem, but this is not hard as the system reports
|
||||
relative sector numbers in its console error messages.)
|
||||
Then change back to the root directory, unmount the file system
|
||||
Then change back to the root directory, unmount the filesystem
|
||||
and run
|
||||
.Xr fsck 8
|
||||
on the file system. The bad sectors should show up in two files
|
||||
on the filesystem. The bad sectors should show up in two files
|
||||
or in the bad sector files and the free list. Have
|
||||
.Xr fsck
|
||||
remove files containing the offending bad sectors, but
|
||||
@ -115,14 +115,14 @@ to convert the inode to a regular file containing the bad block.
|
||||
.Sh DIAGNOSTICS
|
||||
.Nm Badsect
|
||||
refuses to attach a block that
|
||||
resides in a critical area or is out of range of the file system.
|
||||
resides in a critical area or is out of range of the filesystem.
|
||||
A warning is issued if the block is already in use.
|
||||
.Sh BUGS
|
||||
If more than one sector which comprise a file system fragment are bad,
|
||||
If more than one sector which comprise a filesystem fragment are bad,
|
||||
you should specify only one of them to
|
||||
.Nm ,
|
||||
as the blocks in the bad sector files actually cover all the sectors in a
|
||||
file system fragment.
|
||||
filesystem fragment.
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Nm
|
||||
|
@ -52,7 +52,7 @@ static const char rcsid[] =
|
||||
* and makes files containing the blocks of which these sectors are a part.
|
||||
* It can be used to contain sectors which have problems if these sectors
|
||||
* are not part of the bad file for the pack (see bad144). For instance,
|
||||
* this program can be used if the driver for the file system in question
|
||||
* this program can be used if the driver for the filesystem in question
|
||||
* does not support bad block forwarding.
|
||||
*/
|
||||
#include <sys/param.h>
|
||||
@ -169,7 +169,7 @@ chkuse(daddr_t blkno, int cnt)
|
||||
|
||||
fsbn = dbtofsb(fs, blkno);
|
||||
if ((unsigned)(fsbn+cnt) > fs->fs_size) {
|
||||
printf("block %ld out of range of file system\n", (long)blkno);
|
||||
printf("block %ld out of range of filesystem\n", (long)blkno);
|
||||
return (1);
|
||||
}
|
||||
cg = dtog(fs, fsbn);
|
||||
@ -200,7 +200,7 @@ chkuse(daddr_t blkno, int cnt)
|
||||
}
|
||||
|
||||
/*
|
||||
* read a block from the file system
|
||||
* read a block from the filesystem
|
||||
*/
|
||||
void
|
||||
rdfs(daddr_t bno, int size, char *bf)
|
||||
|
@ -298,11 +298,11 @@ static char *dktypenames[] = {
|
||||
#define FS_SYSV 4 /* System V */
|
||||
#define FS_V71K 5 /* V7 with 1K blocks (4.1, 2.9) */
|
||||
#define FS_V8 6 /* Eighth Edition, 4K blocks */
|
||||
#define FS_BSDFFS 7 /* 4.2BSD fast file system */
|
||||
#define FS_MSDOS 8 /* MSDOS file system */
|
||||
#define FS_BSDLFS 9 /* 4.4BSD log-structured file system */
|
||||
#define FS_BSDFFS 7 /* 4.2BSD fast filesystem */
|
||||
#define FS_MSDOS 8 /* MSDOS filesystem */
|
||||
#define FS_BSDLFS 9 /* 4.4BSD log-structured filesystem */
|
||||
#define FS_OTHER 10 /* in use, but unknown/unsupported */
|
||||
#define FS_HPFS 11 /* OS/2 high-performance file system */
|
||||
#define FS_HPFS 11 /* OS/2 high-performance filesystem */
|
||||
#define FS_ISO9660 12 /* ISO 9660, normally CD-ROM */
|
||||
#define FS_BOOT 13 /* partition contains bootstrap */
|
||||
#define FS_VINUM 14 /* Vinum drive */
|
||||
|
@ -628,7 +628,7 @@ will be interpreted as an offset of 0.
|
||||
.It fstype
|
||||
describes the purpose of the partition. The example shows all currently used
|
||||
partition types.
|
||||
For UFS file systems and ccd partitions, use type
|
||||
For UFS filesystems and ccd partitions, use type
|
||||
.Cm 4.2BSD .
|
||||
For Vinum drives, use type
|
||||
.Cm vinum .
|
||||
@ -654,17 +654,17 @@ for more details.
|
||||
.It fsize
|
||||
For
|
||||
.Cm 4.2BSD
|
||||
and LFS file systems only, the fragment size. Defaults to 1024 for
|
||||
and LFS filesystems only, the fragment size. Defaults to 1024 for
|
||||
partitions smaller than 1 GB, 4096 for partitions 1GB or larger.
|
||||
.It bsize
|
||||
For
|
||||
.Cm 4.2BSD
|
||||
and LFS file systems only, the block size. Defaults to 8192 for
|
||||
and LFS filesystems only, the block size. Defaults to 8192 for
|
||||
partitions smaller than 1 GB, 16384 for partitions 1GB or larger.
|
||||
.It bps/cpg
|
||||
For
|
||||
.Cm 4.2BSD
|
||||
file systems, the number of cylinders in a cylinder group. For LFS file
|
||||
filesystems, the number of cylinders in a cylinder group. For LFS file
|
||||
systems, the segment shift value. Defaults to 16 for
|
||||
partitions smaller than 1 GB, 64 for partitions 1GB or larger.
|
||||
.El
|
||||
@ -727,7 +727,7 @@ NOT install the new label either in-core or on-disk.
|
||||
Try to auto-detect the required information from
|
||||
.Pa da0s1 ,
|
||||
and write a new label to the disk. Use another disklabel -e command to edit the
|
||||
partitioning and file system information.
|
||||
partitioning and filesystem information.
|
||||
.Pp
|
||||
.Dl disklabel -R da0s1 savedlabel
|
||||
.Pp
|
||||
|
@ -44,7 +44,7 @@
|
||||
.Sh DESCRIPTION
|
||||
.Bf -symbolic
|
||||
.Nm Clri
|
||||
is obsoleted for normal file system repair work by
|
||||
is obsoleted for normal filesystem repair work by
|
||||
.Xr fsck 8 .
|
||||
.Ef
|
||||
.Pp
|
||||
|
@ -298,11 +298,11 @@ static char *dktypenames[] = {
|
||||
#define FS_SYSV 4 /* System V */
|
||||
#define FS_V71K 5 /* V7 with 1K blocks (4.1, 2.9) */
|
||||
#define FS_V8 6 /* Eighth Edition, 4K blocks */
|
||||
#define FS_BSDFFS 7 /* 4.2BSD fast file system */
|
||||
#define FS_MSDOS 8 /* MSDOS file system */
|
||||
#define FS_BSDLFS 9 /* 4.4BSD log-structured file system */
|
||||
#define FS_BSDFFS 7 /* 4.2BSD fast filesystem */
|
||||
#define FS_MSDOS 8 /* MSDOS filesystem */
|
||||
#define FS_BSDLFS 9 /* 4.4BSD log-structured filesystem */
|
||||
#define FS_OTHER 10 /* in use, but unknown/unsupported */
|
||||
#define FS_HPFS 11 /* OS/2 high-performance file system */
|
||||
#define FS_HPFS 11 /* OS/2 high-performance filesystem */
|
||||
#define FS_ISO9660 12 /* ISO 9660, normally CD-ROM */
|
||||
#define FS_BOOT 13 /* partition contains bootstrap */
|
||||
#define FS_VINUM 14 /* Vinum drive */
|
||||
|
@ -628,7 +628,7 @@ will be interpreted as an offset of 0.
|
||||
.It fstype
|
||||
describes the purpose of the partition. The example shows all currently used
|
||||
partition types.
|
||||
For UFS file systems and ccd partitions, use type
|
||||
For UFS filesystems and ccd partitions, use type
|
||||
.Cm 4.2BSD .
|
||||
For Vinum drives, use type
|
||||
.Cm vinum .
|
||||
@ -654,17 +654,17 @@ for more details.
|
||||
.It fsize
|
||||
For
|
||||
.Cm 4.2BSD
|
||||
and LFS file systems only, the fragment size. Defaults to 1024 for
|
||||
and LFS filesystems only, the fragment size. Defaults to 1024 for
|
||||
partitions smaller than 1 GB, 4096 for partitions 1GB or larger.
|
||||
.It bsize
|
||||
For
|
||||
.Cm 4.2BSD
|
||||
and LFS file systems only, the block size. Defaults to 8192 for
|
||||
and LFS filesystems only, the block size. Defaults to 8192 for
|
||||
partitions smaller than 1 GB, 16384 for partitions 1GB or larger.
|
||||
.It bps/cpg
|
||||
For
|
||||
.Cm 4.2BSD
|
||||
file systems, the number of cylinders in a cylinder group. For LFS file
|
||||
filesystems, the number of cylinders in a cylinder group. For LFS file
|
||||
systems, the segment shift value. Defaults to 16 for
|
||||
partitions smaller than 1 GB, 64 for partitions 1GB or larger.
|
||||
.El
|
||||
@ -727,7 +727,7 @@ NOT install the new label either in-core or on-disk.
|
||||
Try to auto-detect the required information from
|
||||
.Pa da0s1 ,
|
||||
and write a new label to the disk. Use another disklabel -e command to edit the
|
||||
partitioning and file system information.
|
||||
partitioning and filesystem information.
|
||||
.Pp
|
||||
.Dl disklabel -R da0s1 savedlabel
|
||||
.Pp
|
||||
|
@ -7,7 +7,7 @@
|
||||
# optr.c operator interface
|
||||
# dumprmt.c handles remote tape via rmt(8)
|
||||
# tape.c handles the mag tape and opening/closing
|
||||
# traverse.c traverses the file system
|
||||
# traverse.c traverses the filesystem
|
||||
# unctime.c undo ctime
|
||||
#
|
||||
# DEBUG use local directory to find ddate and dumpdates
|
||||
|
@ -84,7 +84,7 @@ int tapeno; /* current tape number */
|
||||
time_t tstart_writing; /* when started writing the first tape block */
|
||||
time_t tend_writing; /* after writing the last tape block */
|
||||
int passno; /* current dump pass number */
|
||||
struct fs *sblock; /* the file system super block */
|
||||
struct fs *sblock; /* the filesystem super block */
|
||||
char sblock_buf[MAXBSIZE];
|
||||
long dev_bsize; /* block size of underlying disk device */
|
||||
int dev_bshift; /* log2(dev_bsize) */
|
||||
|
@ -292,7 +292,7 @@ main(int argc, char *argv[])
|
||||
* disk can be either the full special file name,
|
||||
* the suffix of the special file name,
|
||||
* the special name missing the leading '/',
|
||||
* the file system name with or without the leading '/'.
|
||||
* the filesystem name with or without the leading '/'.
|
||||
*/
|
||||
dt = fstabsearch(disk);
|
||||
if (dt != NULL) {
|
||||
@ -301,7 +301,7 @@ main(int argc, char *argv[])
|
||||
(void)strncpy(spcl.c_filesys, dt->fs_file, NAMELEN);
|
||||
} else {
|
||||
(void)strncpy(spcl.c_dev, disk, NAMELEN);
|
||||
(void)strncpy(spcl.c_filesys, "an unlisted file system",
|
||||
(void)strncpy(spcl.c_filesys, "an unlisted filesystem",
|
||||
NAMELEN);
|
||||
}
|
||||
spcl.c_dev[NAMELEN-1]='\0';
|
||||
@ -340,7 +340,7 @@ main(int argc, char *argv[])
|
||||
if (fstat(diskfd, &sb) != 0)
|
||||
err(X_STARTUP, "%s: stat", disk);
|
||||
if (S_ISDIR(sb.st_mode))
|
||||
errx(X_STARTUP, "%s: unknown file system", disk);
|
||||
errx(X_STARTUP, "%s: unknown filesystem", disk);
|
||||
sync();
|
||||
sblock = (struct fs *)sblock_buf;
|
||||
bread(SBOFF, (char *) sblock, SBSIZE);
|
||||
|
@ -370,9 +370,9 @@ lastdump(int arg) /* w ==> just what to do; W ==> most recent dumps */
|
||||
qsort((char *) ddatev, nddates, sizeof(struct dumpdates *), datesort);
|
||||
|
||||
if (arg == 'w')
|
||||
(void) printf("Dump these file systems:\n");
|
||||
(void) printf("Dump these filesystems:\n");
|
||||
else
|
||||
(void) printf("Last dump(s) done (Dump '>' file systems):\n");
|
||||
(void) printf("Last dump(s) done (Dump '>' filesystems):\n");
|
||||
lastname = "??";
|
||||
ITITERATE(i, dtwalk) {
|
||||
if (strncmp(lastname, dtwalk->dd_name,
|
||||
|
@ -37,17 +37,17 @@
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm dumpfs
|
||||
.Nd dump file system information
|
||||
.Nd dump filesystem information
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Ar filesys No \&| Ar device
|
||||
.Sh DESCRIPTION
|
||||
.Nm Dumpfs
|
||||
prints out the super block and cylinder group information
|
||||
for the file system or special device specified.
|
||||
for the filesystem or special device specified.
|
||||
The listing is very long and detailed. This
|
||||
command is useful mostly for finding out certain file system
|
||||
information such as the file system block size and minimum
|
||||
command is useful mostly for finding out certain filesystem
|
||||
information such as the filesystem block size and minimum
|
||||
free space percentage.
|
||||
.Sh SEE ALSO
|
||||
.Xr disktab 5 ,
|
||||
|
@ -42,7 +42,7 @@
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm ffsinfo
|
||||
.Nd "dump all meta information of an existing ufs file system
|
||||
.Nd "dump all meta information of an existing ufs filesystem
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl L
|
||||
@ -126,9 +126,9 @@ with all available information.
|
||||
.Sh BUGS
|
||||
Currently
|
||||
.Nm
|
||||
can only dump unmounted file systems.
|
||||
Do not try dumping a mounted file system, your system may panic and you will
|
||||
not be able to use the file system any longer.
|
||||
can only dump unmounted filesystems.
|
||||
Do not try dumping a mounted filesystem, your system may panic and you will
|
||||
not be able to use the filesystem any longer.
|
||||
.Pp
|
||||
Also snapshots are handled like plain files.
|
||||
They should get their own level to provide for independent control of the
|
||||
|
@ -33,7 +33,7 @@
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm fsck
|
||||
.Nd file system consistency check and interactive repair
|
||||
.Nd filesystem consistency check and interactive repair
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl dvplfyn
|
||||
@ -179,14 +179,14 @@ Causes
|
||||
to assume yes
|
||||
as the answer to all operator questions.
|
||||
.It Fl T Ar fstype : Ns Ar fsoptions
|
||||
List of comma separated file system specific options for the specified
|
||||
file system type, in the same format as
|
||||
List of comma separated filesystem specific options for the specified
|
||||
filesystem type, in the same format as
|
||||
.Xr mount 8 .
|
||||
.El
|
||||
.Sh FILES
|
||||
.Bl -tag -width /etc/fstab -compact
|
||||
.It Pa /etc/fstab
|
||||
file system table
|
||||
filesystem table
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr fstab 5 ,
|
||||
|
@ -204,7 +204,7 @@ main(int argc, char *argv[])
|
||||
type = fs->fs_vfstype;
|
||||
mntpt = fs->fs_file;
|
||||
if (BADTYPE(fs->fs_type))
|
||||
errx(1, "%s has unknown file system type.",
|
||||
errx(1, "%s has unknown filesystem type.",
|
||||
spec);
|
||||
}
|
||||
if ((flags & CHECK_BACKGRD) &&
|
||||
|
@ -63,31 +63,31 @@ Contract No. N00039-82-C-0235.
|
||||
.FE
|
||||
This document reflects the use of
|
||||
.I fsck_ffs
|
||||
with the 4.2BSD and 4.3BSD file system organization. This
|
||||
with the 4.2BSD and 4.3BSD filesystem organization. This
|
||||
is a revision of the
|
||||
original paper written by
|
||||
T. J. Kowalski.
|
||||
.PP
|
||||
File System Check Program (\fIfsck_ffs\fR)
|
||||
is an interactive file system check and repair program.
|
||||
is an interactive filesystem check and repair program.
|
||||
.I Fsck_ffs
|
||||
uses the redundant structural information in the
|
||||
UNIX file system to perform several consistency checks.
|
||||
UNIX filesystem to perform several consistency checks.
|
||||
If an inconsistency is detected, it is reported
|
||||
to the operator, who may elect to fix or ignore
|
||||
each inconsistency.
|
||||
These inconsistencies result from the permanent interruption
|
||||
of the file system updates, which are performed every
|
||||
of the filesystem updates, which are performed every
|
||||
time a file is modified.
|
||||
Unless there has been a hardware failure,
|
||||
.I fsck_ffs
|
||||
is able to repair corrupted file systems
|
||||
is able to repair corrupted filesystems
|
||||
using procedures based upon the order in which UNIX honors
|
||||
these file system update requests.
|
||||
these filesystem update requests.
|
||||
.PP
|
||||
The purpose of this document is to describe the normal updating
|
||||
of the file system,
|
||||
to discuss the possible causes of file system corruption,
|
||||
of the filesystem,
|
||||
to discuss the possible causes of filesystem corruption,
|
||||
and to present the corrective actions implemented
|
||||
by
|
||||
.I fsck_ffs.
|
||||
@ -108,16 +108,16 @@ Revised October 7, 1996
|
||||
.LP
|
||||
.sp .5v
|
||||
.nf
|
||||
.B "2. Overview of the file system
|
||||
.B "2. Overview of the filesystem
|
||||
2.1. Superblock
|
||||
2.2. Summary Information
|
||||
2.3. Cylinder groups
|
||||
2.4. Fragments
|
||||
2.5. Updates to the file system
|
||||
2.5. Updates to the filesystem
|
||||
.LP
|
||||
.sp .5v
|
||||
.nf
|
||||
.B "3. Fixing corrupted file systems
|
||||
.B "3. Fixing corrupted filesystems
|
||||
3.1. Detecting and correcting corruption
|
||||
3.2. Super block checking
|
||||
3.3. Free block checking
|
||||
|
@ -38,14 +38,14 @@ Introduction
|
||||
.PP
|
||||
This document reflects the use of
|
||||
.I fsck_ffs
|
||||
with the 4.2BSD and 4.3BSD file system organization. This
|
||||
with the 4.2BSD and 4.3BSD filesystem organization. This
|
||||
is a revision of the
|
||||
original paper written by
|
||||
T. J. Kowalski.
|
||||
.PP
|
||||
When a UNIX
|
||||
operating system is brought up, a consistency
|
||||
check of the file systems should always be performed.
|
||||
check of the filesystems should always be performed.
|
||||
This precautionary measure helps to insure
|
||||
a reliable environment for file storage on disk.
|
||||
If an inconsistency is discovered,
|
||||
@ -55,7 +55,7 @@ runs in two modes.
|
||||
Normally it is run non-interactively by the system after
|
||||
a normal boot.
|
||||
When running in this mode,
|
||||
it will only make changes to the file system that are known
|
||||
it will only make changes to the filesystem that are known
|
||||
to always be correct.
|
||||
If an unexpected inconsistency is found
|
||||
.I fsck_ffs
|
||||
@ -71,10 +71,10 @@ should be made.
|
||||
.PP
|
||||
The purpose of this memo is to dispel the
|
||||
mystique surrounding
|
||||
file system inconsistencies.
|
||||
It first describes the updating of the file system
|
||||
filesystem inconsistencies.
|
||||
It first describes the updating of the filesystem
|
||||
(the calm before the storm) and
|
||||
then describes file system corruption (the storm).
|
||||
then describes filesystem corruption (the storm).
|
||||
Finally,
|
||||
the set of deterministic corrective actions
|
||||
used by
|
||||
|
@ -32,22 +32,22 @@
|
||||
.\" $FreeBSD$
|
||||
.\" @(#)2.t 8.1 (Berkeley) 6/5/93
|
||||
.\"
|
||||
.ds RH Overview of the file system
|
||||
.ds RH Overview of the filesystem
|
||||
.NH
|
||||
Overview of the file system
|
||||
Overview of the filesystem
|
||||
.PP
|
||||
The file system is discussed in detail in [Mckusick84];
|
||||
The filesystem is discussed in detail in [Mckusick84];
|
||||
this section gives a brief overview.
|
||||
.NH 2
|
||||
Superblock
|
||||
.PP
|
||||
A file system is described by its
|
||||
A filesystem is described by its
|
||||
.I "super-block" .
|
||||
The super-block is built when the file system is created (\c
|
||||
The super-block is built when the filesystem is created (\c
|
||||
.I newfs (8))
|
||||
and never changes.
|
||||
The super-block
|
||||
contains the basic parameters of the file system,
|
||||
contains the basic parameters of the filesystem,
|
||||
such as the number of data blocks it contains
|
||||
and a count of the maximum number of files.
|
||||
Because the super-block contains critical data,
|
||||
@ -56,7 +56,7 @@ replicates it to protect against catastrophic loss.
|
||||
The
|
||||
.I "default super block"
|
||||
always resides at a fixed offset from the beginning
|
||||
of the file system's disk partition.
|
||||
of the filesystem's disk partition.
|
||||
The
|
||||
.I "redundant super blocks"
|
||||
are not referenced unless a head crash
|
||||
@ -64,7 +64,7 @@ or other hard disk error causes the default super-block
|
||||
to be unusable.
|
||||
The redundant blocks are sprinkled throughout the disk partition.
|
||||
.PP
|
||||
Within the file system are files.
|
||||
Within the filesystem are files.
|
||||
Certain files are distinguished as directories and contain collections
|
||||
of pointers to files that may themselves be directories.
|
||||
Every file has a descriptor associated with it called an
|
||||
@ -82,7 +82,7 @@ the range 5-13.
|
||||
.FE
|
||||
The inode structure may also contain references to indirect blocks
|
||||
containing further data block indices.
|
||||
In a file system with a 4096 byte block size, a singly indirect
|
||||
In a filesystem with a 4096 byte block size, a singly indirect
|
||||
block contains 1024 further block addresses,
|
||||
a doubly indirect block contains 1024 addresses of further single indirect
|
||||
blocks,
|
||||
@ -92,30 +92,30 @@ blocks (the triple indirect block is never needed in practice).
|
||||
In order to create files with up to
|
||||
2\(ua32 bytes,
|
||||
using only two levels of indirection,
|
||||
the minimum size of a file system block is 4096 bytes.
|
||||
The size of file system blocks can be any power of two
|
||||
the minimum size of a filesystem block is 4096 bytes.
|
||||
The size of filesystem blocks can be any power of two
|
||||
greater than or equal to 4096.
|
||||
The block size of the file system is maintained in the super-block,
|
||||
so it is possible for file systems of different block sizes
|
||||
The block size of the filesystem is maintained in the super-block,
|
||||
so it is possible for filesystems of different block sizes
|
||||
to be accessible simultaneously on the same system.
|
||||
The block size must be decided when
|
||||
.I newfs
|
||||
creates the file system;
|
||||
creates the filesystem;
|
||||
the block size cannot be subsequently
|
||||
changed without rebuilding the file system.
|
||||
changed without rebuilding the filesystem.
|
||||
.NH 2
|
||||
Summary information
|
||||
.PP
|
||||
Associated with the super block is non replicated
|
||||
.I "summary information" .
|
||||
The summary information changes
|
||||
as the file system is modified.
|
||||
as the filesystem is modified.
|
||||
The summary information contains
|
||||
the number of blocks, fragments, inodes and directories in the file system.
|
||||
the number of blocks, fragments, inodes and directories in the filesystem.
|
||||
.NH 2
|
||||
Cylinder groups
|
||||
.PP
|
||||
The file system partitions the disk into one or more areas called
|
||||
The filesystem partitions the disk into one or more areas called
|
||||
.I "cylinder groups".
|
||||
A cylinder group is comprised of one or more consecutive
|
||||
cylinders on a disk.
|
||||
@ -125,7 +125,7 @@ describing available blocks in the cylinder group,
|
||||
and summary information describing the usage of data blocks
|
||||
within the cylinder group.
|
||||
A fixed number of inodes is allocated for each cylinder group
|
||||
when the file system is created.
|
||||
when the filesystem is created.
|
||||
The current policy is to allocate one inode for each 2048
|
||||
bytes of disk space;
|
||||
this is expected to be far more inodes than will ever be needed.
|
||||
@ -158,12 +158,12 @@ and the beginning of the cylinder group information stores data.
|
||||
Fragments
|
||||
.PP
|
||||
To avoid waste in storing small files,
|
||||
the file system space allocator divides a single
|
||||
file system block into one or more
|
||||
the filesystem space allocator divides a single
|
||||
filesystem block into one or more
|
||||
.I "fragments".
|
||||
The fragmentation of the file system is specified
|
||||
when the file system is created;
|
||||
each file system block can be optionally broken into
|
||||
The fragmentation of the filesystem is specified
|
||||
when the filesystem is created;
|
||||
each filesystem block can be optionally broken into
|
||||
2, 4, or 8 addressable fragments.
|
||||
The lower bound on the size of these fragments is constrained
|
||||
by the disk sector size;
|
||||
@ -173,17 +173,17 @@ records the space availability at the fragment level.
|
||||
Aligned fragments are examined
|
||||
to determine block availability.
|
||||
.PP
|
||||
On a file system with a block size of 4096 bytes
|
||||
On a filesystem with a block size of 4096 bytes
|
||||
and a fragment size of 1024 bytes,
|
||||
a file is represented by zero or more 4096 byte blocks of data,
|
||||
and possibly a single fragmented block.
|
||||
If a file system block must be fragmented to obtain
|
||||
If a filesystem block must be fragmented to obtain
|
||||
space for a small amount of data,
|
||||
the remainder of the block is made available for allocation
|
||||
to other files.
|
||||
For example,
|
||||
consider an 11000 byte file stored on
|
||||
a 4096/1024 byte file system.
|
||||
a 4096/1024 byte filesystem.
|
||||
This file uses two full size blocks and a 3072 byte fragment.
|
||||
If no fragments with at least 3072 bytes
|
||||
are available when the file is created,
|
||||
@ -191,26 +191,26 @@ a full size block is split yielding the necessary 3072 byte
|
||||
fragment and an unused 1024 byte fragment.
|
||||
This remaining fragment can be allocated to another file, as needed.
|
||||
.NH 2
|
||||
Updates to the file system
|
||||
Updates to the filesystem
|
||||
.PP
|
||||
Every working day hundreds of files
|
||||
are created, modified, and removed.
|
||||
Every time a file is modified,
|
||||
the operating system performs a
|
||||
series of file system updates.
|
||||
These updates, when written on disk, yield a consistent file system.
|
||||
The file system stages
|
||||
series of filesystem updates.
|
||||
These updates, when written on disk, yield a consistent filesystem.
|
||||
The filesystem stages
|
||||
all modifications of critical information;
|
||||
modification can
|
||||
either be completed or cleanly backed out after a crash.
|
||||
Knowing the information that is first written to the file system,
|
||||
Knowing the information that is first written to the filesystem,
|
||||
deterministic procedures can be developed to
|
||||
repair a corrupted file system.
|
||||
repair a corrupted filesystem.
|
||||
To understand this process,
|
||||
the order that the update
|
||||
requests were being honored must first be understood.
|
||||
.PP
|
||||
When a user program does an operation to change the file system,
|
||||
When a user program does an operation to change the filesystem,
|
||||
such as a
|
||||
.I write ,
|
||||
the data to be written is copied into an internal
|
||||
@ -225,9 +225,9 @@ is eventually written out to disk.
|
||||
The real disk write may not happen until long after the
|
||||
.I write
|
||||
system call has returned.
|
||||
Thus at any given time, the file system,
|
||||
Thus at any given time, the filesystem,
|
||||
as it resides on the disk,
|
||||
lags the state of the file system represented by the in-core information.
|
||||
lags the state of the filesystem represented by the in-core information.
|
||||
.PP
|
||||
The disk information is updated to reflect the in-core information
|
||||
when the buffer is required for another use,
|
||||
@ -239,7 +239,7 @@ or by manual operator intervention with the
|
||||
.I sync (8)
|
||||
command.
|
||||
If the system is halted without writing out the in-core information,
|
||||
the file system on the disk will be in an inconsistent state.
|
||||
the filesystem on the disk will be in an inconsistent state.
|
||||
.PP
|
||||
If all updates are done asynchronously, several serious
|
||||
inconsistencies can arise.
|
||||
@ -263,4 +263,4 @@ really written to disk)
|
||||
when they are being deallocated.
|
||||
Similarly inodes are kept consistent by synchronously
|
||||
deleting, adding, or changing directory entries.
|
||||
.ds RH Fixing corrupted file systems
|
||||
.ds RH Fixing corrupted filesystems
|
||||
|
@ -32,11 +32,11 @@
|
||||
.\" $FreeBSD$
|
||||
.\" @(#)3.t 8.1 (Berkeley) 6/5/93
|
||||
.\"
|
||||
.ds RH Fixing corrupted file systems
|
||||
.ds RH Fixing corrupted filesystems
|
||||
.NH
|
||||
Fixing corrupted file systems
|
||||
Fixing corrupted filesystems
|
||||
.PP
|
||||
A file system
|
||||
A filesystem
|
||||
can become corrupted in several ways.
|
||||
The most common of these ways are
|
||||
improper shutdown procedures
|
||||
@ -46,17 +46,17 @@ File systems may become corrupted during an
|
||||
.I "unclean halt" .
|
||||
This happens when proper shutdown
|
||||
procedures are not observed,
|
||||
physically write-protecting a mounted file system,
|
||||
or a mounted file system is taken off-line.
|
||||
physically write-protecting a mounted filesystem,
|
||||
or a mounted filesystem is taken off-line.
|
||||
The most common operator procedural failure is forgetting to
|
||||
.I sync
|
||||
the system before halting the CPU.
|
||||
.PP
|
||||
File systems may become further corrupted if proper startup
|
||||
procedures are not observed, e.g.,
|
||||
not checking a file system for inconsistencies,
|
||||
not checking a filesystem for inconsistencies,
|
||||
and not repairing inconsistencies.
|
||||
Allowing a corrupted file system to be used (and, thus, to be modified
|
||||
Allowing a corrupted filesystem to be used (and, thus, to be modified
|
||||
further) can be disastrous.
|
||||
.PP
|
||||
Any piece of hardware can fail at any time.
|
||||
@ -87,13 +87,13 @@ A quiescent\(dd
|
||||
.FS
|
||||
\(dd I.e., unmounted and not being written on.
|
||||
.FE
|
||||
file system may be checked for structural integrity
|
||||
filesystem may be checked for structural integrity
|
||||
by performing consistency checks on the
|
||||
redundant data intrinsic to a file system.
|
||||
redundant data intrinsic to a filesystem.
|
||||
The redundant data is either read from
|
||||
the file system,
|
||||
the filesystem,
|
||||
or computed from other known values.
|
||||
The file system
|
||||
The filesystem
|
||||
.B must
|
||||
be in a quiescent state when
|
||||
.I fsck_ffs
|
||||
@ -110,7 +110,7 @@ the data blocks containing directory entries.
|
||||
.NH 2
|
||||
Super-block checking
|
||||
.PP
|
||||
The most commonly corrupted item in a file system
|
||||
The most commonly corrupted item in a filesystem
|
||||
is the summary information
|
||||
associated with the super-block.
|
||||
The summary information is prone to corruption
|
||||
@ -133,7 +133,7 @@ since they are statically determined by
|
||||
.I newfs ,
|
||||
.I fsck_ffs
|
||||
can check that these sizes are within reasonable bounds.
|
||||
All other file system checks require that these sizes be correct.
|
||||
All other filesystem checks require that these sizes be correct.
|
||||
If
|
||||
.I fsck_ffs
|
||||
detects corruption in the static parameters of the default super-block,
|
||||
@ -151,7 +151,7 @@ When all the blocks have been initially accounted for,
|
||||
checks that
|
||||
the number of free blocks
|
||||
plus the number of blocks claimed by the inodes
|
||||
equals the total number of blocks in the file system.
|
||||
equals the total number of blocks in the filesystem.
|
||||
.PP
|
||||
If anything is wrong with the block allocation maps,
|
||||
.I fsck_ffs
|
||||
@ -159,20 +159,20 @@ will rebuild them,
|
||||
based on the list it has computed of allocated blocks.
|
||||
.PP
|
||||
The summary information associated with the super-block
|
||||
counts the total number of free blocks within the file system.
|
||||
counts the total number of free blocks within the filesystem.
|
||||
.I Fsck_ffs
|
||||
compares this count to the
|
||||
number of free blocks it found within the file system.
|
||||
number of free blocks it found within the filesystem.
|
||||
If the two counts do not agree, then
|
||||
.I fsck_ffs
|
||||
replaces the incorrect count in the summary information
|
||||
by the actual free-block count.
|
||||
.PP
|
||||
The summary information
|
||||
counts the total number of free inodes within the file system.
|
||||
counts the total number of free inodes within the filesystem.
|
||||
.I Fsck_ffs
|
||||
compares this count to the number
|
||||
of free inodes it found within the file system.
|
||||
of free inodes it found within the filesystem.
|
||||
If the two counts do not agree, then
|
||||
.I fsck_ffs
|
||||
replaces the incorrect count in the
|
||||
@ -185,11 +185,11 @@ the allocation information.
|
||||
However, because of the great number of active inodes,
|
||||
a few of the inodes are usually corrupted.
|
||||
.PP
|
||||
The list of inodes in the file system
|
||||
The list of inodes in the filesystem
|
||||
is checked sequentially starting with inode 2
|
||||
(inode 0 marks unused inodes;
|
||||
inode 1 is saved for future generations)
|
||||
and progressing through the last inode in the file system.
|
||||
and progressing through the last inode in the filesystem.
|
||||
The state of each inode is checked for
|
||||
inconsistencies involving format and type,
|
||||
link count,
|
||||
@ -218,7 +218,7 @@ total number of directory entries
|
||||
linked to the inode.
|
||||
.I Fsck_ffs
|
||||
verifies the link count of each inode
|
||||
by starting at the root of the file system,
|
||||
by starting at the root of the filesystem,
|
||||
and descending through the directory structure.
|
||||
The actual link count for each inode
|
||||
is calculated during the descent.
|
||||
@ -279,12 +279,12 @@ and which one should be cleared.
|
||||
.I Fsck_ffs
|
||||
checks the range of each block number claimed by an inode.
|
||||
If the block number is
|
||||
lower than the first data block in the file system,
|
||||
lower than the first data block in the filesystem,
|
||||
or greater than the last data block,
|
||||
then the block number is a
|
||||
.I "bad block number" .
|
||||
Many bad blocks in an inode are usually caused by
|
||||
an indirect block that was not written to the file system,
|
||||
an indirect block that was not written to the filesystem,
|
||||
a condition which can only occur if there has been a hardware failure.
|
||||
If an inode contains bad block numbers,
|
||||
.I fsck_ffs
|
||||
@ -334,9 +334,9 @@ several types of inconsistencies.
|
||||
These inconsistencies include
|
||||
directory inode numbers pointing to unallocated inodes,
|
||||
directory inode numbers that are greater than
|
||||
the number of inodes in the file system,
|
||||
the number of inodes in the filesystem,
|
||||
incorrect directory inode numbers for ``\fB.\fP'' and ``\fB..\fP'',
|
||||
and directories that are not attached to the file system.
|
||||
and directories that are not attached to the filesystem.
|
||||
If the inode number in a directory data block
|
||||
references an unallocated inode,
|
||||
then
|
||||
@ -390,10 +390,10 @@ to which ``\fB..\fP'' should point;
|
||||
File system connectivity
|
||||
.PP
|
||||
.I Fsck_ffs
|
||||
checks the general connectivity of the file system.
|
||||
If directories are not linked into the file system, then
|
||||
checks the general connectivity of the filesystem.
|
||||
If directories are not linked into the filesystem, then
|
||||
.I fsck_ffs
|
||||
links the directory back into the file system in the
|
||||
links the directory back into the filesystem in the
|
||||
.I lost+found
|
||||
directory.
|
||||
This condition only occurs when there has been a hardware failure.
|
||||
@ -402,7 +402,7 @@ This condition only occurs when there has been a hardware failure.
|
||||
\s+2Acknowledgements\s0
|
||||
.PP
|
||||
I thank Bill Joy, Sam Leffler, Robert Elz and Dennis Ritchie
|
||||
for their suggestions and help in implementing the new file system.
|
||||
for their suggestions and help in implementing the new filesystem.
|
||||
Thanks also to Robert Henry for his editorial input to
|
||||
get this document together.
|
||||
Finally we thank our sponsors,
|
||||
|
@ -40,13 +40,13 @@ Conventions
|
||||
.PP
|
||||
.I Fsck_ffs
|
||||
is
|
||||
a multi-pass file system check program.
|
||||
Each file system pass invokes a different Phase of the
|
||||
a multi-pass filesystem check program.
|
||||
Each filesystem pass invokes a different Phase of the
|
||||
.I fsck_ffs
|
||||
program.
|
||||
After the initial setup,
|
||||
.I fsck_ffs
|
||||
performs successive Phases over each file system,
|
||||
performs successive Phases over each filesystem,
|
||||
checking blocks and sizes,
|
||||
path-names,
|
||||
connectivity,
|
||||
@ -59,8 +59,8 @@ Normally
|
||||
.I fsck_ffs
|
||||
is run non-interactively to
|
||||
.I preen
|
||||
the file systems after an unclean halt.
|
||||
While preen'ing a file system,
|
||||
the filesystems after an unclean halt.
|
||||
While preen'ing a filesystem,
|
||||
it will only fix corruptions that are expected
|
||||
to occur from an unclean halt.
|
||||
These actions are a proper subset of the actions that
|
||||
@ -92,7 +92,7 @@ will be discussed in initialization.
|
||||
.NH 2
|
||||
Initialization
|
||||
.PP
|
||||
Before a file system check can be performed, certain
|
||||
Before a filesystem check can be performed, certain
|
||||
tables have to be set up and certain files opened.
|
||||
This section concerns itself with the opening of files and
|
||||
the initialization of tables.
|
||||
@ -101,10 +101,10 @@ command line options,
|
||||
memory requests,
|
||||
opening of files,
|
||||
status of files,
|
||||
file system size checks,
|
||||
filesystem size checks,
|
||||
and creation of the scratch file.
|
||||
All the initialization errors are fatal
|
||||
when the file system is being preen'ed.
|
||||
when the filesystem is being preen'ed.
|
||||
.sp
|
||||
.LP
|
||||
.B "\fIC\fP option?"
|
||||
@ -138,7 +138,7 @@ See a guru.
|
||||
.LP
|
||||
.B "Can't open checklist file: \fIF\fP"
|
||||
.br
|
||||
The file system checklist file
|
||||
The filesystem checklist file
|
||||
\fIF\fP (usually
|
||||
.I /etc/fstab )
|
||||
can not be opened for reading.
|
||||
@ -162,19 +162,19 @@ See a guru.
|
||||
.B "Can't make sense out of name \fIF\fP"
|
||||
.br
|
||||
.I Fsck_ffs 's
|
||||
request for statistics about the file system \fIF\fP failed.
|
||||
request for statistics about the filesystem \fIF\fP failed.
|
||||
When running manually,
|
||||
it ignores this file system
|
||||
and continues checking the next file system given.
|
||||
it ignores this filesystem
|
||||
and continues checking the next filesystem given.
|
||||
Check access modes of \fIF\fP.
|
||||
.sp
|
||||
.LP
|
||||
.B "Can't open \fIF\fP"
|
||||
.br
|
||||
.I Fsck_ffs 's
|
||||
request attempt to open the file system \fIF\fP failed.
|
||||
When running manually, it ignores this file system
|
||||
and continues checking the next file system given.
|
||||
request attempt to open the filesystem \fIF\fP failed.
|
||||
When running manually, it ignores this filesystem
|
||||
and continues checking the next filesystem given.
|
||||
Check access modes of \fIF\fP.
|
||||
.sp
|
||||
.LP
|
||||
@ -182,7 +182,7 @@ Check access modes of \fIF\fP.
|
||||
.br
|
||||
Either the \-n flag was specified or
|
||||
.I fsck_ffs 's
|
||||
attempt to open the file system \fIF\fP for writing failed.
|
||||
attempt to open the filesystem \fIF\fP for writing failed.
|
||||
When running manually,
|
||||
all the diagnostics are printed out,
|
||||
but no modifications are attempted to fix them.
|
||||
@ -199,8 +199,8 @@ Possible responses to the OK prompt are:
|
||||
.IP YES
|
||||
ignore this error condition.
|
||||
.IP NO
|
||||
ignore this file system and continues checking
|
||||
the next file system given.
|
||||
ignore this filesystem and continues checking
|
||||
the next filesystem given.
|
||||
.sp
|
||||
.LP
|
||||
.B "UNDEFINED OPTIMIZATION IN SUPERBLOCK (SET TO DEFAULT)"
|
||||
@ -234,7 +234,7 @@ ignore this error condition.
|
||||
.LP
|
||||
.B "IMPOSSIBLE INTERLEAVE=\fID\fP IN SUPERBLOCK (SET TO DEFAULT)"
|
||||
.br
|
||||
The file system interleave is less than or equal to zero.
|
||||
The filesystem interleave is less than or equal to zero.
|
||||
.LP
|
||||
Possible responses to the SET TO DEFAULT prompt are:
|
||||
.IP YES
|
||||
@ -281,8 +281,8 @@ The super block has been corrupted.
|
||||
An alternative super block must be selected from among those
|
||||
listed by
|
||||
.I newfs
|
||||
(8) when the file system was created.
|
||||
For file systems with a blocksize less than 32K,
|
||||
(8) when the filesystem was created.
|
||||
For filesystems with a blocksize less than 32K,
|
||||
specifying \-b 32 is a good first choice.
|
||||
.sp
|
||||
.LP
|
||||
@ -298,19 +298,19 @@ See a guru.
|
||||
.br
|
||||
.I Fsck_ffs 's
|
||||
request for moving to a specified block number \fIB\fP in
|
||||
the file system failed.
|
||||
the filesystem failed.
|
||||
This should never happen.
|
||||
See a guru.
|
||||
.LP
|
||||
Possible responses to the CONTINUE prompt are:
|
||||
.IP YES
|
||||
attempt to continue to run the file system check.
|
||||
attempt to continue to run the filesystem check.
|
||||
Often,
|
||||
however the problem will persist.
|
||||
This error condition will not allow a complete check of the file system.
|
||||
This error condition will not allow a complete check of the filesystem.
|
||||
A second run of
|
||||
.I fsck_ffs
|
||||
should be made to re-check this file system.
|
||||
should be made to re-check this filesystem.
|
||||
If the block was part of the virtual memory buffer
|
||||
cache,
|
||||
.I fsck_ffs
|
||||
@ -323,13 +323,13 @@ terminate the program.
|
||||
.br
|
||||
.I Fsck_ffs 's
|
||||
request for reading a specified block number \fIB\fP in
|
||||
the file system failed.
|
||||
the filesystem failed.
|
||||
This should never happen.
|
||||
See a guru.
|
||||
.LP
|
||||
Possible responses to the CONTINUE prompt are:
|
||||
.IP YES
|
||||
attempt to continue to run the file system check.
|
||||
attempt to continue to run the filesystem check.
|
||||
It will retry the read and print out the message:
|
||||
.br
|
||||
.B "THE FOLLOWING SECTORS COULD NOT BE READ: \fIN\fP"
|
||||
@ -344,10 +344,10 @@ it will print the message:
|
||||
.br
|
||||
where \fIN\fP indicates the sector that was written with zero's.
|
||||
If the disk is experiencing hardware problems, the problem will persist.
|
||||
This error condition will not allow a complete check of the file system.
|
||||
This error condition will not allow a complete check of the filesystem.
|
||||
A second run of
|
||||
.I fsck_ffs
|
||||
should be made to re-check this file system.
|
||||
should be made to re-check this filesystem.
|
||||
If the block was part of the virtual memory buffer
|
||||
cache,
|
||||
.I fsck_ffs
|
||||
@ -360,14 +360,14 @@ terminate the program.
|
||||
.br
|
||||
.I Fsck_ffs 's
|
||||
request for writing a specified block number \fIB\fP
|
||||
in the file system failed.
|
||||
in the filesystem failed.
|
||||
The disk is write-protected;
|
||||
check the write protect lock on the drive.
|
||||
If that is not the problem, see a guru.
|
||||
.LP
|
||||
Possible responses to the CONTINUE prompt are:
|
||||
.IP YES
|
||||
attempt to continue to run the file system check.
|
||||
attempt to continue to run the filesystem check.
|
||||
The write operation will be retried with the failed blocks
|
||||
indicated by the message:
|
||||
.br
|
||||
@ -375,10 +375,10 @@ indicated by the message:
|
||||
.br
|
||||
where \fIN\fP indicates the sectors that could not be written.
|
||||
If the disk is experiencing hardware problems, the problem will persist.
|
||||
This error condition will not allow a complete check of the file system.
|
||||
This error condition will not allow a complete check of the filesystem.
|
||||
A second run of
|
||||
.I fsck_ffs
|
||||
should be made to re-check this file system.
|
||||
should be made to re-check this filesystem.
|
||||
If the block was part of the virtual memory buffer
|
||||
cache,
|
||||
.I fsck_ffs
|
||||
@ -409,7 +409,7 @@ All errors in this phase except
|
||||
.B "INCORRECT BLOCK COUNT"
|
||||
and
|
||||
.B "PARTIALLY TRUNCATED INODE"
|
||||
are fatal if the file system is being preen'ed.
|
||||
are fatal if the filesystem is being preen'ed.
|
||||
.sp
|
||||
.LP
|
||||
.B "UNKNOWN FILE TYPE I=\fII\fP (CLEAR)"
|
||||
@ -434,7 +434,7 @@ has found inode \fII\fP whose size is shorter than the number of
|
||||
blocks allocated to it.
|
||||
This condition should only occur if the system crashes while in the
|
||||
midst of truncating a file.
|
||||
When preen'ing the file system,
|
||||
When preen'ing the filesystem,
|
||||
.I fsck_ffs
|
||||
completes the truncation to the specified size.
|
||||
.LP
|
||||
@ -457,10 +457,10 @@ Increase the virtual memory for
|
||||
Possible responses to the CONTINUE prompt are:
|
||||
.IP YES
|
||||
continue with the program.
|
||||
This error condition will not allow a complete check of the file system.
|
||||
This error condition will not allow a complete check of the filesystem.
|
||||
A second run of
|
||||
.I fsck_ffs
|
||||
should be made to re-check this file system.
|
||||
should be made to re-check this filesystem.
|
||||
If another allocated inode with a zero link count is found,
|
||||
this error condition is repeated.
|
||||
.IP NO
|
||||
@ -470,13 +470,13 @@ terminate the program.
|
||||
.B "\fIB\fP BAD I=\fII\fP"
|
||||
.br
|
||||
Inode \fII\fP contains block number \fIB\fP with a number
|
||||
lower than the number of the first data block in the file system or
|
||||
lower than the number of the first data block in the filesystem or
|
||||
greater than the number of the last block
|
||||
in the file system.
|
||||
in the filesystem.
|
||||
This error condition may invoke the
|
||||
.B "EXCESSIVE BAD BLKS"
|
||||
error condition in Phase 1 (see next paragraph) if
|
||||
inode \fII\fP has too many block numbers outside the file system range.
|
||||
inode \fII\fP has too many block numbers outside the filesystem range.
|
||||
This error condition will always invoke the
|
||||
.B "BAD/DUP"
|
||||
error condition in Phase 2 and Phase 4.
|
||||
@ -485,17 +485,17 @@ error condition in Phase 2 and Phase 4.
|
||||
.B "EXCESSIVE BAD BLKS I=\fII\fP (CONTINUE)"
|
||||
.br
|
||||
There is more than a tolerable number (usually 10) of blocks with a number
|
||||
lower than the number of the first data block in the file system or greater than
|
||||
the number of last block in the file system associated with inode \fII\fP.
|
||||
lower than the number of the first data block in the filesystem or greater than
|
||||
the number of last block in the filesystem associated with inode \fII\fP.
|
||||
.LP
|
||||
Possible responses to the CONTINUE prompt are:
|
||||
.IP YES
|
||||
ignore the rest of the blocks in this inode
|
||||
and continue checking with the next inode in the file system.
|
||||
This error condition will not allow a complete check of the file system.
|
||||
and continue checking with the next inode in the filesystem.
|
||||
This error condition will not allow a complete check of the filesystem.
|
||||
A second run of
|
||||
.I fsck_ffs
|
||||
should be made to re-check this file system.
|
||||
should be made to re-check this filesystem.
|
||||
.IP NO
|
||||
terminate the program.
|
||||
.sp
|
||||
@ -531,11 +531,11 @@ inodes.
|
||||
Possible responses to the CONTINUE prompt are:
|
||||
.IP YES
|
||||
ignore the rest of the blocks in this inode
|
||||
and continue checking with the next inode in the file system.
|
||||
This error condition will not allow a complete check of the file system.
|
||||
and continue checking with the next inode in the filesystem.
|
||||
This error condition will not allow a complete check of the filesystem.
|
||||
A second run of
|
||||
.I fsck_ffs
|
||||
should be made to re-check this file system.
|
||||
should be made to re-check this filesystem.
|
||||
.IP NO
|
||||
terminate the program.
|
||||
.sp
|
||||
@ -551,10 +551,10 @@ Increase the amount of virtual memory available to
|
||||
Possible responses to the CONTINUE prompt are:
|
||||
.IP YES
|
||||
continue with the program.
|
||||
This error condition will not allow a complete check of the file system.
|
||||
This error condition will not allow a complete check of the filesystem.
|
||||
A second run of
|
||||
.I fsck_ffs
|
||||
should be made to re-check this file system.
|
||||
should be made to re-check this filesystem.
|
||||
If another duplicate block is found, this error condition will repeat.
|
||||
.IP NO
|
||||
terminate the program.
|
||||
@ -585,7 +585,7 @@ ignore this error condition.
|
||||
.NH 2
|
||||
Phase 1B: Rescan for More Dups
|
||||
.PP
|
||||
When a duplicate block is found in the file system, the file system is
|
||||
When a duplicate block is found in the filesystem, the filesystem is
|
||||
rescanned to find the inode that previously claimed that block.
|
||||
This section lists the error condition when the duplicate block is found.
|
||||
.sp
|
||||
@ -611,7 +611,7 @@ root inode mode and status,
|
||||
directory inode pointers in range,
|
||||
and directory entries pointing to bad inodes,
|
||||
and directory integrity checks.
|
||||
All errors in this phase are fatal if the file system is being preen'ed,
|
||||
All errors in this phase are fatal if the filesystem is being preen'ed,
|
||||
except for directories not being a multiple of the blocks size
|
||||
and extraneous hard links.
|
||||
.sp
|
||||
@ -671,7 +671,7 @@ terminate the program.
|
||||
.B "DUPS/BAD IN ROOT INODE (REALLOCATE)"
|
||||
.br
|
||||
Phase 1 or Phase 1b have found duplicate blocks
|
||||
or bad blocks in the root inode (usually inode number 2) for the file system.
|
||||
or bad blocks in the root inode (usually inode number 2) for the filesystem.
|
||||
.LP
|
||||
Possible responses to the REALLOCATE prompt are:
|
||||
.IP YES
|
||||
@ -695,7 +695,7 @@ Possible responses to the CONTINUE prompt are:
|
||||
ignore the
|
||||
.B "DUPS/BAD"
|
||||
error condition in the root inode and
|
||||
attempt to continue to run the file system check.
|
||||
attempt to continue to run the filesystem check.
|
||||
If the root inode is not correct,
|
||||
then this may result in many other error conditions.
|
||||
.IP NO
|
||||
@ -705,7 +705,7 @@ terminate the program.
|
||||
.B "NAME TOO LONG \fIF\fP"
|
||||
.br
|
||||
An excessively long path name has been found.
|
||||
This usually indicates loops in the file system name space.
|
||||
This usually indicates loops in the filesystem name space.
|
||||
This can occur if the super user has made circular links to directories.
|
||||
The offending links must be removed (by a guru).
|
||||
.sp
|
||||
@ -785,8 +785,8 @@ a multiple of the directory blocksize \fIB\fP.
|
||||
Possible responses to the ADJUST prompt are:
|
||||
.IP YES
|
||||
the length is rounded up to the appropriate block size.
|
||||
This error can occur on 4.2BSD file systems.
|
||||
Thus when preen'ing the file system only a warning is printed
|
||||
This error can occur on 4.2BSD filesystems.
|
||||
Thus when preen'ing the filesystem only a warning is printed
|
||||
and the directory is adjusted.
|
||||
.IP NO
|
||||
ignore the error condition.
|
||||
@ -837,9 +837,9 @@ leave the directory unchanged.
|
||||
A directory \fII\fP has been found whose first entry is \fIF\fP.
|
||||
.I Fsck_ffs
|
||||
cannot resolve this problem.
|
||||
The file system should be mounted and the offending entry \fIF\fP
|
||||
The filesystem should be mounted and the offending entry \fIF\fP
|
||||
moved elsewhere.
|
||||
The file system should then be unmounted and
|
||||
The filesystem should then be unmounted and
|
||||
.I fsck_ffs
|
||||
should be run again.
|
||||
.sp
|
||||
@ -897,9 +897,9 @@ leave the directory unchanged.
|
||||
A directory \fII\fP has been found whose second entry is \fIF\fP.
|
||||
.I Fsck_ffs
|
||||
cannot resolve this problem.
|
||||
The file system should be mounted and the offending entry \fIF\fP
|
||||
The filesystem should be mounted and the offending entry \fIF\fP
|
||||
moved elsewhere.
|
||||
The file system should then be unmounted and
|
||||
The filesystem should then be unmounted and
|
||||
.I fsck_ffs
|
||||
should be run again.
|
||||
.sp
|
||||
@ -911,9 +911,9 @@ should be run again.
|
||||
A directory \fII\fP has been found whose second entry is not `..'.
|
||||
.I Fsck_ffs
|
||||
cannot resolve this problem.
|
||||
The file system should be mounted and the second entry in the directory
|
||||
The filesystem should be mounted and the second entry in the directory
|
||||
moved elsewhere.
|
||||
The file system should then be unmounted and
|
||||
The filesystem should then be unmounted and
|
||||
.I fsck_ffs
|
||||
should be run again.
|
||||
.sp
|
||||
@ -945,7 +945,7 @@ ignore the error condition.
|
||||
.B "BAD INODE \fIS\fP TO DESCEND"
|
||||
.br
|
||||
An internal error has caused an impossible state \fIS\fP to be passed to the
|
||||
routine that descends the file system directory structure.
|
||||
routine that descends the filesystem directory structure.
|
||||
.I Fsck_ffs
|
||||
exits.
|
||||
See a guru.
|
||||
@ -954,7 +954,7 @@ See a guru.
|
||||
.B "BAD RETURN STATE \fIS\fP FROM DESCEND"
|
||||
.br
|
||||
An internal error has caused an impossible state \fIS\fP to be returned
|
||||
from the routine that descends the file system directory structure.
|
||||
from the routine that descends the filesystem directory structure.
|
||||
.I Fsck_ffs
|
||||
exits.
|
||||
See a guru.
|
||||
@ -982,7 +982,7 @@ directories.
|
||||
.B "UNREF DIR I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP (RECONNECT)"
|
||||
.br
|
||||
The directory inode \fII\fP was not connected to a directory entry
|
||||
when the file system was traversed.
|
||||
when the filesystem was traversed.
|
||||
The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, and
|
||||
modify time \fIT\fP of directory inode \fII\fP are printed.
|
||||
When preen'ing, the directory is reconnected if its size is non-zero,
|
||||
@ -990,7 +990,7 @@ otherwise it is cleared.
|
||||
.LP
|
||||
Possible responses to the RECONNECT prompt are:
|
||||
.IP YES
|
||||
reconnect directory inode \fII\fP to the file system in the
|
||||
reconnect directory inode \fII\fP to the filesystem in the
|
||||
directory for lost files (usually \fIlost+found\fP).
|
||||
This may invoke the
|
||||
.I lost+found
|
||||
@ -1007,14 +1007,14 @@ This will always invoke the UNREF error condition in Phase 4.
|
||||
.br
|
||||
There is no
|
||||
.I lost+found
|
||||
directory in the root directory of the file system;
|
||||
directory in the root directory of the filesystem;
|
||||
When preen'ing
|
||||
.I fsck_ffs
|
||||
tries to create a \fIlost+found\fP directory.
|
||||
.LP
|
||||
Possible responses to the CREATE prompt are:
|
||||
.IP YES
|
||||
create a \fIlost+found\fP directory in the root of the file system.
|
||||
create a \fIlost+found\fP directory in the root of the filesystem.
|
||||
This may raise the message:
|
||||
.br
|
||||
.B "NO SPACE LEFT IN / (EXPAND)"
|
||||
@ -1059,7 +1059,7 @@ This will always invoke the UNREF error condition in Phase 4.
|
||||
There is no space to add another entry to the
|
||||
.I lost+found
|
||||
directory in the root directory
|
||||
of the file system.
|
||||
of the filesystem.
|
||||
When preen'ing the
|
||||
.I lost+found
|
||||
directory is expanded.
|
||||
@ -1079,7 +1079,7 @@ and aborts the attempt to linkup the lost inode.
|
||||
This will always invoke the UNREF error condition in Phase 4.
|
||||
Clean out unnecessary entries in
|
||||
.I lost+found .
|
||||
This error is fatal if the file system is being preen'ed.
|
||||
This error is fatal if the filesystem is being preen'ed.
|
||||
.IP NO
|
||||
abort the attempt to linkup the lost inode.
|
||||
This will always invoke the UNREF error condition in Phase 4.
|
||||
@ -1106,8 +1106,8 @@ a multiple of the directory blocksize \fIB\fP
|
||||
Possible responses to the ADJUST prompt are:
|
||||
.IP YES
|
||||
the length is rounded up to the appropriate block size.
|
||||
This error can occur on 4.2BSD file systems.
|
||||
Thus when preen'ing the file system only a warning is printed
|
||||
This error can occur on 4.2BSD filesystems.
|
||||
Thus when preen'ing the filesystem only a warning is printed
|
||||
and the directory is adjusted.
|
||||
.IP NO
|
||||
ignore the error condition.
|
||||
@ -1116,7 +1116,7 @@ ignore the error condition.
|
||||
.B "BAD INODE \fIS\fP TO DESCEND"
|
||||
.br
|
||||
An internal error has caused an impossible state \fIS\fP to be passed to the
|
||||
routine that descends the file system directory structure.
|
||||
routine that descends the filesystem directory structure.
|
||||
.I Fsck_ffs
|
||||
exits.
|
||||
See a guru.
|
||||
@ -1133,14 +1133,14 @@ directory,
|
||||
incorrect link counts for files, directories, symbolic links, or special files,
|
||||
unreferenced files, symbolic links, and directories,
|
||||
and bad or duplicate blocks in files, symbolic links, and directories.
|
||||
All errors in this phase are correctable if the file system is being preen'ed
|
||||
All errors in this phase are correctable if the filesystem is being preen'ed
|
||||
except running out of space in the \fIlost+found\fP directory.
|
||||
.sp
|
||||
.LP
|
||||
.B "UNREF FILE I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP (RECONNECT)"
|
||||
.br
|
||||
Inode \fII\fP was not connected to a directory entry
|
||||
when the file system was traversed.
|
||||
when the filesystem was traversed.
|
||||
The owner \fIO\fP, mode \fIM\fP, size \fIS\fP, and
|
||||
modify time \fIT\fP of inode \fII\fP are printed.
|
||||
When preen'ing the file is cleared if either its size or its
|
||||
@ -1149,7 +1149,7 @@ otherwise it is reconnected.
|
||||
.LP
|
||||
Possible responses to the RECONNECT prompt are:
|
||||
.IP YES
|
||||
reconnect inode \fII\fP to the file system in the directory for
|
||||
reconnect inode \fII\fP to the filesystem in the directory for
|
||||
lost files (usually \fIlost+found\fP).
|
||||
This may invoke the
|
||||
.I lost+found
|
||||
@ -1165,7 +1165,7 @@ This will always invoke the CLEAR error condition in Phase 4.
|
||||
.br
|
||||
The inode mentioned in the immediately previous error condition can not be
|
||||
reconnected.
|
||||
This cannot occur if the file system is being preen'ed,
|
||||
This cannot occur if the filesystem is being preen'ed,
|
||||
since lack of space to reconnect files is a fatal error.
|
||||
.LP
|
||||
Possible responses to the CLEAR prompt are:
|
||||
@ -1179,14 +1179,14 @@ ignore this error condition.
|
||||
.br
|
||||
There is no
|
||||
.I lost+found
|
||||
directory in the root directory of the file system;
|
||||
directory in the root directory of the filesystem;
|
||||
When preen'ing
|
||||
.I fsck_ffs
|
||||
tries to create a \fIlost+found\fP directory.
|
||||
.LP
|
||||
Possible responses to the CREATE prompt are:
|
||||
.IP YES
|
||||
create a \fIlost+found\fP directory in the root of the file system.
|
||||
create a \fIlost+found\fP directory in the root of the filesystem.
|
||||
This may raise the message:
|
||||
.br
|
||||
.B "NO SPACE LEFT IN / (EXPAND)"
|
||||
@ -1231,7 +1231,7 @@ This will always invoke the UNREF error condition in Phase 4.
|
||||
There is no space to add another entry to the
|
||||
.I lost+found
|
||||
directory in the root directory
|
||||
of the file system.
|
||||
of the filesystem.
|
||||
When preen'ing the
|
||||
.I lost+found
|
||||
directory is expanded.
|
||||
@ -1251,7 +1251,7 @@ and aborts the attempt to linkup the lost inode.
|
||||
This will always invoke the UNREF error condition in Phase 4.
|
||||
Clean out unnecessary entries in
|
||||
.I lost+found .
|
||||
This error is fatal if the file system is being preen'ed.
|
||||
This error is fatal if the filesystem is being preen'ed.
|
||||
.IP NO
|
||||
abort the attempt to linkup the lost inode.
|
||||
This will always invoke the UNREF error condition in Phase 4.
|
||||
@ -1282,7 +1282,7 @@ ignore this error condition.
|
||||
.B "UNREF \fItype\fP I=\fII\fP OWNER=\fIO\fP MODE=\fIM\fP SIZE=\fIS\fP MTIME=\fIT\fP (CLEAR)"
|
||||
.br
|
||||
Inode \fII\fP, was not connected to a directory entry when the
|
||||
file system was traversed.
|
||||
filesystem was traversed.
|
||||
The owner \fIO\fP, mode \fIM\fP, size \fIS\fP,
|
||||
and modify time \fIT\fP of inode \fII\fP
|
||||
are printed.
|
||||
@ -1305,7 +1305,7 @@ inode \fII\fP.
|
||||
The owner \fIO\fP, mode \fIM\fP, size \fIS\fP,
|
||||
and modify time \fIT\fP of inode \fII\fP
|
||||
are printed.
|
||||
This error cannot arise when the file system is being preen'ed,
|
||||
This error cannot arise when the filesystem is being preen'ed,
|
||||
as it would have caused a fatal error earlier.
|
||||
.LP
|
||||
Possible responses to the CLEAR prompt are:
|
||||
@ -1333,7 +1333,7 @@ The magic number of cylinder group \fIC\fP is wrong.
|
||||
This usually indicates that the cylinder group maps have been destroyed.
|
||||
When running manually the cylinder group is marked as needing
|
||||
to be reconstructed.
|
||||
This error is fatal if the file system is being preen'ed.
|
||||
This error is fatal if the filesystem is being preen'ed.
|
||||
.sp
|
||||
.LP
|
||||
.B "BLK(S) MISSING IN BIT MAPS (SALVAGE)"
|
||||
@ -1375,19 +1375,19 @@ ignore this error condition.
|
||||
.NH 2
|
||||
Cleanup
|
||||
.PP
|
||||
Once a file system has been checked, a few cleanup functions are performed.
|
||||
Once a filesystem has been checked, a few cleanup functions are performed.
|
||||
This section lists advisory messages about
|
||||
the file system
|
||||
and modify status of the file system.
|
||||
the filesystem
|
||||
and modify status of the filesystem.
|
||||
.sp
|
||||
.LP
|
||||
.B "\fIV\fP files, \fIW\fP used, \fIX\fP free (\fIY\fP frags, \fIZ\fP blocks)"
|
||||
.br
|
||||
This is an advisory message indicating that
|
||||
the file system checked contained
|
||||
the filesystem checked contained
|
||||
\fIV\fP files using
|
||||
\fIW\fP fragment sized blocks leaving
|
||||
\fIX\fP fragment sized blocks free in the file system.
|
||||
\fIX\fP fragment sized blocks free in the filesystem.
|
||||
The numbers in parenthesis breaks the free count down into
|
||||
\fIY\fP free fragments and
|
||||
\fIZ\fP free full sized blocks.
|
||||
@ -1396,7 +1396,7 @@ The numbers in parenthesis breaks the free count down into
|
||||
.B "***** REBOOT UNIX *****"
|
||||
.br
|
||||
This is an advisory message indicating that
|
||||
the root file system has been modified by
|
||||
the root filesystem has been modified by
|
||||
.I fsck_ffs.
|
||||
If UNIX is not rebooted immediately,
|
||||
the work done by
|
||||
@ -1413,9 +1413,9 @@ interprets an exit code of 4 by issuing a reboot system call.
|
||||
.B "***** FILE SYSTEM WAS MODIFIED *****"
|
||||
.br
|
||||
This is an advisory message indicating that
|
||||
the current file system was modified by
|
||||
the current filesystem was modified by
|
||||
.I fsck_ffs.
|
||||
If this file system is mounted or is the current root file system,
|
||||
If this filesystem is mounted or is the current root filesystem,
|
||||
.I fsck_ffs
|
||||
should be halted and UNIX rebooted.
|
||||
If UNIX is not rebooted immediately,
|
||||
|
@ -97,7 +97,7 @@ struct bufarea {
|
||||
|
||||
#define MINBUFS 5 /* minimum number of buffers required */
|
||||
struct bufarea bufhead; /* head of list of other blks in filesys */
|
||||
struct bufarea sblk; /* file system superblock */
|
||||
struct bufarea sblk; /* filesystem superblock */
|
||||
struct bufarea cgblk; /* cylinder group blocks */
|
||||
struct bufarea *pdirbp; /* current directory contents */
|
||||
struct bufarea *pbp; /* current inode block */
|
||||
@ -210,7 +210,7 @@ char yflag; /* assume a yes response */
|
||||
int bkgrdflag; /* use a snapshot to run on an active system */
|
||||
int bflag; /* location of alternate super block */
|
||||
int debug; /* output debugging info */
|
||||
int cvtlevel; /* convert to newer file system format */
|
||||
int cvtlevel; /* convert to newer filesystem format */
|
||||
int bkgrdcheck; /* determine if background check is possible */
|
||||
char usedsoftdep; /* just fix soft dependency inconsistencies */
|
||||
char preen; /* just fix normal inconsistencies */
|
||||
@ -218,14 +218,14 @@ char rerun; /* rerun fsck. Only used in non-preen mode */
|
||||
int returntosingle; /* 1 => return to single user mode on exit */
|
||||
char resolved; /* cleared if unresolved changes => not clean */
|
||||
char havesb; /* superblock has been read */
|
||||
char skipclean; /* skip clean file systems if preening */
|
||||
int fsmodified; /* 1 => write done to file system */
|
||||
int fsreadfd; /* file descriptor for reading file system */
|
||||
int fswritefd; /* file descriptor for writing file system */
|
||||
char skipclean; /* skip clean filesystems if preening */
|
||||
int fsmodified; /* 1 => write done to filesystem */
|
||||
int fsreadfd; /* file descriptor for reading filesystem */
|
||||
int fswritefd; /* file descriptor for writing filesystem */
|
||||
|
||||
ufs_daddr_t maxfsblock; /* number of blocks in the file system */
|
||||
ufs_daddr_t maxfsblock; /* number of blocks in the filesystem */
|
||||
char *blockmap; /* ptr to primary blk allocation map */
|
||||
ino_t maxino; /* number of inodes in file system */
|
||||
ino_t maxino; /* number of inodes in filesystem */
|
||||
|
||||
ino_t lfdir; /* lost & found directory inode number */
|
||||
char *lfname; /* lost & found directory name */
|
||||
|
@ -308,7 +308,7 @@ checkfilesys(char *filesys)
|
||||
if (preen == 0) {
|
||||
printf("** Last Mounted on %s\n", sblock.fs_fsmnt);
|
||||
if (mntp != NULL && mntp->f_flags & MNT_ROOTFS)
|
||||
printf("** Root file system\n");
|
||||
printf("** Root filesystem\n");
|
||||
printf("** Phase 1 - Check Blocks and Sizes\n");
|
||||
}
|
||||
pass1();
|
||||
|
@ -68,7 +68,7 @@ pass1(void)
|
||||
struct inodesc idesc;
|
||||
|
||||
/*
|
||||
* Set file system reserved blocks in used block map.
|
||||
* Set filesystem reserved blocks in used block map.
|
||||
*/
|
||||
for (c = 0; c < sblock.fs_ncg; c++) {
|
||||
cgd = cgdmin(&sblock, c);
|
||||
|
@ -97,7 +97,7 @@ struct bufarea {
|
||||
|
||||
#define MINBUFS 5 /* minimum number of buffers required */
|
||||
struct bufarea bufhead; /* head of list of other blks in filesys */
|
||||
struct bufarea sblk; /* file system superblock */
|
||||
struct bufarea sblk; /* filesystem superblock */
|
||||
struct bufarea cgblk; /* cylinder group blocks */
|
||||
struct bufarea *pdirbp; /* current directory contents */
|
||||
struct bufarea *pbp; /* current inode block */
|
||||
@ -196,7 +196,7 @@ char nflag; /* assume a no response */
|
||||
char yflag; /* assume a yes response */
|
||||
int bflag; /* location of alternate super block */
|
||||
int debug; /* output debugging info */
|
||||
int cvtlevel; /* convert to newer file system format */
|
||||
int cvtlevel; /* convert to newer filesystem format */
|
||||
int doinglevel1; /* converting to new cylinder group format */
|
||||
int doinglevel2; /* converting to new inode format */
|
||||
int newinofmt; /* filesystem has new inode format */
|
||||
@ -205,16 +205,16 @@ char preen; /* just fix normal inconsistencies */
|
||||
char rerun; /* rerun fsck. Only used in non-preen mode */
|
||||
int returntosingle; /* 1 => return to single user mode on exit */
|
||||
char resolved; /* cleared if unresolved changes => not clean */
|
||||
int markclean; /* mark file system clean when done */
|
||||
int markclean; /* mark filesystem clean when done */
|
||||
char havesb; /* superblock has been read */
|
||||
char skipclean; /* skip clean file systems if preening */
|
||||
int fsmodified; /* 1 => write done to file system */
|
||||
int fsreadfd; /* file descriptor for reading file system */
|
||||
int fswritefd; /* file descriptor for writing file system */
|
||||
char skipclean; /* skip clean filesystems if preening */
|
||||
int fsmodified; /* 1 => write done to filesystem */
|
||||
int fsreadfd; /* file descriptor for reading filesystem */
|
||||
int fswritefd; /* file descriptor for writing filesystem */
|
||||
|
||||
ufs_daddr_t maxfsblock; /* number of blocks in the file system */
|
||||
ufs_daddr_t maxfsblock; /* number of blocks in the filesystem */
|
||||
char *blockmap; /* ptr to primary blk allocation map */
|
||||
ino_t maxino; /* number of inodes in file system */
|
||||
ino_t maxino; /* number of inodes in filesystem */
|
||||
|
||||
ino_t lfdir; /* lost & found directory inode number */
|
||||
char *lfname; /* lost & found directory name */
|
||||
|
@ -220,7 +220,7 @@ checkfilesys(char *filesys, char *mntpt, long auxdata, int child)
|
||||
if (preen == 0) {
|
||||
printf("** Last Mounted on %s\n", sblock.fs_fsmnt);
|
||||
if (mntbuf != NULL && mntbuf->f_flags & MNT_ROOTFS)
|
||||
printf("** Root file system\n");
|
||||
printf("** Root filesystem\n");
|
||||
printf("** Phase 1 - Check Blocks and Sizes\n");
|
||||
}
|
||||
pass1();
|
||||
|
@ -67,7 +67,7 @@ pass1(void)
|
||||
struct inodesc idesc;
|
||||
|
||||
/*
|
||||
* Set file system reserved blocks in used block map.
|
||||
* Set filesystem reserved blocks in used block map.
|
||||
*/
|
||||
for (c = 0; c < sblock.fs_ncg; c++) {
|
||||
cgd = cgdmin(&sblock, c);
|
||||
|
@ -171,7 +171,7 @@ checkfilesys(fname)
|
||||
mod |= writefat(dosfs, &boot, fat, 1);
|
||||
} else {
|
||||
pwarn("\n***** FILE SYSTEM IS LEFT MARKED AS DIRTY *****\n");
|
||||
mod |= FSERROR; /* file system not clean */
|
||||
mod |= FSERROR; /* filesystem not clean */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ int checkfilesys(const char *);
|
||||
#define FSERROR 8 /* Some unrecovered error remains */
|
||||
#define FSFATAL 16 /* Some unrecoverable error occured */
|
||||
#define FSDIRTY 32 /* File system is dirty */
|
||||
#define FSFIXFAT 64 /* Fix file system FAT */
|
||||
#define FSFIXFAT 64 /* Fix filesystem FAT */
|
||||
|
||||
/*
|
||||
* read a boot block in a machine independend fashion and translate
|
||||
|
@ -64,7 +64,7 @@ It is normally started by
|
||||
run from
|
||||
.Pa /etc/rc
|
||||
during automatic reboot, when a FAT filesystem is detected.
|
||||
When preening file systems,
|
||||
When preening filesystems,
|
||||
.Nm
|
||||
will fix common inconsistencies non-interactively.
|
||||
If more serious problems are found,
|
||||
@ -74,7 +74,7 @@ successful, and exits.
|
||||
.Pp
|
||||
The second form of
|
||||
.Nm
|
||||
checks the specified file systems and tries to repair all
|
||||
checks the specified filesystems and tries to repair all
|
||||
detected inconsistencies, requesting confirmation before
|
||||
making any changes.
|
||||
.Pp
|
||||
@ -85,13 +85,13 @@ Compatibility with the wrapper
|
||||
.Xr fsck 8
|
||||
which seeks to determine whether the filesystem needs to be cleaned
|
||||
immediately in foreground, or if its cleaning can be deferred to background.
|
||||
FAT (MS-DOS) file systems must always be cleaned in the foreground.
|
||||
FAT (MS-DOS) filesystems must always be cleaned in the foreground.
|
||||
A non-zero exit code is always returned for this option.
|
||||
.It Fl f
|
||||
This option is ignored by
|
||||
.Nm ,
|
||||
and is present only for compatibility with programs that
|
||||
check other file system types for consistency, such as
|
||||
check other filesystem types for consistency, such as
|
||||
.Xr fsck_ffs 8 .
|
||||
.It Fl n
|
||||
Causes
|
||||
|
@ -45,7 +45,7 @@
|
||||
opens
|
||||
.Ar fsname
|
||||
(usually a raw disk partition) and runs a command loop
|
||||
allowing manipulation of the file system's inode data. You are prompted
|
||||
allowing manipulation of the filesystem's inode data. You are prompted
|
||||
to enter a command with
|
||||
.Ic "fsdb (inum X)>"
|
||||
where
|
||||
@ -55,8 +55,8 @@ root of the filesystem (i-number 2).
|
||||
The command processor uses the
|
||||
.Xr editline 3
|
||||
library, so you can use command line editing to reduce typing if desired.
|
||||
When you exit the command loop, the file system superblock is marked
|
||||
dirty and any buffered blocks are written to the file system.
|
||||
When you exit the command loop, the filesystem superblock is marked
|
||||
dirty and any buffered blocks are written to the filesystem.
|
||||
.Pp
|
||||
The following options are available:
|
||||
.Bl -tag -width indent
|
||||
@ -229,7 +229,7 @@ doesn't implement.
|
||||
.Nm Fsdb
|
||||
uses the source code for
|
||||
.Xr fsck 8
|
||||
to implement most of the file system manipulation code. The remainder of
|
||||
to implement most of the filesystem manipulation code. The remainder of
|
||||
.Nm
|
||||
first appeared in
|
||||
.Nx ,
|
||||
@ -240,7 +240,7 @@ written by
|
||||
ported it to
|
||||
.Fx .
|
||||
.Sh WARNING
|
||||
Use this tool with extreme caution--you can damage an FFS file system
|
||||
Use this tool with extreme caution--you can damage an FFS filesystem
|
||||
beyond what
|
||||
.Xr fsck 8
|
||||
can repair.
|
||||
|
@ -65,8 +65,8 @@ char nflag;
|
||||
/*
|
||||
* We suck in lots of fsck code, and just pick & choose the stuff we want.
|
||||
*
|
||||
* fsreadfd is set up to read from the file system, fswritefd to write to
|
||||
* the file system.
|
||||
* fsreadfd is set up to read from the filesystem, fswritefd to write to
|
||||
* the filesystem.
|
||||
*/
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
@ -100,8 +100,8 @@ main(int argc, char *argv[])
|
||||
|
||||
sblock_init();
|
||||
if (!setup(fsys))
|
||||
errx(1, "cannot set up file system `%s'", fsys);
|
||||
printf("%s file system `%s'\nLast Mounted on %s\n",
|
||||
errx(1, "cannot set up filesystem `%s'", fsys);
|
||||
printf("%s filesystem `%s'\nLast Mounted on %s\n",
|
||||
nflag? "Examining": "Editing", fsys, sblock.fs_fsmnt);
|
||||
rval = cmdloop();
|
||||
if (!nflag) {
|
||||
|
@ -42,7 +42,7 @@
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm growfs
|
||||
.Nd grow size of an existing ufs file system
|
||||
.Nd grow size of an existing ufs filesystem
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl Ny
|
||||
@ -60,17 +60,17 @@ the disk must be labeled to a bigger size using
|
||||
If you are using volumes you must enlarge them by using
|
||||
.Xr vinum 8 .
|
||||
.Nm
|
||||
extends the size of the file system on the specified special file.
|
||||
extends the size of the filesystem on the specified special file.
|
||||
Currently
|
||||
.Nm
|
||||
can only enlarge unmounted file systems.
|
||||
Do not try enlarging a mounted file system, your system may panic and you will
|
||||
not be able to use the file system any longer.
|
||||
can only enlarge unmounted filesystems.
|
||||
Do not try enlarging a mounted filesystem, your system may panic and you will
|
||||
not be able to use the filesystem any longer.
|
||||
Most of the
|
||||
.Xr newfs 8
|
||||
options can not be changed by
|
||||
.Nm .
|
||||
In fact, you can only increase the size of the file system.
|
||||
In fact, you can only increase the size of the filesystem.
|
||||
Use
|
||||
.Xr tunefs 8
|
||||
for other changes.
|
||||
@ -79,8 +79,8 @@ The following options are available:
|
||||
.Bl -tag -width indent
|
||||
.It Fl N
|
||||
.Dq Test mode .
|
||||
Causes the new file system parameters to be printed out without actually
|
||||
enlarging the file system.
|
||||
Causes the new filesystem parameters to be printed out without actually
|
||||
enlarging the filesystem.
|
||||
.It Fl y
|
||||
.Dq Expert mode .
|
||||
Usually
|
||||
@ -95,12 +95,12 @@ So use this option with great care!
|
||||
.It Fl s Ar size
|
||||
Determines the
|
||||
.Ar size
|
||||
of the file system after enlarging in sectors.
|
||||
of the filesystem after enlarging in sectors.
|
||||
This value defaults to the size of the raw partition specified in
|
||||
.Ar special
|
||||
(in other words,
|
||||
.Nm
|
||||
will enlarge the file system to the size of the entire partition).
|
||||
will enlarge the filesystem to the size of the entire partition).
|
||||
.El
|
||||
.Sh EXAMPLES
|
||||
.Dl growfs -s 4194304 /dev/vinum/testvol
|
||||
@ -118,12 +118,12 @@ There may be cases on
|
||||
.Fx
|
||||
3.x only, when
|
||||
.Nm
|
||||
does not recognize properly whether or not the file system is mounted and
|
||||
does not recognize properly whether or not the filesystem is mounted and
|
||||
exits with an error message.
|
||||
Then please use
|
||||
.Nm
|
||||
.Fl y
|
||||
if you are sure that the file system is not mounted.
|
||||
if you are sure that the filesystem is not mounted.
|
||||
It is also recommended to always use
|
||||
.Xr fsck 8
|
||||
after enlarging (just to be on the safe side).
|
||||
@ -156,8 +156,8 @@ on the first cylinder group to verify that
|
||||
in the CYLINDER SUMMARY (internal cs) of the CYLINDER GROUP
|
||||
.Em cgr0
|
||||
has enough blocks.
|
||||
As a rule of thumb for default file system parameters one block is needed for
|
||||
every 2 GB of total file system size.
|
||||
As a rule of thumb for default filesystem parameters one block is needed for
|
||||
every 2 GB of total filesystem size.
|
||||
.Pp
|
||||
Normally
|
||||
.Nm
|
||||
|
@ -219,7 +219,7 @@ growfs(int fsi, int fso, unsigned int Nflag)
|
||||
updjcg(osblock.fs_ncg-1, utime, fsi, fso, Nflag);
|
||||
|
||||
/*
|
||||
* Dump out summary information about file system.
|
||||
* Dump out summary information about filesystem.
|
||||
*/
|
||||
printf("growfs:\t%d sectors in %d %s of %d tracks, %d sectors\n",
|
||||
sblock.fs_size * NSPF(&sblock), sblock.fs_ncyl,
|
||||
@ -763,7 +763,7 @@ updjcg(int cylno, time_t utime, int fsi, int fso, unsigned int Nflag)
|
||||
* the rotational layout tables and the cluster summary. This is
|
||||
* also done per fragment for the first new block if the old file
|
||||
* system end was not on a block boundary, per fragment for the new
|
||||
* last block if the new file system end is not on a block boundary,
|
||||
* last block if the new filesystem end is not on a block boundary,
|
||||
* and per block for all space in between.
|
||||
*
|
||||
* Handle the first new block here if it was partially available
|
||||
@ -787,7 +787,7 @@ updjcg(int cylno, time_t utime, int fsi, int fso, unsigned int Nflag)
|
||||
/*
|
||||
* Check if the fragment just created could join an
|
||||
* already existing fragment at the former end of the
|
||||
* file system.
|
||||
* filesystem.
|
||||
*/
|
||||
if(isblock(&sblock, cg_blksfree(&acg),
|
||||
((osblock.fs_size - cgbase(&sblock, cylno))/
|
||||
@ -1296,7 +1296,7 @@ updcsloc(time_t utime, int fsi, int fso, unsigned int Nflag)
|
||||
/*
|
||||
* No cluster handling is needed here, as there was at least
|
||||
* one fragment in use by the cylinder summary in the old
|
||||
* file system.
|
||||
* filesystem.
|
||||
* No block-free counter handling here as this block was not
|
||||
* a free block.
|
||||
*/
|
||||
@ -1921,7 +1921,7 @@ charsperline(void)
|
||||
* growfs(8) is a utility which allows to increase the size of an existing
|
||||
* ufs filesystem. Currently this can only be done on unmounted file system.
|
||||
* It recognizes some command line options to specify the new desired size,
|
||||
* and it does some basic checkings. The old file system size is determined
|
||||
* and it does some basic checkings. The old filesystem size is determined
|
||||
* and after some more checks like we can really access the new last block
|
||||
* on the disk etc. we calculate the new parameters for the superblock. After
|
||||
* having done this we just call growfs() which will do the work. Before
|
||||
@ -1937,7 +1937,7 @@ charsperline(void)
|
||||
* fsck(8) is still able to restore any lost data.
|
||||
* The foreseen last step then will be to provide for growing even mounted
|
||||
* file systems. There we have to extend the mount() system call to provide
|
||||
* userland access to the file system locking facility.
|
||||
* userland access to the filesystem locking facility.
|
||||
*/
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
@ -2063,7 +2063,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if that partition looks suited for growing a file system.
|
||||
* Check if that partition looks suited for growing a filesystem.
|
||||
*/
|
||||
if (pp->p_size < 1) {
|
||||
errx(1, "partition is unavailable");
|
||||
@ -2149,7 +2149,7 @@ main(int argc, char **argv)
|
||||
|
||||
/*
|
||||
* Now calculate new superblock values and check for reasonable
|
||||
* bound for new file system size:
|
||||
* bound for new filesystem size:
|
||||
* fs_size: is derived from label or user input
|
||||
* fs_dsize: should get updated in the routines creating or
|
||||
* updating the cylinder groups on the fly
|
||||
|
@ -37,7 +37,7 @@
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm mount
|
||||
.Nd mount file systems
|
||||
.Nd mount filesystems
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl adfpruvw
|
||||
@ -58,7 +58,7 @@ calls the
|
||||
.Xr mount 2
|
||||
system call to prepare and graft a
|
||||
.Ar "special device"
|
||||
or the remote node (rhost:path) on to the file system tree at the point
|
||||
or the remote node (rhost:path) on to the filesystem tree at the point
|
||||
.Ar node .
|
||||
If either
|
||||
.Ar special
|
||||
@ -68,7 +68,7 @@ are not provided, the appropriate information is taken from the
|
||||
.Xr fstab 5
|
||||
file.
|
||||
.Pp
|
||||
The system maintains a list of currently mounted file systems.
|
||||
The system maintains a list of currently mounted filesystems.
|
||||
If no arguments are given to
|
||||
.Nm ,
|
||||
this list is printed.
|
||||
@ -111,7 +111,7 @@ The following options are available:
|
||||
.It Cm async
|
||||
All
|
||||
.Tn I/O
|
||||
to the file system should be done asynchronously.
|
||||
to the filesystem should be done asynchronously.
|
||||
This is a
|
||||
.Em dangerous
|
||||
flag to set,
|
||||
@ -157,12 +157,12 @@ Disable read clustering.
|
||||
.It Cm noclusterw
|
||||
Disable write clustering.
|
||||
.It Cm nodev
|
||||
Do not interpret character or block special devices on the file system.
|
||||
This option is useful for a server that has file systems containing
|
||||
Do not interpret character or block special devices on the filesystem.
|
||||
This option is useful for a server that has filesystems containing
|
||||
special devices for architectures other than its own.
|
||||
.It Cm noexec
|
||||
Do not allow execution of any binaries on the mounted file system.
|
||||
This option is useful for a server that has file systems containing
|
||||
Do not allow execution of any binaries on the mounted filesystem.
|
||||
This option is useful for a server that has filesystems containing
|
||||
binaries for architectures other than its own.
|
||||
.It Cm nosuid
|
||||
Do not allow set-user-identifier or set-group-identifier bits to take effect.
|
||||
@ -172,15 +172,15 @@ wrapper like
|
||||
is installed on your system.
|
||||
.It Cm nosymfollow
|
||||
Do not follow symlinks
|
||||
on the mounted file system.
|
||||
on the mounted filesystem.
|
||||
.It Cm rdonly
|
||||
The same as
|
||||
.Fl r ;
|
||||
mount the file system read-only (even the super-user may not write it).
|
||||
mount the filesystem read-only (even the super-user may not write it).
|
||||
.It Cm sync
|
||||
All
|
||||
.Tn I/O
|
||||
to the file system should be done synchronously.
|
||||
to the filesystem should be done synchronously.
|
||||
.It Cm suiddir
|
||||
A directory on the mounted filesystem will respond to the SUID bit
|
||||
being set, by setting the owner of any new files to be the same
|
||||
@ -202,7 +202,7 @@ for more information.
|
||||
.It Cm update
|
||||
The same as
|
||||
.Fl u ;
|
||||
indicate that the status of an already mounted file system should be changed.
|
||||
indicate that the status of an already mounted filesystem should be changed.
|
||||
.It Cm union
|
||||
Causes the namespace at the mount point to appear as the union
|
||||
of the mounted filesystem root and the existing directory.
|
||||
@ -250,8 +250,8 @@ Implies also the
|
||||
.Fl v
|
||||
option.
|
||||
.It Fl r
|
||||
The file system is to be mounted read-only.
|
||||
Mount the file system read-only (even the super-user may not write it).
|
||||
The filesystem is to be mounted read-only.
|
||||
Mount the filesystem read-only (even the super-user may not write it).
|
||||
The same as the
|
||||
.Cm rdonly
|
||||
argument to the
|
||||
@ -260,7 +260,7 @@ option.
|
||||
.It Fl t Ar ufs | external_type
|
||||
The argument following the
|
||||
.Fl t
|
||||
is used to indicate the file system type.
|
||||
is used to indicate the filesystem type.
|
||||
The type
|
||||
.Ar ufs
|
||||
is the default.
|
||||
@ -322,7 +322,7 @@ Any of the options discussed above (the
|
||||
.Fl o
|
||||
option)
|
||||
may be changed;
|
||||
also a file system can be changed from read-only to read-write
|
||||
also a filesystem can be changed from read-only to read-write
|
||||
or vice versa.
|
||||
An attempt to change from read-write to read-only will fail if any
|
||||
files on the filesystem are currently open for writing unless the
|
||||
@ -339,7 +339,7 @@ option.
|
||||
.It Fl v
|
||||
Verbose mode.
|
||||
.It Fl w
|
||||
The file system object is to be read and write.
|
||||
The filesystem object is to be read and write.
|
||||
.El
|
||||
.Sh DIAGNOSTICS
|
||||
Various, most of them are self-explanatory.
|
||||
@ -361,7 +361,7 @@ have permission to load the module.
|
||||
.Sh FILES
|
||||
.Bl -tag -width /etc/fstab -compact
|
||||
.It Pa /etc/fstab
|
||||
file system table
|
||||
filesystem table
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr mount 2 ,
|
||||
@ -388,13 +388,13 @@ file system table
|
||||
.Xr mount_unionfs 8 ,
|
||||
.Xr umount 8
|
||||
.Sh BUGS
|
||||
It is possible for a corrupted file system to cause a crash.
|
||||
It is possible for a corrupted filesystem to cause a crash.
|
||||
.Sh CAVEATS
|
||||
After a successful
|
||||
.Nm ,
|
||||
the permissions on the original mount point determine if
|
||||
.Pa ..\&
|
||||
is accessible from the mounted file system.
|
||||
is accessible from the mounted filesystem.
|
||||
The minimum permissions for
|
||||
the mount point for traversal across the mount point in both
|
||||
directions to be possible for all users is 0111 (execute for all).
|
||||
|
@ -268,10 +268,10 @@ main(argc, argv)
|
||||
rmslashes(*argv, *argv);
|
||||
if ((fs = getfsfile(*argv)) == NULL &&
|
||||
(fs = getfsspec(*argv)) == NULL)
|
||||
errx(1, "%s: unknown special file or file system",
|
||||
errx(1, "%s: unknown special file or filesystem",
|
||||
*argv);
|
||||
if (BADTYPE(fs->fs_type))
|
||||
errx(1, "%s has unknown file system type",
|
||||
errx(1, "%s has unknown filesystem type",
|
||||
*argv);
|
||||
rval = mountfs(fs->fs_vfstype, fs->fs_spec, fs->fs_file,
|
||||
init_flags, options, fs->fs_mntops);
|
||||
@ -334,7 +334,7 @@ ismounted(fs, mntbuf, mntsize)
|
||||
int i;
|
||||
|
||||
if (fs->fs_file[0] == '/' && fs->fs_file[1] == '\0')
|
||||
/* the root file system can always be remounted */
|
||||
/* the root filesystem can always be remounted */
|
||||
return (0);
|
||||
|
||||
for (i = mntsize - 1; i >= 0; --i)
|
||||
|
@ -36,7 +36,7 @@
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm mount_ext2fs
|
||||
.Nd mount an ext2fs file system
|
||||
.Nd mount an ext2fs filesystem
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl o Ar options
|
||||
@ -45,9 +45,9 @@
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
command attaches a ext2fs file system
|
||||
command attaches a ext2fs filesystem
|
||||
.Ar special
|
||||
device on to the file system tree at the point
|
||||
device on to the filesystem tree at the point
|
||||
.Ar node .
|
||||
.Pp
|
||||
This command is normally executed by
|
||||
|
@ -35,7 +35,7 @@
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm mount_hpfs
|
||||
.Nd mount an HPFS file system
|
||||
.Nd mount an HPFS filesystem
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl o Ar options
|
||||
@ -55,25 +55,25 @@ indicated by
|
||||
This command is normally executed by
|
||||
.Xr mount 8
|
||||
at boot time, but can be used by any user to mount an
|
||||
HPFS file system on any directory that they own (provided,
|
||||
HPFS filesystem on any directory that they own (provided,
|
||||
of course, that they have appropriate access to the device that
|
||||
contains the file system).
|
||||
contains the filesystem).
|
||||
.Pp
|
||||
The options are as follows:
|
||||
.Bl -tag -width Ds
|
||||
.It Fl u Ar uid
|
||||
Set the owner of the files in the file system to
|
||||
Set the owner of the files in the filesystem to
|
||||
.Ar uid .
|
||||
The default owner is the owner of the directory
|
||||
on which the file system is being mounted.
|
||||
on which the filesystem is being mounted.
|
||||
.It Fl g Ar gid
|
||||
Set the group of the files in the file system to
|
||||
Set the group of the files in the filesystem to
|
||||
.Ar gid .
|
||||
The default group is the group of the directory
|
||||
on which the file system is being mounted.
|
||||
on which the filesystem is being mounted.
|
||||
.It Fl m Ar mask
|
||||
Specify the maximum file permissions for files
|
||||
in the file system.
|
||||
in the filesystem.
|
||||
.El
|
||||
.Sh EXAMPLES
|
||||
To mount an hpfs volume located in /dev/wd1s1:
|
||||
|
@ -140,7 +140,7 @@ ismounted(fs, mntbuf, mntsize)
|
||||
int i;
|
||||
|
||||
if (fs->fs_file[0] == '/' && fs->fs_file[1] == '\0')
|
||||
/* the root file system can always be remounted */
|
||||
/* the root filesystem can always be remounted */
|
||||
return (0);
|
||||
|
||||
for (i = mntsize - 1; i >= 0; --i)
|
||||
|
@ -35,7 +35,7 @@
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm mount_msdosfs
|
||||
.Nd mount an MS-DOS file system
|
||||
.Nd mount an MS-DOS filesystem
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl o Ar options
|
||||
@ -62,9 +62,9 @@ indicated by
|
||||
This command is normally executed by
|
||||
.Xr mount 8
|
||||
at boot time, but can be used by any user to mount an
|
||||
MS-DOS file system on any directory that they own (provided,
|
||||
MS-DOS filesystem on any directory that they own (provided,
|
||||
of course, that they have appropriate access to the device that
|
||||
contains the file system).
|
||||
contains the filesystem).
|
||||
.Pp
|
||||
The options are as follows:
|
||||
.Bl -tag -width Ds
|
||||
@ -81,18 +81,18 @@ or
|
||||
all of which can be used to affect Windows name translation in the
|
||||
underlying filesystem.
|
||||
.It Fl u Ar uid
|
||||
Set the owner of the files in the file system to
|
||||
Set the owner of the files in the filesystem to
|
||||
.Ar uid .
|
||||
The default owner is the owner of the directory
|
||||
on which the file system is being mounted.
|
||||
on which the filesystem is being mounted.
|
||||
.It Fl g Ar gid
|
||||
Set the group of the files in the file system to
|
||||
Set the group of the files in the filesystem to
|
||||
.Ar gid .
|
||||
The default group is the group of the directory
|
||||
on which the file system is being mounted.
|
||||
on which the filesystem is being mounted.
|
||||
.It Fl m Ar mask
|
||||
Specify the maximum file permissions for files
|
||||
in the file system.
|
||||
in the filesystem.
|
||||
(For example, a
|
||||
.Ar mask
|
||||
of
|
||||
@ -109,7 +109,7 @@ are used.
|
||||
The default
|
||||
.Ar mask
|
||||
is taken from the
|
||||
directory on which the file system is being mounted.
|
||||
directory on which the filesystem is being mounted.
|
||||
.It Fl s
|
||||
Force behaviour to
|
||||
ignore and not generate Win'95 long filenames.
|
||||
@ -196,9 +196,9 @@ procedures similar to the ones used in Win'95.
|
||||
.Pp
|
||||
.Fx 2.1
|
||||
and earlier versions could not handle cluster sizes larger than 16K.
|
||||
Just mounting an MS-DOS file system could cause corruption to any
|
||||
mounted file system.
|
||||
Cluster sizes larger than 16K are unavoidable for file system sizes
|
||||
Just mounting an MS-DOS filesystem could cause corruption to any
|
||||
mounted filesystem.
|
||||
Cluster sizes larger than 16K are unavoidable for filesystem sizes
|
||||
larger than 1G, and also occur when filesystems larger than 1G are
|
||||
shrunk to smaller than 1G using FIPS.
|
||||
.Sh HISTORY
|
||||
|
@ -38,7 +38,7 @@
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm mount_nfs
|
||||
.Nd mount nfs file systems
|
||||
.Nd mount nfs filesystems
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl 23NPTUbcdiLls
|
||||
@ -59,9 +59,9 @@ The
|
||||
command
|
||||
calls the
|
||||
.Xr mount 2
|
||||
system call to prepare and graft a remote nfs file system
|
||||
system call to prepare and graft a remote nfs filesystem
|
||||
.Pq Ar rhost : Ns Ar path
|
||||
on to the file system tree at the point
|
||||
on to the filesystem tree at the point
|
||||
.Ar node .
|
||||
This command is normally executed by
|
||||
.Xr mount 8 .
|
||||
@ -188,7 +188,7 @@ group list size of 16, as specified in RFC 1057.
|
||||
Try 8, if users in a lot of groups cannot get response from the mount
|
||||
point.
|
||||
.It Fl i
|
||||
Make the mount interruptible, which implies that file system calls that
|
||||
Make the mount interruptible, which implies that filesystem calls that
|
||||
are delayed due to an unresponsive server will fail with EINTR when a
|
||||
termination signal is posted for the process.
|
||||
.It Fl l
|
||||
@ -289,7 +289,7 @@ See the
|
||||
.Fl w
|
||||
option as well.
|
||||
.It Fl s
|
||||
A soft mount, which implies that file system calls will fail
|
||||
A soft mount, which implies that filesystem calls will fail
|
||||
after \fBRetry\fR round trip timeout intervals.
|
||||
.It Fl t
|
||||
Set the initial retransmit timeout to the specified value.
|
||||
@ -297,7 +297,7 @@ May be useful for fine tuning UDP mounts over internetworks
|
||||
with high packet loss rates or an overloaded server.
|
||||
Try increasing the interval if
|
||||
.Xr nfsstat 1
|
||||
shows high retransmit rates while the file system is active or reducing the
|
||||
shows high retransmit rates while the filesystem is active or reducing the
|
||||
value if there is a low retransmit rate but long response delay observed.
|
||||
(Normally, the -d option should be specified when using this option to manually
|
||||
tune the timeout
|
||||
|
@ -35,7 +35,7 @@
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm mount_ntfs
|
||||
.Nd mount an NTFS file system
|
||||
.Nd mount an NTFS filesystem
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl a
|
||||
@ -57,9 +57,9 @@ indicated by
|
||||
This command is normally executed by
|
||||
.Xr mount 8
|
||||
at boot time, but can be used by any user to mount an
|
||||
NTFS file system on any directory that they own (provided,
|
||||
NTFS filesystem on any directory that they own (provided,
|
||||
of course, that they have appropriate access to the device that
|
||||
contains the file system).
|
||||
contains the filesystem).
|
||||
.Pp
|
||||
The options are as follows:
|
||||
.Bl -tag -width Ds
|
||||
@ -69,18 +69,18 @@ Force behaviour to return MS-DOS 8.3 names also on
|
||||
.It Fl i
|
||||
Make name lookup case insensitive for all names except POSIX names.
|
||||
.It Fl u Ar uid
|
||||
Set the owner of the files in the file system to
|
||||
Set the owner of the files in the filesystem to
|
||||
.Ar uid .
|
||||
The default owner is the owner of the directory
|
||||
on which the file system is being mounted.
|
||||
on which the filesystem is being mounted.
|
||||
.It Fl g Ar gid
|
||||
Set the group of the files in the file system to
|
||||
Set the group of the files in the filesystem to
|
||||
.Ar gid .
|
||||
The default group is the group of the directory
|
||||
on which the file system is being mounted.
|
||||
on which the filesystem is being mounted.
|
||||
.It Fl m Ar mask
|
||||
Specify the maximum file permissions for files
|
||||
in the file system.
|
||||
in the filesystem.
|
||||
.It Fl W Ar u2wtable
|
||||
Specify
|
||||
.Ux
|
||||
|
@ -42,7 +42,7 @@
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm mount_nullfs
|
||||
.Nd "mount a loopback filesystem sub-tree; demonstrate the use of a null file system layer"
|
||||
.Nd "mount a loopback filesystem sub-tree; demonstrate the use of a null filesystem layer"
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl o Ar options
|
||||
@ -52,8 +52,8 @@
|
||||
The
|
||||
.Nm
|
||||
command creates a
|
||||
null layer, duplicating a sub-tree of the file system
|
||||
name space under another part of the global file system namespace.
|
||||
null layer, duplicating a sub-tree of the filesystem
|
||||
name space under another part of the global filesystem namespace.
|
||||
This allows existing files and directories to be accessed
|
||||
using a different pathname.
|
||||
.Pp
|
||||
@ -69,7 +69,7 @@ but in other respects it is indistinguishable from the original.
|
||||
The
|
||||
.Nm
|
||||
filesystem differs from a traditional
|
||||
loopback file system in two respects: it is implemented using
|
||||
loopback filesystem in two respects: it is implemented using
|
||||
a stackable layers techniques, and it's
|
||||
.Do null-node Dc Ns s
|
||||
stack above
|
||||
@ -89,11 +89,11 @@ man page for possible options and their meanings.
|
||||
The null layer has two purposes.
|
||||
First, it serves as a demonstration of layering by providing a layer
|
||||
which does nothing.
|
||||
(It actually does everything the loopback file system does,
|
||||
(It actually does everything the loopback filesystem does,
|
||||
which is slightly more than nothing.)
|
||||
Second, the null layer can serve as a prototype layer.
|
||||
Since it provides all necessary layer framework,
|
||||
new file system layers can be created very easily by starting
|
||||
new filesystem layers can be created very easily by starting
|
||||
with a null layer.
|
||||
.Pp
|
||||
The remainder of this man page examines the null layer as a basis
|
||||
@ -112,7 +112,7 @@ of target-pn subtree will be aliased under mount-point-pn.
|
||||
.\"
|
||||
.\"
|
||||
.Sh OPERATION OF A NULL LAYER
|
||||
The null layer is the minimum file system layer,
|
||||
The null layer is the minimum filesystem layer,
|
||||
simply bypassing all possible operations to the lower layer
|
||||
for processing there. The majority of its activity centers
|
||||
on the bypass routine, through which nearly all vnode operations
|
||||
@ -186,7 +186,7 @@ process when constructing other vnode stacks.
|
||||
.\"
|
||||
.\"
|
||||
.Sh CREATING OTHER FILE SYSTEM LAYERS
|
||||
One of the easiest ways to construct new file system layers is to make
|
||||
One of the easiest ways to construct new filesystem layers is to make
|
||||
a copy of the null layer, rename all files and variables, and
|
||||
then begin modifying the copy.
|
||||
.Xr Sed 1
|
||||
|
@ -96,7 +96,7 @@ All existing file names converted to lower case.
|
||||
Newly created file gets a lower case under OS2 name space.
|
||||
This is the default when mounting volumes with DOS name space.
|
||||
.It L
|
||||
Same as 'l' but file system tries to be case insensitive.
|
||||
Same as 'l' but filesystem tries to be case insensitive.
|
||||
May not work well.
|
||||
.It n
|
||||
No case conversion is performed.
|
||||
@ -109,7 +109,7 @@ This is the default when mounting volumes with OS2 name space.
|
||||
All existing file names converted to upper case.
|
||||
Newly created file gets an upper case under OS2 name space.
|
||||
.It U
|
||||
Same as 'u' but file system tries to be case insensitive.
|
||||
Same as 'u' but filesystem tries to be case insensitive.
|
||||
May not work well.
|
||||
.El
|
||||
.It Fl f Ar mode , Fl d Ar mode
|
||||
|
@ -119,7 +119,7 @@ for that specific
|
||||
command.
|
||||
.Pp
|
||||
Refer to the following manual pages for detailed information
|
||||
on these file system:
|
||||
on these filesystem:
|
||||
.Xr devfs 5 ,
|
||||
.Xr fdescfs 5 ,
|
||||
.Xr linprocfs 5
|
||||
|
@ -41,7 +41,7 @@
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm mount_umapfs
|
||||
.Nd sample file system layer
|
||||
.Nd sample filesystem layer
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl o Ar options
|
||||
@ -52,10 +52,10 @@
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
command is used to mount a sub-tree of an existing file system
|
||||
command is used to mount a sub-tree of an existing filesystem
|
||||
that uses a different set of uids and gids than the local system.
|
||||
Such a file system could be mounted from a remote site via NFS or
|
||||
it could be a file system on removable media brought from some
|
||||
Such a filesystem could be mounted from a remote site via NFS or
|
||||
it could be a filesystem on removable media brought from some
|
||||
foreign location that uses a different password file.
|
||||
.Pp
|
||||
The
|
||||
@ -117,7 +117,7 @@ in the first line of the map files is not correct.
|
||||
.Pp
|
||||
The layer created by the
|
||||
.Nm
|
||||
command is meant to serve as a simple example of file system layering.
|
||||
command is meant to serve as a simple example of filesystem layering.
|
||||
It is not meant for production use. The implementation is not very
|
||||
sophisticated.
|
||||
.Sh SEE ALSO
|
||||
|
@ -83,7 +83,7 @@ some diskless workstations do mount requests for
|
||||
their swapfiles and expect them to be regular files.
|
||||
Since a regular file cannot be specified in
|
||||
.Pa /etc/exports ,
|
||||
the entire file system in which the swapfiles resides
|
||||
the entire filesystem in which the swapfiles resides
|
||||
will have to be exported with the
|
||||
.Fl alldirs
|
||||
flag.
|
||||
|
@ -919,8 +919,8 @@ get_exportlist()
|
||||
|
||||
/*
|
||||
* And delete exports that are in the kernel for all local
|
||||
* file systems.
|
||||
* XXX: Should know how to handle all local exportable file systems
|
||||
* filesystems.
|
||||
* XXX: Should know how to handle all local exportable filesystems
|
||||
* instead of just "ufs".
|
||||
*/
|
||||
num = getmntinfo(&fsp, MNT_NOWAIT);
|
||||
@ -1780,7 +1780,7 @@ do_mount(ep, grp, exflags, anoncrp, dirp, dirplen, fsb)
|
||||
* Maybe I should just use the fsb->f_mntonname path instead
|
||||
* of looping back up the dirp to the mount point??
|
||||
* Also, needs to know how to export all types of local
|
||||
* exportable file systems and not just "ufs".
|
||||
* exportable filesystems and not just "ufs".
|
||||
*/
|
||||
while (mount(fsb->f_fstypename, dirp,
|
||||
fsb->f_flags | MNT_UPDATE, (caddr_t)&args) < 0) {
|
||||
|
@ -61,7 +61,7 @@ static const char rcsid[] =
|
||||
#include "newfs.h"
|
||||
|
||||
/*
|
||||
* make file system for cylinder-group style file systems
|
||||
* make filesystem for cylinder-group style filesystems
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -134,7 +134,7 @@ mkfs(struct partition *pp, char *fsys)
|
||||
if (Uflag)
|
||||
sblock.fs_flags |= FS_DOSOFTDEP;
|
||||
/*
|
||||
* Validate the given file system size.
|
||||
* Validate the given filesystem size.
|
||||
* Verify that its last block can actually be accessed.
|
||||
*/
|
||||
if (fssize <= 0)
|
||||
@ -384,8 +384,8 @@ mkfs(struct partition *pp, char *fsys)
|
||||
}
|
||||
sblock.fs_cgsize = fragroundup(&sblock, CGSIZE(&sblock));
|
||||
/*
|
||||
* Now have size for file system and nsect and ntrak.
|
||||
* Determine number of cylinders and blocks in the file system.
|
||||
* Now have size for filesystem and nsect and ntrak.
|
||||
* Determine number of cylinders and blocks in the filesystem.
|
||||
*/
|
||||
sblock.fs_size = fssize = dbtofsb(&sblock, fssize);
|
||||
sblock.fs_ncyl = fssize * NSPF(&sblock) / sblock.fs_spc;
|
||||
@ -394,7 +394,7 @@ mkfs(struct partition *pp, char *fsys)
|
||||
lwarn = 1;
|
||||
}
|
||||
if (sblock.fs_ncyl < 1) {
|
||||
printf("file systems must have at least one cylinder\n");
|
||||
printf("filesystems must have at least one cylinder\n");
|
||||
exit(28);
|
||||
}
|
||||
/*
|
||||
@ -404,7 +404,7 @@ mkfs(struct partition *pp, char *fsys)
|
||||
* size of the superblock, SBSIZE. The amount of space available
|
||||
* for tables is calculated as (SBSIZE - sizeof (struct fs)).
|
||||
* The size of these tables is inversely proportional to the block
|
||||
* size of the file system. The size increases if sectors per track
|
||||
* size of the filesystem. The size increases if sectors per track
|
||||
* are not powers of two, because more cylinders must be described
|
||||
* by the tables before the rotational pattern repeats (fs_cpc).
|
||||
*/
|
||||
@ -496,7 +496,7 @@ mkfs(struct partition *pp, char *fsys)
|
||||
sblock.fs_id[1] = random();
|
||||
|
||||
/*
|
||||
* Dump out summary information about file system.
|
||||
* Dump out summary information about filesystem.
|
||||
*/
|
||||
printf("%s:\t%d sectors in %d %s of %d tracks, %d sectors\n",
|
||||
fsys, sblock.fs_size * NSPF(&sblock), sblock.fs_ncyl,
|
||||
@ -535,7 +535,7 @@ mkfs(struct partition *pp, char *fsys)
|
||||
if (Nflag)
|
||||
exit(0);
|
||||
/*
|
||||
* Now construct the initial file system,
|
||||
* Now construct the initial filesystem,
|
||||
* then write out the super-block.
|
||||
*/
|
||||
fsinit(utime);
|
||||
@ -720,7 +720,7 @@ initcg(int cylno, time_t utime)
|
||||
}
|
||||
|
||||
/*
|
||||
* initialize the file system
|
||||
* initialize the filesystem
|
||||
*/
|
||||
struct dinode node;
|
||||
|
||||
@ -907,7 +907,7 @@ iput(struct dinode *ip, ino_t ino)
|
||||
}
|
||||
|
||||
/*
|
||||
* read a block from the file system
|
||||
* read a block from the filesystem
|
||||
*/
|
||||
void
|
||||
rdfs(daddr_t bno, int size, char *bf)
|
||||
@ -953,7 +953,7 @@ wtfsflush()
|
||||
}
|
||||
|
||||
/*
|
||||
* write a block to the file system
|
||||
* write a block to the filesystem
|
||||
*/
|
||||
static void
|
||||
wtfs(daddr_t bno, int size, char *bf)
|
||||
|
@ -37,7 +37,7 @@
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm newfs ,
|
||||
.Nd construct a new file system
|
||||
.Nd construct a new filesystem
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl NOU
|
||||
@ -64,7 +64,7 @@ Before running
|
||||
the disk must be labeled using
|
||||
.Xr disklabel 8 .
|
||||
.Nm Newfs
|
||||
builds a file system on the specified special file.
|
||||
builds a filesystem on the specified special file.
|
||||
(We often refer to the
|
||||
.Dq special file
|
||||
as the
|
||||
@ -80,8 +80,8 @@ The following options define the general layout policies:
|
||||
.It Fl T Ar disktype
|
||||
For backward compatibility.
|
||||
.It Fl N
|
||||
Cause the file system parameters to be printed out
|
||||
without really creating the file system.
|
||||
Cause the filesystem parameters to be printed out
|
||||
without really creating the filesystem.
|
||||
.It Fl U
|
||||
Enables soft updates on the new filesystem.
|
||||
.It Fl a Ar maxcontig
|
||||
@ -92,13 +92,13 @@ See
|
||||
.Xr tunefs 8
|
||||
for more details on how to set this option.
|
||||
.It Fl b Ar block-size
|
||||
The block size of the file system, in bytes. It must be a power of 2. The
|
||||
The block size of the filesystem, in bytes. It must be a power of 2. The
|
||||
default size is 16384 bytes, and the smallest allowable size is 4096 bytes.
|
||||
The optimal block:fragment ratio is 8:1.
|
||||
Other ratios are possible, but are not recommended,
|
||||
and may produce unpredictable results.
|
||||
.It Fl c Ar #cylinders/group
|
||||
The number of cylinders per cylinder group in a file system. The default
|
||||
The number of cylinders per cylinder group in a filesystem. The default
|
||||
is to compute the maximum allowed by the other parameters. This value is
|
||||
dependent on a number of other parameters, in particular the block size
|
||||
and the number of bytes per inode.
|
||||
@ -111,25 +111,25 @@ See
|
||||
.Xr tunefs 8
|
||||
for more details on how to set this option.
|
||||
.It Fl f Ar frag-size
|
||||
The fragment size of the file system in bytes. It must be a power of two
|
||||
The fragment size of the filesystem in bytes. It must be a power of two
|
||||
ranging in value between
|
||||
.Ar blocksize Ns /8
|
||||
and
|
||||
.Ar blocksize .
|
||||
The default is 2048 bytes.
|
||||
.It Fl g Ar avgfilesize
|
||||
The expected average file size for the file system.
|
||||
The expected average file size for the filesystem.
|
||||
.It Fl h Ar avgfpdir
|
||||
The expected average number of files per directory on the file system.
|
||||
The expected average number of files per directory on the filesystem.
|
||||
.It Fl i Ar number of bytes per inode
|
||||
Specify the density of inodes in the file system.
|
||||
Specify the density of inodes in the filesystem.
|
||||
The default is to create an inode for every
|
||||
.Pq 4 * Ar frag-size
|
||||
bytes of data space.
|
||||
If fewer inodes are desired, a larger number should be used;
|
||||
to create more inodes a smaller number should be given.
|
||||
One inode is required for each distinct file, so this value effectively
|
||||
specifies the average file size on the file system.
|
||||
specifies the average file size on the filesystem.
|
||||
.It Fl m Ar free space \&%
|
||||
The percentage of space reserved from normal users; the minimum free
|
||||
space threshold.
|
||||
@ -144,7 +144,7 @@ See
|
||||
for more details on how to set this option.
|
||||
.It Fl o Ar optimization\ preference
|
||||
.Pq Ar space No or Ar time .
|
||||
The file system can either be instructed to try to minimize the time spent
|
||||
The filesystem can either be instructed to try to minimize the time spent
|
||||
allocating blocks, or to try to minimize the space fragmentation on the disk.
|
||||
If the value of minfree (see above) is less than 8%,
|
||||
the default is to optimize for
|
||||
@ -156,19 +156,19 @@ See
|
||||
.Xr tunefs 8
|
||||
for more details on how to set this option.
|
||||
.It Fl s Ar size
|
||||
The size of the file system in sectors. This value defaults to the size of the
|
||||
The size of the filesystem in sectors. This value defaults to the size of the
|
||||
raw partition specified in
|
||||
.Ar special
|
||||
(in other words,
|
||||
.Nm
|
||||
will use the entire partition for the file system).
|
||||
will use the entire partition for the filesystem).
|
||||
.El
|
||||
.Pp
|
||||
The following options override the standard sizes for the disk geometry.
|
||||
Their default values are taken from the disk label.
|
||||
Changing these defaults is useful only when using
|
||||
.Nm
|
||||
to build a file system whose raw image will eventually be used on a
|
||||
to build a filesystem whose raw image will eventually be used on a
|
||||
different type of disk than the one on which it is initially created
|
||||
(for example on a write-once disk).
|
||||
Note that changing any of these values from their defaults will make
|
||||
@ -187,7 +187,7 @@ If zero is specified, the value from the disklabel will be used.
|
||||
.Sh EXAMPLES
|
||||
.Dl newfs /dev/ad3s1a
|
||||
.Pp
|
||||
Creates a new ufs file system on
|
||||
Creates a new ufs filesystem on
|
||||
.Pa ad3s1a .
|
||||
.Nm
|
||||
will use a block size of 16384 bytes, a fragment size of 2048 bytes
|
||||
|
@ -99,7 +99,7 @@ static const char rcsid[] =
|
||||
#define MAXBLKPG(bsize) ((bsize) / sizeof(daddr_t))
|
||||
|
||||
/*
|
||||
* Each file system has a number of inodes statically allocated.
|
||||
* Each filesystem has a number of inodes statically allocated.
|
||||
* We allocate one inode slot per NFPI fragments, expecting this
|
||||
* to be far more than we will ever need.
|
||||
*/
|
||||
@ -114,10 +114,10 @@ static const char rcsid[] =
|
||||
*/
|
||||
#define NSECTORS 4096 /* number of sectors */
|
||||
|
||||
int Nflag; /* run without writing file system */
|
||||
int Nflag; /* run without writing filesystem */
|
||||
int Rflag; /* regression test */
|
||||
int Uflag; /* enable soft updates for file system */
|
||||
u_int fssize; /* file system size */
|
||||
int Uflag; /* enable soft updates for filesystem */
|
||||
u_int fssize; /* filesystem size */
|
||||
u_int secpercyl = NSECTORS; /* sectors per cylinder */
|
||||
u_int sectorsize; /* bytes/sector */
|
||||
int realsectorsize; /* bytes/sector in hardware */
|
||||
@ -224,7 +224,7 @@ main(int argc, char *argv[])
|
||||
break;
|
||||
case 's':
|
||||
if ((fssize = atoi(optarg)) <= 0)
|
||||
errx(1, "%s: bad file system size", optarg);
|
||||
errx(1, "%s: bad filesystem size", optarg);
|
||||
break;
|
||||
case 'u':
|
||||
t_or_u_flag++;
|
||||
@ -275,7 +275,7 @@ main(int argc, char *argv[])
|
||||
cp = strchr(special, '\0');
|
||||
cp--;
|
||||
if ((*cp < 'a' || *cp > 'h') && !isdigit(*cp))
|
||||
errx(1, "%s: can't figure out file system partition",
|
||||
errx(1, "%s: can't figure out filesystem partition",
|
||||
special);
|
||||
if (isdigit(*cp))
|
||||
pp = &lp->d_partitions[RAW_PART];
|
||||
@ -292,7 +292,7 @@ main(int argc, char *argv[])
|
||||
fssize = pp->p_size;
|
||||
if (fssize > pp->p_size)
|
||||
errx(1,
|
||||
"%s: maximum file system size %d", special, pp->p_size);
|
||||
"%s: maximum filesystem size %d", special, pp->p_size);
|
||||
if (secpercyl == 0)
|
||||
secpercyl = lp->d_nsectors;
|
||||
if (sectorsize == 0)
|
||||
@ -398,7 +398,7 @@ usage()
|
||||
" [device-type]");
|
||||
fprintf(stderr, "where fsoptions are:\n");
|
||||
fprintf(stderr,
|
||||
"\t-N do not create file system, just print out parameters\n");
|
||||
"\t-N do not create filesystem, just print out parameters\n");
|
||||
fprintf(stderr, "\t-R regression test, supress random factors\n");
|
||||
fprintf(stderr, "\t-S sector size\n");
|
||||
fprintf(stderr, "\t-T disktype\n");
|
||||
@ -413,7 +413,7 @@ usage()
|
||||
fprintf(stderr, "\t-i number of bytes per inode\n");
|
||||
fprintf(stderr, "\t-m minimum free space %%\n");
|
||||
fprintf(stderr, "\t-o optimization preference (`space' or `time')\n");
|
||||
fprintf(stderr, "\t-s file system size (sectors)\n");
|
||||
fprintf(stderr, "\t-s filesystem size (sectors)\n");
|
||||
fprintf(stderr, "\t-u sectors/cylinder\n");
|
||||
fprintf(stderr,
|
||||
"\t-v do not attempt to determine partition name from device name\n");
|
||||
|
@ -37,10 +37,10 @@
|
||||
/*
|
||||
* variables set up by front end.
|
||||
*/
|
||||
extern int Nflag; /* run mkfs without writing file system */
|
||||
extern int Nflag; /* run mkfs without writing filesystem */
|
||||
extern int Rflag; /* regression test */
|
||||
extern int Uflag; /* enable soft updates for file system */
|
||||
extern u_int fssize; /* file system size */
|
||||
extern int Uflag; /* enable soft updates for filesystem */
|
||||
extern u_int fssize; /* filesystem size */
|
||||
extern u_int secpercyl; /* sectors per cylinder */
|
||||
extern u_int sectorsize; /* bytes/sector */
|
||||
extern int realsectorsize; /* bytes/sector in hardware*/
|
||||
|
@ -30,7 +30,7 @@
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm newfs_msdos
|
||||
.Nd construct a new MS-DOS (FAT) file system
|
||||
.Nd construct a new MS-DOS (FAT) filesystem
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl N
|
||||
@ -59,7 +59,7 @@
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
utility creates a FAT12, FAT16, or FAT32 file system on device
|
||||
utility creates a FAT12, FAT16, or FAT32 filesystem on device
|
||||
.Ar special ,
|
||||
using
|
||||
.Xr disktab 5
|
||||
@ -70,7 +70,7 @@ to determine geometry, if required.
|
||||
The options are as follow:
|
||||
.Bl -tag -width indent
|
||||
.It Fl N
|
||||
Don't create a file system: just print out parameters.
|
||||
Don't create a filesystem: just print out parameters.
|
||||
.It Fl B Ar boot
|
||||
Get bootstrap from file.
|
||||
.It Fl F Ar FAT-type
|
||||
@ -103,7 +103,7 @@ are (capacities in kilobytes): 160, 180, 320, 360, 640, 720, 1200,
|
||||
.It Fl h Ar heads
|
||||
Number of drive heads.
|
||||
.It Fl i Ar info
|
||||
Location of the file system info sector (FAT32 only).
|
||||
Location of the filesystem info sector (FAT32 only).
|
||||
A value of 0xffff signifies no info sector.
|
||||
.It Fl k Ar backup
|
||||
Location of the backup boot sector (FAT32 only). A value
|
||||
@ -124,9 +124,9 @@ File system size.
|
||||
Number of sectors per track.
|
||||
.El
|
||||
.Sh NOTES
|
||||
FAT file system parameters occupy a "Boot Sector BPB (BIOS Parameter
|
||||
FAT filesystem parameters occupy a "Boot Sector BPB (BIOS Parameter
|
||||
Block)" in the first of the "reserved" sectors which precede the actual
|
||||
file system. For reference purposes, this structure is presented
|
||||
filesystem. For reference purposes, this structure is presented
|
||||
below.
|
||||
.Bd -literal
|
||||
struct bsbpb {
|
||||
@ -147,9 +147,9 @@ struct bsbpb {
|
||||
struct bsxbpb {
|
||||
u_int32_t bspf; /* [-a] big sectors per FAT */
|
||||
u_int16_t xflg; /* control flags */
|
||||
u_int16_t vers; /* file system version */
|
||||
u_int16_t vers; /* filesystem version */
|
||||
u_int32_t rdcl; /* root directory start cluster */
|
||||
u_int16_t infs; /* [-i] file system info sector */
|
||||
u_int16_t infs; /* [-i] filesystem info sector */
|
||||
u_int16_t bkbs; /* [-k] backup boot sector */
|
||||
};
|
||||
.Ed
|
||||
@ -158,13 +158,13 @@ struct bsxbpb {
|
||||
newfs_msdos /dev/ad0s1
|
||||
.Ed
|
||||
.Pp
|
||||
Create a file system, using default parameters, on
|
||||
Create a filesystem, using default parameters, on
|
||||
.Pa /dev/ad0s1 .
|
||||
.Bd -literal -offset indent
|
||||
newfs_msdos -f 1440 -L foo fd0
|
||||
.Ed
|
||||
.Pp
|
||||
Create a standard 1.44M file system, with volume label
|
||||
Create a standard 1.44M filesystem, with volume label
|
||||
.Ar foo ,
|
||||
on
|
||||
.Pa /dev/fd0 .
|
||||
|
@ -116,9 +116,9 @@ struct bsbpb {
|
||||
struct bsxbpb {
|
||||
u_int8_t bspf[4]; /* big sectors per FAT */
|
||||
u_int8_t xflg[2]; /* FAT control flags */
|
||||
u_int8_t vers[2]; /* file system version */
|
||||
u_int8_t vers[2]; /* filesystem version */
|
||||
u_int8_t rdcl[4]; /* root directory start cluster */
|
||||
u_int8_t infs[2]; /* file system info sector */
|
||||
u_int8_t infs[2]; /* filesystem info sector */
|
||||
u_int8_t bkbs[2]; /* backup boot sector */
|
||||
u_int8_t rsvd[12]; /* reserved */
|
||||
};
|
||||
@ -129,7 +129,7 @@ struct bsx {
|
||||
u_int8_t sig; /* extended boot signature */
|
||||
u_int8_t volid[4]; /* volume ID number */
|
||||
u_int8_t label[11]; /* volume label */
|
||||
u_int8_t type[8]; /* file system type */
|
||||
u_int8_t type[8]; /* filesystem type */
|
||||
};
|
||||
|
||||
struct de {
|
||||
@ -157,7 +157,7 @@ struct bpb {
|
||||
u_int bsec; /* big total sectors */
|
||||
u_int bspf; /* big sectors per FAT */
|
||||
u_int rdcl; /* root directory start cluster */
|
||||
u_int infs; /* file system info sector */
|
||||
u_int infs; /* filesystem info sector */
|
||||
u_int bkbs; /* backup boot sector */
|
||||
};
|
||||
|
||||
@ -222,7 +222,7 @@ static void setstr(u_int8_t *, const char *, size_t);
|
||||
static void usage(void);
|
||||
|
||||
/*
|
||||
* Construct a FAT12, FAT16, or FAT32 file system.
|
||||
* Construct a FAT12, FAT16, or FAT32 filesystem.
|
||||
*/
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
@ -324,7 +324,7 @@ main(int argc, char *argv[])
|
||||
opt_r = argto2(optarg, 1, "reserved sectors");
|
||||
break;
|
||||
case 's':
|
||||
opt_s = argto4(optarg, 1, "file system size");
|
||||
opt_s = argto4(optarg, 1, "filesystem size");
|
||||
break;
|
||||
case 'u':
|
||||
opt_u = argto2(optarg, 1, "sectors/track");
|
||||
@ -502,7 +502,7 @@ main(int argc, char *argv[])
|
||||
x1 = bpb.res + rds;
|
||||
x = bpb.bspf ? bpb.bspf : 1;
|
||||
if (x1 + (u_int64_t)x * bpb.nft > bpb.bsec)
|
||||
errx(1, "meta data exceeds file system size");
|
||||
errx(1, "meta data exceeds filesystem size");
|
||||
x1 += x * bpb.nft;
|
||||
x = (u_int64_t)(bpb.bsec - x1) * bpb.bps * NPB /
|
||||
(bpb.spc * bpb.bps * NPB + fat / BPN * bpb.nft);
|
||||
@ -517,7 +517,7 @@ main(int argc, char *argv[])
|
||||
if (cls > x)
|
||||
cls = x;
|
||||
if (bpb.bspf < x2)
|
||||
warnx("warning: sectors/FAT limits file system to %u clusters",
|
||||
warnx("warning: sectors/FAT limits filesystem to %u clusters",
|
||||
cls);
|
||||
if (cls < mincls(fat))
|
||||
errx(1, "%u clusters too few clusters for FAT%u, need %u", cls, fat,
|
||||
@ -525,7 +525,7 @@ main(int argc, char *argv[])
|
||||
if (cls > maxcls(fat)) {
|
||||
cls = maxcls(fat);
|
||||
bpb.bsec = x1 + (cls + 1) * bpb.spc - 1;
|
||||
warnx("warning: FAT type limits file system to %u sectors",
|
||||
warnx("warning: FAT type limits filesystem to %u sectors",
|
||||
bpb.bsec);
|
||||
}
|
||||
printf("%s: %u sector%s in %u FAT%u cluster%s "
|
||||
@ -660,7 +660,7 @@ main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
/*
|
||||
* Exit with error if file system is mounted.
|
||||
* Exit with error if filesystem is mounted.
|
||||
*/
|
||||
static void
|
||||
check_mounted(const char *fname, mode_t mode)
|
||||
@ -904,7 +904,7 @@ usage(void)
|
||||
fprintf(stderr,
|
||||
"usage: newfs_msdos [ -options ] special [disktype]\n");
|
||||
fprintf(stderr, "where the options are:\n");
|
||||
fprintf(stderr, "\t-N don't create file system: "
|
||||
fprintf(stderr, "\t-N don't create filesystem: "
|
||||
"just print out parameters\n");
|
||||
fprintf(stderr, "\t-B get bootstrap from file\n");
|
||||
fprintf(stderr, "\t-F FAT type (12, 16, or 32)\n");
|
||||
@ -918,13 +918,13 @@ usage(void)
|
||||
fprintf(stderr, "\t-e root directory entries\n");
|
||||
fprintf(stderr, "\t-f standard format\n");
|
||||
fprintf(stderr, "\t-h drive heads\n");
|
||||
fprintf(stderr, "\t-i file system info sector\n");
|
||||
fprintf(stderr, "\t-i filesystem info sector\n");
|
||||
fprintf(stderr, "\t-k backup boot sector\n");
|
||||
fprintf(stderr, "\t-m media descriptor\n");
|
||||
fprintf(stderr, "\t-n number of FATs\n");
|
||||
fprintf(stderr, "\t-o hidden sectors\n");
|
||||
fprintf(stderr, "\t-r reserved sectors\n");
|
||||
fprintf(stderr, "\t-s file system size (sectors)\n");
|
||||
fprintf(stderr, "\t-s filesystem size (sectors)\n");
|
||||
fprintf(stderr, "\t-u sectors/track\n");
|
||||
exit(1);
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ quota files named
|
||||
.Pa quota.user
|
||||
and
|
||||
.Pa quota.group
|
||||
which are located at the root of the associated file system.
|
||||
which are located at the root of the associated filesystem.
|
||||
These defaults may be overridden in
|
||||
.Pa /etc/fstab .
|
||||
If a file is not present,
|
||||
|
@ -101,7 +101,7 @@ struct fileusage {
|
||||
#define FUHASH 1024 /* must be power of two */
|
||||
struct fileusage *fuhead[MAXQUOTAS][FUHASH];
|
||||
|
||||
int aflag; /* all file systems */
|
||||
int aflag; /* all filesystems */
|
||||
int gflag; /* check group quotas */
|
||||
int uflag; /* check user quotas */
|
||||
int vflag; /* verbose */
|
||||
|
@ -49,7 +49,7 @@
|
||||
.Sh DESCRIPTION
|
||||
.Sy Power fail and crash recovery .
|
||||
Normally, the system will reboot itself at power-up or after crashes.
|
||||
An automatic consistency check of the file systems will be performed,
|
||||
An automatic consistency check of the filesystems will be performed,
|
||||
and unless this fails, the system will resume multi-user operations.
|
||||
.Pp
|
||||
.Sy Cold starts .
|
||||
@ -180,7 +180,7 @@ Boot flags:
|
||||
.Bl -tag -width "-CXX" -compact
|
||||
.It Fl a
|
||||
during kernel initialization,
|
||||
ask for the device to mount as the root file system.
|
||||
ask for the device to mount as the root filesystem.
|
||||
.It Fl C
|
||||
boot from CDROM.
|
||||
.It Fl c
|
||||
@ -244,10 +244,10 @@ options are automatically set.
|
||||
pause after each attached device during the device probing phase.
|
||||
.It Fl r
|
||||
use the statically configured default for the device containing the
|
||||
root file system
|
||||
root filesystem
|
||||
(see
|
||||
.Xr config 8 ) .
|
||||
Normally, the root file system is on the device
|
||||
Normally, the root filesystem is on the device
|
||||
that the kernel was loaded from.
|
||||
.It Fl s
|
||||
boot into single-user mode; if the console is marked as
|
||||
|
@ -59,7 +59,7 @@ The
|
||||
.Nm halt
|
||||
and
|
||||
.Nm
|
||||
utilities flush the file system cache to disk, send all running processes
|
||||
utilities flush the filesystem cache to disk, send all running processes
|
||||
a
|
||||
.Dv SIGTERM
|
||||
(and subsequently a
|
||||
@ -98,11 +98,11 @@ or
|
||||
.Nm halt
|
||||
and log this themselves.
|
||||
.It Fl n
|
||||
The file system cache is not flushed.
|
||||
The filesystem cache is not flushed.
|
||||
This option should probably not be used.
|
||||
.It Fl q
|
||||
The system is halted or restarted quickly and ungracefully, and only
|
||||
the flushing of the file system cache is performed (if the
|
||||
the flushing of the filesystem cache is performed (if the
|
||||
.Fl n
|
||||
is not specified).
|
||||
This option should probably not be used.
|
||||
|
@ -197,7 +197,7 @@ main(int argc, char *argv[])
|
||||
runcmdshell();
|
||||
break;
|
||||
/*
|
||||
* Incremental restoration of a file system.
|
||||
* Incremental restoration of a filesystem.
|
||||
*/
|
||||
case 'r':
|
||||
setup();
|
||||
@ -234,7 +234,7 @@ main(int argc, char *argv[])
|
||||
dumpsymtable(symtbl, (long)1);
|
||||
break;
|
||||
/*
|
||||
* Resume an incremental file system restoration.
|
||||
* Resume an incremental filesystem restoration.
|
||||
*/
|
||||
case 'R':
|
||||
initsymtable(symtbl);
|
||||
|
@ -38,7 +38,7 @@
|
||||
.Sh NAME
|
||||
.Nm restore ,
|
||||
.Nm rrestore
|
||||
.Nd "restore files or file systems from backups made with dump"
|
||||
.Nd "restore files or filesystems from backups made with dump"
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Fl i
|
||||
@ -87,7 +87,7 @@ The
|
||||
.Nm
|
||||
command performs the inverse function of
|
||||
.Xr dump 8 .
|
||||
A full backup of a file system may be restored and
|
||||
A full backup of a filesystem may be restored and
|
||||
subsequent incremental backups layered on top of it.
|
||||
Single files and
|
||||
directory subtrees may be restored from full or partial
|
||||
@ -190,12 +190,12 @@ a full restore
|
||||
flag below).
|
||||
This is useful if the restore has been interrupted.
|
||||
.It Fl r
|
||||
Restore (rebuild a file system).
|
||||
The target file system should be made pristine with
|
||||
Restore (rebuild a filesystem).
|
||||
The target filesystem should be made pristine with
|
||||
.Xr newfs 8 ,
|
||||
mounted and the user
|
||||
.Xr cd Ns 'd
|
||||
into the pristine file system
|
||||
into the pristine filesystem
|
||||
before starting the restoration of the initial level 0 backup.
|
||||
If the
|
||||
level 0 restores successfully, the
|
||||
@ -229,7 +229,7 @@ in conjunction with
|
||||
.Xr newfs 8
|
||||
and
|
||||
.Xr dump 8 ,
|
||||
may be used to modify file system parameters
|
||||
may be used to modify filesystem parameters
|
||||
such as size or block size.
|
||||
.It Fl t
|
||||
The names of the specified files are listed if they occur
|
||||
@ -278,7 +278,7 @@ tries to determine the media block size dynamically.
|
||||
Normally,
|
||||
.Nm
|
||||
will try to determine dynamically whether the dump was made from an
|
||||
old (pre-4.4) or new format file system. The
|
||||
old (pre-4.4) or new format filesystem. The
|
||||
.Fl c
|
||||
flag disables this check, and only allows reading a dump in the old
|
||||
format.
|
||||
@ -381,19 +381,19 @@ Most checks are self-explanatory or can ``never happen''.
|
||||
Common errors are given below.
|
||||
.Pp
|
||||
.Bl -tag -width Ds -compact
|
||||
.It Converting to new file system format.
|
||||
A dump tape created from the old file system has been loaded.
|
||||
It is automatically converted to the new file system format.
|
||||
.It Converting to new filesystem format.
|
||||
A dump tape created from the old filesystem has been loaded.
|
||||
It is automatically converted to the new filesystem format.
|
||||
.Pp
|
||||
.It <filename>: not found on tape
|
||||
The specified file name was listed in the tape directory,
|
||||
but was not found on the tape.
|
||||
This is caused by tape read errors while looking for the file,
|
||||
and from using a dump tape created on an active file system.
|
||||
and from using a dump tape created on an active filesystem.
|
||||
.Pp
|
||||
.It expected next file <inumber>, got <inumber>
|
||||
A file that was not listed in the directory showed up.
|
||||
This can occur when using a dump created on an active file system.
|
||||
This can occur when using a dump created on an active filesystem.
|
||||
.Pp
|
||||
.It Incremental dump too low
|
||||
When doing incremental restore,
|
||||
@ -441,7 +441,7 @@ information passed between incremental restores.
|
||||
.Sh BUGS
|
||||
.Nm Restore
|
||||
can get confused when doing incremental restores from
|
||||
dumps that were made on active file systems.
|
||||
dumps that were made on active filesystems.
|
||||
.Pp
|
||||
A level zero dump must be done after a full restore.
|
||||
Because restore runs in user code,
|
||||
|
@ -325,7 +325,7 @@ nodeupdates(char *name, ino_t ino, int type)
|
||||
|
||||
/*
|
||||
* A previously non-existent file.
|
||||
* Add it to the file system, and request its extraction.
|
||||
* Add it to the filesystem, and request its extraction.
|
||||
* If it is a directory, create it immediately.
|
||||
* (Since the name is unused there can be no conflict)
|
||||
*/
|
||||
|
@ -36,6 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)restore.h 8.3 (Berkeley) 9/13/94
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -55,7 +56,7 @@ extern int yflag; /* always try to recover from tape errors */
|
||||
*/
|
||||
extern char *dumpmap; /* map of inodes on this dump tape */
|
||||
extern char *usedinomap; /* map of inodes that are in use on this fs */
|
||||
extern ino_t maxino; /* highest numbered inode in this file system */
|
||||
extern ino_t maxino; /* highest numbered inode in this filesystem */
|
||||
extern long dumpnum; /* location of the dump on this tape */
|
||||
extern long volno; /* current volume being read */
|
||||
extern long ntrec; /* number of TP_BSIZE records per tape block */
|
||||
@ -67,7 +68,7 @@ extern int oldinofmt; /* reading tape with old format inodes */
|
||||
extern int Bcvt; /* need byte swapping on inodes and dirs */
|
||||
|
||||
/*
|
||||
* Each file in the file system is described by one of these entries
|
||||
* Each file in the filesystem is described by one of these entries
|
||||
*/
|
||||
struct entry {
|
||||
char *e_name; /* the current name of this entry */
|
||||
|
@ -41,7 +41,7 @@ static const char rcsid[] =
|
||||
|
||||
/*
|
||||
* These routines maintain the symbol table which tracks the state
|
||||
* of the file system being restored. They provide lookup by either
|
||||
* of the filesystem being restored. They provide lookup by either
|
||||
* name or inode number. They also provide for creation, deletion,
|
||||
* and renaming of entries. Because of the dynamic nature of pathnames,
|
||||
* names should not be saved, but always constructed just before they
|
||||
@ -66,7 +66,7 @@ static const char rcsid[] =
|
||||
/*
|
||||
* The following variables define the inode symbol table.
|
||||
* The primary hash table is dynamically allocated based on
|
||||
* the number of inodes in the file system (maxino), scaled by
|
||||
* the number of inodes in the filesystem (maxino), scaled by
|
||||
* HASHFACTOR. The variable "entry" points to the hash table;
|
||||
* the variable "entrytblsize" indicates its size (in entries).
|
||||
*/
|
||||
|
@ -214,7 +214,7 @@ setup(void)
|
||||
fprintf(stderr, "Tape is not a dump tape\n");
|
||||
done(1);
|
||||
}
|
||||
fprintf(stderr, "Converting to new file system format.\n");
|
||||
fprintf(stderr, "Converting to new filesystem format.\n");
|
||||
}
|
||||
if (pipein) {
|
||||
endoftapemark.s_spcl.c_magic = cvtflag ? OFS_MAGIC : NFS_MAGIC;
|
||||
|
@ -95,7 +95,7 @@ instead of sending signal to
|
||||
.It Fl n
|
||||
If the
|
||||
.Fl o
|
||||
is specified, prevent the file system cache from being flushed by passing
|
||||
is specified, prevent the filesystem cache from being flushed by passing
|
||||
.Fl n
|
||||
option to
|
||||
.Xr halt 8
|
||||
|
@ -46,7 +46,7 @@ static const char rcsid[] =
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
* tunefs: change layout parameters to an existing file system.
|
||||
* tunefs: change layout parameters to an existing filesystem.
|
||||
*/
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
@ -219,7 +219,7 @@ main(argc, argv)
|
||||
err(1, "%s", special);
|
||||
}
|
||||
if (fs == NULL && (st.st_mode & S_IFMT) == S_IFDIR)
|
||||
errx(10, "%s: unknown file system", special);
|
||||
errx(10, "%s: unknown filesystem", special);
|
||||
getsb(&sblock, special);
|
||||
|
||||
if (pflag) {
|
||||
@ -343,7 +343,7 @@ main(argc, argv)
|
||||
if (mount("ufs", fs->fs_file,
|
||||
stfs.f_flags | MNT_UPDATE | MNT_RELOAD, &args) < 0)
|
||||
err(9, "%s: reload", special);
|
||||
warnx("file system reloaded");
|
||||
warnx("filesystem reloaded");
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
|
@ -224,14 +224,14 @@ umountall(char **typelist)
|
||||
strcmp(fs->fs_type, FSTAB_RO) &&
|
||||
strcmp(fs->fs_type, FSTAB_RQ))
|
||||
continue;
|
||||
/* Ignore unknown file system types. */
|
||||
/* Ignore unknown filesystem types. */
|
||||
if (getvfsbyname(fs->fs_vfstype, &vfc) == -1)
|
||||
continue;
|
||||
if (checkvfsname(fs->fs_vfstype, typelist))
|
||||
continue;
|
||||
|
||||
/*
|
||||
* We want to unmount the file systems in the reverse order
|
||||
* We want to unmount the filesystems in the reverse order
|
||||
* that they were mounted. So, we save off the file name
|
||||
* in some allocated memory, and then call recursively.
|
||||
*/
|
||||
@ -507,7 +507,7 @@ getmntname(const char *fromname, const char *onname,
|
||||
err(1, "calloc");
|
||||
}
|
||||
/*
|
||||
* We want to get the file systems in the reverse order
|
||||
* We want to get the filesystems in the reverse order
|
||||
* that they were mounted. Mounted and unmounted filesystems
|
||||
* are marked or unmarked in a table called 'mntcheck'.
|
||||
* Unmount(const char *dir, int flags) does only take the
|
||||
|
@ -137,7 +137,7 @@ main(int argc, char *argv[], char *envp[])
|
||||
exit(1);
|
||||
}
|
||||
} else if ((errno != ENOENT) /* not "not there", */
|
||||
&&(errno != EROFS)) { /* and not read-only file system */
|
||||
&&(errno != EROFS)) { /* and not read-only filesystem */
|
||||
fprintf(stderr,
|
||||
"Can't open %s: %s (%d)\n",
|
||||
historyfile,
|
||||
|
@ -1656,7 +1656,7 @@ state. Use the
|
||||
.Ic start
|
||||
command to first bring them to a consistent state. In the case of striped and
|
||||
concatenated plexes, however, it does not normally cause problems to leave them
|
||||
inconsistent: when using a volume for a file system or a swap partition, the
|
||||
inconsistent: when using a volume for a filesystem or a swap partition, the
|
||||
previous contents of the disks are not of interest, so they may be ignored.
|
||||
If you want to take this risk, use the
|
||||
.Cm setupstate
|
||||
@ -1853,7 +1853,7 @@ and
|
||||
.Dq Li f
|
||||
may be used as
|
||||
.Em UFS
|
||||
file systems or
|
||||
filesystems or
|
||||
.Em ccd
|
||||
partitions. Partition
|
||||
.Dq Li b
|
||||
@ -2006,8 +2006,8 @@ can access the complete address space of the volume even if a drive fails.
|
||||
.It
|
||||
You want to set up
|
||||
.Nm
|
||||
to allow more concurrent access to a file system. In many cases, access to a
|
||||
file system is limited by the speed of the disk. By spreading the volume across
|
||||
to allow more concurrent access to a filesystem. In many cases, access to a
|
||||
filesystem is limited by the speed of the disk. By spreading the volume across
|
||||
multiple disks, you can increase the throughput in multi-access environments.
|
||||
This technique shows little or no performance improvement in single-access
|
||||
environments.
|
||||
@ -2280,7 +2280,7 @@ reasonably small number of fragmented requests with a stripe size between 256 kB
|
||||
and 512 kB; with correct RAID implementations there is no obvious reason not to
|
||||
increase the size to 2 or 4 MB on a large disk.
|
||||
.Pp
|
||||
When choosing a stripe size, consider that most current UFS file systems have
|
||||
When choosing a stripe size, consider that most current UFS filesystems have
|
||||
cylinder groups 32 MB in size. If you have a stripe size and number of disks
|
||||
both of which are a power of two, it is probable that all superblocks and inodes
|
||||
will be placed on the same subdisk, which will impact performance significantly.
|
||||
@ -2302,11 +2302,11 @@ speed, the transfer time depends only on the total size of the transfer.
|
||||
.Pp
|
||||
Consider a typical news article or web page of 24 kB, which will probably be
|
||||
read in a single I/O. Take disks with a transfer rate of 6 MB/s and an average
|
||||
positioning time of 8 ms, and a file system with 4 kB blocks. Since it's 24 kB,
|
||||
positioning time of 8 ms, and a filesystem with 4 kB blocks. Since it's 24 kB,
|
||||
we don't have to worry about fragments, so the file will start on a 4 kB
|
||||
boundary. The number of transfers required depends on where the block starts:
|
||||
it's (S + F - 1) / S, where S is the stripe size in file system blocks, and F is
|
||||
the file size in file system blocks.
|
||||
it's (S + F - 1) / S, where S is the stripe size in filesystem blocks, and F is
|
||||
the file size in filesystem blocks.
|
||||
.Bl -enum
|
||||
.It
|
||||
Stripe size of 4 kB. You'll have 6 transfers. Total subsystem load: 48 ms
|
||||
@ -2344,8 +2344,8 @@ volume:
|
||||
Striping improves performance for multiple access only, since it increases the
|
||||
chance of individual requests being on different drives.
|
||||
.It
|
||||
Concatenating UFS file systems across multiple drives can also improve
|
||||
performance for multiple file access, since UFS divides a file system into
|
||||
Concatenating UFS filesystems across multiple drives can also improve
|
||||
performance for multiple file access, since UFS divides a filesystem into
|
||||
cylinder groups and attempts to keep files in a single cylinder group. In
|
||||
general, it is not as effective as striping.
|
||||
.It
|
||||
@ -2382,17 +2382,17 @@ state of one of the objects),
|
||||
writes up to 128 kB of updated configuration to each drive. The larger the
|
||||
number of drives, the longer this takes.
|
||||
.El
|
||||
.Ss Creating file systems on Vinum volumes
|
||||
.Ss Creating filesystems on Vinum volumes
|
||||
You do not need to run
|
||||
.Xr disklabel 8
|
||||
before creating a file system on a
|
||||
before creating a filesystem on a
|
||||
.Nm
|
||||
volume. Just run
|
||||
.Xr newfs 8 .
|
||||
Use the
|
||||
.Fl v
|
||||
option to state that the device is not divided into partitions. For example, to
|
||||
create a file system on volume
|
||||
create a filesystem on volume
|
||||
.Pa mirror ,
|
||||
enter the following command:
|
||||
.Pp
|
||||
@ -2410,8 +2410,8 @@ will suffer when the configuration changes. Use appropriately sized subdisks in
|
||||
It is possible to increase the size of a concatenated
|
||||
.Nm
|
||||
plex, but currently the size of striped and RAID-5 plexes cannot be increased.
|
||||
Currently the size of an existing UFS file system also cannot be increased, but
|
||||
it is planned to make both plexes and file systems extensible.
|
||||
Currently the size of an existing UFS filesystem also cannot be increased, but
|
||||
it is planned to make both plexes and filesystems extensible.
|
||||
.El
|
||||
.Sh STATE MANAGEMENT
|
||||
Vinum objects have the concept of
|
||||
@ -2472,7 +2472,7 @@ This behaviour of
|
||||
.Nm ccd
|
||||
is an invitation to shoot yourself in the foot: with
|
||||
.Nm ccd
|
||||
you can easily overwrite a file system.
|
||||
you can easily overwrite a filesystem.
|
||||
.Nm
|
||||
will not permit this.
|
||||
.Pp
|
||||
|
@ -96,7 +96,7 @@ All existing file names converted to lower case.
|
||||
Newly created file gets a lower case under OS2 name space.
|
||||
This is the default when mounting volumes with DOS name space.
|
||||
.It L
|
||||
Same as 'l' but file system tries to be case insensitive.
|
||||
Same as 'l' but filesystem tries to be case insensitive.
|
||||
May not work well.
|
||||
.It n
|
||||
No case conversion is performed.
|
||||
@ -109,7 +109,7 @@ This is the default when mounting volumes with OS2 name space.
|
||||
All existing file names converted to upper case.
|
||||
Newly created file gets an upper case under OS2 name space.
|
||||
.It U
|
||||
Same as 'u' but file system tries to be case insensitive.
|
||||
Same as 'u' but filesystem tries to be case insensitive.
|
||||
May not work well.
|
||||
.El
|
||||
.It Fl f Ar mode , Fl d Ar mode
|
||||
|
@ -83,7 +83,7 @@ some diskless workstations do mount requests for
|
||||
their swapfiles and expect them to be regular files.
|
||||
Since a regular file cannot be specified in
|
||||
.Pa /etc/exports ,
|
||||
the entire file system in which the swapfiles resides
|
||||
the entire filesystem in which the swapfiles resides
|
||||
will have to be exported with the
|
||||
.Fl alldirs
|
||||
flag.
|
||||
|
@ -919,8 +919,8 @@ get_exportlist()
|
||||
|
||||
/*
|
||||
* And delete exports that are in the kernel for all local
|
||||
* file systems.
|
||||
* XXX: Should know how to handle all local exportable file systems
|
||||
* filesystems.
|
||||
* XXX: Should know how to handle all local exportable filesystems
|
||||
* instead of just "ufs".
|
||||
*/
|
||||
num = getmntinfo(&fsp, MNT_NOWAIT);
|
||||
@ -1780,7 +1780,7 @@ do_mount(ep, grp, exflags, anoncrp, dirp, dirplen, fsb)
|
||||
* Maybe I should just use the fsb->f_mntonname path instead
|
||||
* of looping back up the dirp to the mount point??
|
||||
* Also, needs to know how to export all types of local
|
||||
* exportable file systems and not just "ufs".
|
||||
* exportable filesystems and not just "ufs".
|
||||
*/
|
||||
while (mount(fsb->f_fstypename, dirp,
|
||||
fsb->f_flags | MNT_UPDATE, (caddr_t)&args) < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user