summaryrefslogtreecommitdiffstats
path: root/sbin/geom
Commit message (Collapse)AuthorAgeFilesLines
* MFgraid/head:mav2011-03-244-0/+368
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new RAID GEOM class, that is going to replace ataraid(4) in supporting various BIOS-based software RAIDs. Unlike ataraid(4) this implementation does not depend on legacy ata(4) subsystem and can be used with any disk drivers, including new CAM-based ones (ahci(4), siis(4), mvs(4), ata(4) with `options ATA_CAM`). To make code more readable and extensible, this implementation follows modular design, including core part and two sets of modules, implementing support for different metadata formats and RAID levels. Support for such popular metadata formats is now implemented: Intel, JMicron, NVIDIA, Promise (also used by AMD/ATI) and SiliconImage. Such RAID levels are now supported: RAID0, RAID1, RAID1E, RAID10, SINGLE, CONCAT. For any all of these RAID levels and metadata formats this class supports full cycle of volume operations: reading, writing, creation, deletion, disk removal and insertion, rebuilding, dirty shutdown detection and resynchronization, bad sector recovery, faulty disks tracking, hot-spare disks. For Intel and Promise formats there is support multiple volumes per disk set. Look graid(8) manual page for additional details. Co-authored by: imp Sponsored by: Cisco Systems, Inc. and iXsystems, Inc.
* MFgraid/head r217014:mav2011-03-242-42/+161
| | | | | | | | Make `geom XXX list` and `geom XXX status` outputs more consistent: Add -a options to print all geoms, not only ones with providers. Add -g option for `status` to report geom's names, not provider's. Make `status` by default report provider's status (if present), not geom's. Make `status` report consumer's statuses, not only "synchronized" field.
* Fix grammar.ae2011-03-121-2/+2
| | | | | Pointed out: Ben Kaduk MFC after: 2 weeks
* Document GEOM_PART_EBR_COMPAT option.ae2011-03-121-1/+7
| | | | MFC after: 2 weeks
* Change example to not be controversial.pjd2011-03-091-6/+8
| | | | | | | | I'm sorry to anyone who felt offended by this. PR: docs/155385 Reported by: maga_lena <mirto@riseup.net> MFC after: 1 week
* It is better to sometimes have not aligned columns thanae2011-03-081-6/+0
| | | | | | often have wrapped lines. MFC after: 2 weeks
* Add -p option to `gpart show` command to show provider's names ofae2011-03-082-14/+40
| | | | | | | partitions instead of partition's indexes. This may be useful with GPT partitioning scheme or EBR without GEOM_PART_EBR_COMPAT option. MFC after: 2 weeks
* Document the "bios-boot" partition type.ae2011-01-281-1/+6
| | | | MFC after: 2 weeks
* Added a blurb about thin provisioning, fixed some formatting.ivoras2011-01-241-2/+6
|
* o Somehow I revert Dd macro in the previous commit.maxim2011-01-131-1/+1
| | | | Re-revert it.
* o Start each sentence on a new line. No content changes.maxim2011-01-131-19/+25
| | | | | Suggested by: jhb MFC after: 1 week
* o Typo fixes.maxim2011-01-131-2/+2
| | | | | | PR: docs/153933 Submitted by: jpaetzel@, Warren Block MFC after: 1 week
* Fix formatting of cross-references.brucec2011-01-121-2/+2
|
* Fix sorting of cross-references.brucec2011-01-121-1/+1
|
* Fix cross-reference to gvinum(8).brucec2011-01-121-1/+1
|
* Fix up the grammar.ae2011-01-121-3/+3
| | | | | PR: docs/153933 MFC after: 3 days
* Sector size can not be greater than MAXPHYS. Since GRAID3 calculatesae2011-01-121-0/+5
| | | | | | | | sector size from user-specified block size, report to user about big blocksize. PR: kern/147851 MFC after: 1 week
* Check number of arguments before trying to read arg0. This prevents accessae2010-12-211-0/+2
| | | | to arg0 and dumping core when `gpart bootcode` called without arguments.
* Revert r216473.obrien2010-12-161-1/+1
| | | | | WARNS=6 causes "warning: cast increases required alignment of target type" on arm, ia64, mips, and sparc64.
* Bump WARNS to 6.obrien2010-12-161-1/+1
|
* GEOM virstor .so does not need libmd.obrien2010-12-161-3/+0
|
* Rename the generic "CLASS" to the more specific "GEOM_CLASS".obrien2010-12-154-4/+3
| | | | | | While I'm here remove redundancy and inconsistencies. Obtained from: Juniper Networks
* Rename the generic "CLASS" to the more specific "GEOM_CLASS".obrien2010-12-1516-32/+26
| | | | | | While I'm here remove redundancy and inconsistencies. Obtained from: Juniper Networks
* * Recommend a overwrite of whole geli provider before use.delphij2010-12-031-2/+6
| | | | | | | * Correct a typo while I'm there. Reviewed by: pjd MFC after: 2 weeks
* Fix some more warnings found by clang.brucec2010-11-223-8/+8
|
* Add SIGINT handler to `gpart restore` action.ae2010-11-221-1/+20
| | | | MFC after: 1 week
* Always dump partition labels with `gpart backup`, but `gpart restore`ae2010-11-222-29/+32
| | | | | | | | | does restore them only when -l option is specified [1]. Make number of entries field in backup format optional. Document -l and -r options of `gpart show` action. Suggested by: pjd [1] MFC after: 1 week
* Add to gpart(8) an ability to backup partition table andae2010-11-202-1/+371
| | | | | | | | restore it from given backup. Discussed with: geom@ Approved by: kib (mentor) MFC after: 1 week
* Use fprintf(stderr) instead of gctl_error() to print a warning about toopjd2010-10-261-2/+2
| | | | | | | | big sector size. When gctl error is set gctl_has_param() always returns 'false', which prevents geli(8) from finding some arguments and also masks an error, which is generates in such case. MFC after: 3 days
* Reimplemented "gpart destroy -F". Now it does all work in kernel.ae2010-10-252-84/+99
| | | | | | | | | | | | | | | | | This was needed for recover implementation. Implement the recover command for GPT. Now GPT will marked as corrupt when any of three types of corruption will be detected: 1. Damaged primary GPT header or table 2. Damaged secondary GPT header or table 3. Secondary header is not located in the last LBA Marked GPT becomes read-only. Any changes with corrupt table are prohibited. Only "destroy" and "recover" commands are allowed. Discussed with: geom@ (mostly silence) Tested by: Ilya A. Arhipov Approved by: mav (mentor) MFC after: 2 weeks
* Bring in geli suspend/resume functionality (finally).pjd2010-10-202-1/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change if you wanted to suspend your laptop and be sure that your encryption keys are safe, you had to stop all processes that use file system stored on encrypted device, unmount the file system and detach geli provider. This isn't very handy. If you are a lucky user of a laptop where suspend/resume actually works with FreeBSD (I'm not!) you most likely want to suspend your laptop, because you don't want to start everything over again when you turn your laptop back on. And this is where geli suspend/resume steps in. When you execute: # geli suspend -a geli will wait for all in-flight I/O requests, suspend new I/O requests, remove all geli sensitive data from the kernel memory (like encryption keys) and will wait for either 'geli resume' or 'geli detach'. Now with no keys in memory you can suspend your laptop without stopping any processes or unmounting any file systems. When you resume your laptop you have to resume geli devices using 'geli resume' command. You need to provide your passphrase, etc. again so the keys can be restored and suspended I/O requests released. Of course you need to remember that 'geli suspend' won't clear file system cache and other places where data from your geli-encrypted file system might be present. But to get rid of those stopping processes and unmounting file system won't help either - you have to turn your laptop off. Be warned. Also note, that suspending geli device which contains file system with geli utility (or anything used by 'geli resume') is not very good idea, as you won't be able to resume it - when you execute geli(8), the kernel will try to read it and this read I/O request will be suspended.
* Replace strlen(_PATH_DEV) with sizeof(_PATH_DEV) - 1.ae2010-10-099-21/+21
| | | | | | Suggested by: kib Approved by: kib (mentor) MFC after: 5 days
* mdoc: drop redundant .Pp and .LP callsuqs2010-10-082-4/+0
| | | | They have no effect when coming in pairs, or before .Bl/.Bd
* 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)
* - 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
* 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
* 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
* Fix indent.pjd2010-09-191-7/+7
|
* 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
|
OpenPOWER on IntegriCloud