summaryrefslogtreecommitdiffstats
path: root/sbin
Commit message (Collapse)AuthorAgeFilesLines
* Decrease report interval to 5 seconds, as this also means we will check forpjd2010-10-041-1/+1
| | | | | | signals every 5 seconds and not every 10 seconds as before. MFC after: 3 days
* hook_check() is now only used to report about long-running hooks, so thepjd2010-10-043-13/+3
| | | | | | argument is redundant, remove it. MFC after: 3 days
* We can't mask ignored signal, so install dummy signal hander for SIGCHLD beforepjd2010-10-041-0/+11
| | | | | | | | | | masking it. This fixes bogus reports about hooks running for too long and other problems related to garbage-collecting child processes. Reported by: Mikolaj Golub <to.my.trociny@gmail.com> MFC after: 3 days
* Fix printing of the "rw" mount option in fstab(5) format (-p option).jh2010-09-301-12/+12
| | | | | | | | | fstab(5) format requires that one of "rw", "rq" or "ro" is always specified. PR: bin/123021 Reviewed by: keramida, rodrigc MFC after: 2 weeks
* Document recently added GPT attributes (bootme, bootonce, bootfailed) andpjd2010-09-281-1/+104
| | | | | | | list other schemes attributes. Reviewed by: simon, rpaulo MFC after: 2 weeks
* Remove superfluous word from "gpart bootcode" usage message.ae2010-09-261-1/+1
| | | | Approved by: kib (mentor)
* Plug memory leak on fork(2) failure.pjd2010-09-261-0/+1
| | | | | Submitted by: Mikolaj Golub <to.my.trociny@gmail.com> MFC after: 3 days
* - Add support for loading passphrase from a file (-J and -j options).pjd2010-09-252-122/+257
| | | | | | | | | | This is especially useful for things like installers, where regular geli prompt can't be used. - Add support for specifing multiple -K or -k options, so there is no need to cat all keyfiles and read them from standard input. Requested by: Kris Moore <kris@pcbsd.org>, thompsa MFC after: 2 weeks
* Reported problem:mckusick2010-09-241-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Large (60GB) filesystems created using "newfs -U -O 1 -b 65536 -f 8192" show incorrect results from "df" for free and used space when mounted immediately after creation. fsck on the new filesystem (before ever mounting it once) gives a "SUMMARY INFORMATION BAD" error in phase 5. This error hasn't occurred in any runs of fsck immediately after "newfs -U -b 65536 -f 8192" (leaving out the "-O 1" option). Solution: The default UFS1 superblock is located at offset 8K in the filesystem partition; the default UFS2 superblock is located at offset 64K in the filesystem partition. For UFS1 filesystems with a blocksize of 64K, the first alternate superblock resides at 64K which is the the location used for the default UFS2 superblock. By default, the system first checks for a valid superblock at the default location for a UFS2 filoesystem. For a UFS1 filesystem with a blocksize of 64K, there is a valid UFS1 superblock at this location. Thus, even though it is expected to be a backup superblock, the system will use it as its default superblock. So, we have to ensure that all the statistcs on usage are correct in this first alternate superblock as it is the superblock that will actually be used. While tracking down this problem, another limitation of UFS1 became evident. For UFS1, the number of inodes per cylinder group is stored in an int16_t. Thus the maximum number of inodes per cylinder group is limited to 2^15 - 1. This limit can easily be exceeded for block sizes of 32K and above. Thus when building UFS1 filesystems, newfs must limit the number of inodes per cylinder group to 2^15 - 1. Reported by: Guy Helmer<ghelmer@palisadesys.com> Followup by: Bruce Cran <brucec@freebsd.org> PR: 107692 MFC after: 4 weeks
* Implement "force" (-F) option for gpart destroy verb.ae2010-09-242-15/+106
| | | | | | | | | | | | This option doesn't passed to kernel and handled in user-space. With -F option gpart creates new "delete" request for each partition in table. Each request has flags="X" that disables auto-commit feature. Last request is the original "destroy" request. It has own flags and can have disabled or enabled auto-commit feature. If error is occurred when deleting partitions, then new "undo" request is created and all changes will be rolled back. Approved by: kib (mentor)
* - Simplify code by using g_*() API.pjd2010-09-232-83/+62
| | | | | | | | - Don't use u_char and u_int in userland. - Change 'unsigned' to 'unsigned int'. - Update copyright years. MFC after: 1 week
* Update copyright years.pjd2010-09-231-1/+1
| | | | MFC after: 1 week
* Document AES-XTS.pjd2010-09-231-17/+34
| | | | MFC after: 1 week
* - When trashing metadata, repeat overwrite kern.geom.eli.overwrites times.pjd2010-09-231-12/+64
| | | | | | - Flush write cache after each write. MFC after: 1 week
* - Use g_*() API when doing backups.pjd2010-09-231-18/+12
| | | | | | - fsync() created filed. MFC after: 1 week
* Because we first write metadata into new place and then trash old place wepjd2010-09-231-0/+4
| | | | | | | don't want situation where old size is equal to new size, as we will trash newly written metadata. MFC after: 1 week
* - Make use of g_*() API.pjd2010-09-231-18/+13
| | | | | | - Flush cache after writing metadata. MFC after: 1 week
* Simplify code a bit by using g_*() API from libgeom.pjd2010-09-231-19/+10
| | | | MFC after: 1 week
* Switch to sigprocmask(2) API also in the main process and secondary process.pjd2010-09-224-61/+44
| | | | | | | | | This way the primary process inherits signal mask from the main process, which fixes a race where signal is delivered to the primary process before configuring signal mask. Reported by: Mikolaj Golub <to.my.trociny@gmail.com> MFC after: 3 days
* Assert that descriptor numbers are sane.pjd2010-09-221-0/+4
| | | | MFC after: 3 days
* Fix possible deadlock where worker process sends an event to the main processpjd2010-09-222-8/+26
| | | | | | | | | | | while the main process sends control message to the worker process, but worker process hasn't started control thread yet, because it waits for reply from the main process. The fix is to start the control thread before sending any events. Reported and fix suggested by: Mikolaj Golub <to.my.trociny@gmail.com> MFC after: 3 days
* Fix descriptor leaks: when child exits, we have to close control and eventpjd2010-09-223-9/+17
| | | | | | socket pairs. We did that only in one case out of three. MFC after: 3 days
* If we are unable to receive control message is most likely because the mainpjd2010-09-221-1/+2
| | | | | | process died. Instead of entering infinite loop, terminate. MFC after: 3 days
* Sort includes.pjd2010-09-221-1/+1
| | | | MFC after: 3 days
* Add a notice to the man page that batteries should be installed.ed2010-09-211-0/+1
|
* Add a geli resize subcommand to resize encrypted filesystems priorbrian2010-09-202-5/+187
| | | | | | | | | | | | | | | to growing the filesystem. Refuse to attach providers where the metadata provider size is wrong. This makes post-boot attaches behave consistently with pre-boot attaches. Also refuse to restore metadata to a provider of the wrong size without the new -f switch. The new -f switch forces the metadata restoration despite the provider size, and updates the provider size in the restored metadata to the correct value. Helped by: pjd Reviewed by: pjd
* Add __dead2 to functions that we know they are going to exit.pjd2010-09-202-3/+3
| | | | MFC after: 3 days
* Unbreak the build on strong-aligned architectures (arm, ia64).marcel2010-09-201-1/+1
| | | | | | | Casting from (char *) to (struct ufs1_dinode *) changes the alignment requirement of the pointer and GCC does not know that the pointer is adequately aligned (due to malloc(3)), and warns about it. Cast to (void *) first to by-pass the check.
* Fix indent.pjd2010-09-191-7/+7
|
* Revise r197763 which fixes filesystem corruption when extendingbrian2010-09-191-14/+13
| | | | | | | | | | | | into un-zeroed storage. The original patch was questioned by Kirk as it forces the filesystem to do excessive work initialising inodes on first use, and was never MFC'd. This change mimics the newfs(8) approach of zeroing two blocks of inodes for each new cylinder group. Reviewed by: mckusick MFC after: 3 weeks
* nextboot: warn about limitations of /boot/nextboot.conf on ZFSavg2010-09-171-0/+8
| | | | MFC after: 1 week
* Make the format of "Real Memory" and "Virtual Memory" lines morezec2010-09-161-2/+2
| | | | | | consistent with the rest of sysctl vm.vmtotal output. MFC after: 3 days
* Add support for identifying a journaled root filesystem.brian2010-09-161-1/+2
| | | | | | Fix support for identifying the given /dev/vinum/root example. MFC after: 3 weeks
* GPART_PARAM_INDEX is now G_TYPE_NUMBER.pjd2010-09-151-8/+4
|
* Remove dead code.pjd2010-09-141-15/+6
|
* Remove now unused G_TYPE_ASCNUM.pjd2010-09-142-3/+1
|
* - Change all places where G_TYPE_ASCNUM is used to G_TYPE_NUMBER.pjd2010-09-141-8/+8
| | | | | It turns out the new type wasn't really needed. - Reorganize code a little bit.
* Update two last places where "arg0" should be used instead of "geom".pjd2010-09-141-2/+2
|
* Synchronize newfs(8) manual with code.gjb2010-09-141-3/+4
| | | | | | | | PR: 61716 Submitted by: Radim Kolar <hsn at netmag cz> Patch by: arundel Approved by: keramida (mentor) MFC after: 1 week
* All gpart(8) subcommands apart from the 'bootcode' subcommand handlepjd2010-09-141-0/+2
| | | | | given geom/provider names with and without /dev/ prefix. Teach the 'bootcode' subcommand to handle /dev/<foo> names as well.
* Remove dot which shouldn't be here, as err(3) will attach error messagepjd2010-09-141-1/+1
| | | | at the end of the string.
* Introduce special G_VAL_OPTIONAL define, which when given in value fieldpjd2010-09-143-11/+12
| | | | | tells geom(8) to ignore it when it is not given and don't try to obtain default value.
* Add G_TYPE_MULTI flag, which when set for the given option, willpjd2010-09-132-6/+40
| | | | | | | allow the option to be specified multiple times. This will help to implement things like passing multiple keyfiles to geli(8) instead of cat(1)ing them all into stdin and reading from there using one '-k -' option.
* - Remove gc_argname field. It was introduced for gpart(8), but if Ipjd2010-09-1317-265/+240
| | | | | | | understand everything correctly, we don't really need it. - Provide default numeric value as strings. This allows to simplify a lot of code. - Bump version number.
* - Allow to specify value as const pointers.pjd2010-09-136-51/+50
| | | | - Make optional string values always an empty string.
* MF tbemd: Move to using Makefile.arch to select what to build.imp2010-09-138-56/+43
| | | | Reviewed by: arch@ (no objection)
* Rewording and typo fixes in newfs(8).gjb2010-09-121-3/+3
| | | | | | | | PR: 150490 Submitted by: Eitan Adler <foreignuser at eitanadler com> Additional fixes by: Warren Block <wblock at wonkity com>, keramida Approved by: keramida (mentor) MFC after: 1 week
* Document dhclient-enter-hooks and dhclient-exit-hooks and mentionbrian2010-09-061-1/+25
| | | | | | | | how to configure dhclient to clear the interface of IP numbers prior to configuring it. PR: 149351 MFC after: 2 weeks
* Handle geli-encrypted root disk devices.brian2010-09-061-2/+7
| | | | MFC after: 2 weeks
* Allowed unionfs to use whiteout not supporting file system asdaichi2010-09-051-3/+4
| | | | | | | | | | | | | | | | | | | | upper layer. Until now, unionfs prevents to use that kind of file system as upper layer. This time, I changed to allow that kind of file system as upper layer. By this change, you can use whiteout not supporting file system (e.g., especially for tmpfs) as upper layer. It's very useful for combination of tmpfs as upper layer and read only file system as lower layer. By difinition, without whiteout support from the file system backing the upper layer, there is no way that delete and rename operations on lower layer objects can be done. EOPNOTSUPP is returned for this kind of operations as generated by VOP_WHITEOUT() along with any others which would make modifica tions to the lower layer, such as chmod(1). This change is suggested by ed. Submitted by: ed
OpenPOWER on IntegriCloud