freebsd-dev/sbin/newfs
Kirk McKusick 524ee1107f Create a .snap directory mode 770 group operator in the root of
a new filesystem. Dump and fsck will create snapshots in this
directory rather than in the root for two reasons:

1) For terabyte-sized filesystems, the snapshot may require many
   minutes to build. Although the filesystem will not be suspended
   during most of the snapshot build, the snapshot file itself is
   locked during the entire snapshot build period. Thus, if it is
   accessed during the period that it is being built, the process
   trying to access it will block holding its containing directory
   locked. If the snapshot is in the root, the root will lock and
   the system will come to a halt until the snapshot finishes. By
   putting the snapshot in a subdirectory, it is out of the likely
   path of any process traversing through the root and hence much
   less likely to cause a lock race to the root.

2) The dump program is usually run by a non-root user running with
   operator group privilege. Such a user is typically not permitted
   to create files in the root of a filesystem. By having a directory
   in group operator with group write access available, such a user
   will be able to create a snapshot there. Having the dump program
   create its snapshot in a subdirectory below the root will benefit
   from point (1) as well.

Sponsored by:   DARPA & NAI Labs.
2003-11-04 07:34:32 +00:00
..
Makefile Convert newfs to libufs (really). Solves one real issue with previous 2003-02-11 03:06:45 +00:00
mkfs.c Create a .snap directory mode 770 group operator in the root of 2003-11-04 07:34:32 +00:00
newfs.8 s/disklabel/bsdlabel where needed. 2003-10-11 08:24:07 +00:00
newfs.c Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
newfs.h Correct lines incorrectly added to the copyright message. Add missing period. 2003-02-14 21:08:14 +00:00
ref.test Fix the -R flag so that it provides sequential "random" numbers 2003-02-22 23:26:11 +00:00
runtest00.sh Add the undocumented -R option to disable randomness for regression-testing. 2002-03-19 21:05:29 +00:00
runtest01.sh Add the undocumented -R option to disable randomness for regression-testing. 2002-03-19 21:05:29 +00:00