diff options
author | obrien <obrien@FreeBSD.org> | 2013-02-08 16:10:16 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2013-02-08 16:10:16 +0000 |
commit | 3028e3f8aba938dfd0bf9fda987b8a72140b8027 (patch) | |
tree | b2f038222ff8a70f687652441df00d2b564c8abe /sbin/geom | |
parent | 952a6d5a7cd3d3f9007acfa06805262fc04a105f (diff) | |
parent | 1d08d5f677c1dfa810e381073590adbae19cc69f (diff) | |
download | FreeBSD-src-3028e3f8aba938dfd0bf9fda987b8a72140b8027.zip FreeBSD-src-3028e3f8aba938dfd0bf9fda987b8a72140b8027.tar.gz |
Sync with HEAD.
Diffstat (limited to 'sbin/geom')
-rw-r--r-- | sbin/geom/class/journal/geom_journal_ufs.c | 4 | ||||
-rw-r--r-- | sbin/geom/class/part/gpart.8 | 63 | ||||
-rw-r--r-- | sbin/geom/class/raid/graid.8 | 3 | ||||
-rw-r--r-- | sbin/geom/class/raid3/geom_raid3.c | 2 | ||||
-rw-r--r-- | sbin/geom/class/raid3/graid3.8 | 6 |
5 files changed, 51 insertions, 27 deletions
diff --git a/sbin/geom/class/journal/geom_journal_ufs.c b/sbin/geom/class/journal/geom_journal_ufs.c index c847a88..07d1922 100644 --- a/sbin/geom/class/journal/geom_journal_ufs.c +++ b/sbin/geom/class/journal/geom_journal_ufs.c @@ -73,6 +73,6 @@ g_journal_ufs_using_last_sector(const char *prov) /* Provider size in 512 bytes blocks. */ psize = g_get_mediasize(prov) / DEV_BSIZE; /* File system size in 512 bytes blocks. */ - fssize = fsbtodb(fs, dbtofsb(fs, psize)); - return (psize == fssize); + fssize = fsbtodb(fs, fs->fs_size); + return (psize <= fssize); } diff --git a/sbin/geom/class/part/gpart.8 b/sbin/geom/class/part/gpart.8 index 7a91d3d..8843e53 100644 --- a/sbin/geom/class/part/gpart.8 +++ b/sbin/geom/class/part/gpart.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 19, 2012 +.Dd January 25, 2013 .Dt GPART 8 .Os .Sh NAME @@ -453,8 +453,14 @@ about its use. .El .\" ==== SHOW ==== .It Cm show -Show the current partition information of the specified geoms -or all geoms if none are specified. +Show current partition information for the specified geoms, or all +geoms if none are specified. +The default output includes the logical starting block of each +partition, the partition size in blocks, the partition index number, +the partition type, and a human readable partition size. +Block sizes and locations are based on the device's Sectorsize +as shown by +.Cm gpart list . Additional options include: .Bl -tag -width 10n .It Fl l @@ -801,34 +807,51 @@ Both types of bootstrap code are used to boot from the GUID Partition Table. First, a protective MBR is embedded into the first disk sector from the .Pa /boot/pmbr image. -It searches the GPT +It searches through the GPT for a .Cm freebsd-boot partition (see the .Sx "PARTITION TYPES" -section) in the GPT and runs the next bootstrap stage from it. +section) and runs the next bootstrap stage from it. The .Cm freebsd-boot partition should be smaller than 545 KB. +It can be located either before or after other +.Fx +partitions on the disk. There are two variants of bootstrap code to write to this partition: .Pa /boot/gptboot and .Pa /boot/gptzfsboot . .Pa /boot/gptboot is used to boot from UFS. -It searches +It searches through +.Cm freebsd-ufs +partitions in the GPT and boots from the first one with the +.Cm bootonce +attribute set. +If that attribute is not found, +.Pa /boot/gptboot +boots from the first .Cm freebsd-ufs -GPT partitions and starts +partition with the +.Cm bootme +attribute set. +If neither attribute is found, +.Pa /boot/gptboot +boots from the first +.Cm freebsd-ufs +partition. .Pa /boot/loader .Pq the third bootstrap stage -if found. -The +is loaded from the first partition that matches these conditions. .Pa /boot/gptzfsboot is used to boot from ZFS. -It searches +It searches through the GPT for .Cm freebsd-zfs -GPT partitions and starts +partitions, trying to detect ZFS pools. +After all pools are detected, .Pa /boot/zfsloader -if found. +is started from the first one found. .Pp The VTOC8 scheme does not support embedding bootstrap code. Instead, the 8 KBytes bootstrap code image @@ -919,7 +942,7 @@ and .Cm list will report about corrupt tables. .Pp -If the size of the device has changed (e.g.\& volume expansion) the +If the size of the device has changed (e.g.,\& volume expansion) the secondary GPT header will no longer be located in the last sector. This is not a metadata corruption, but it is dangerous because any corruption of the primary GPT will lead to loss of the partition table. @@ -939,7 +962,7 @@ The GEOM PART class can detect the same partition table visible through different GEOM providers, and some of them will be marked as corrupt. Be careful when choosing a provider for recovery. If you choose incorrectly you can destroy the metadata of another GEOM class, -e.g.\& GEOM MIRROR or GEOM LABEL. +e.g.,\& GEOM MIRROR or GEOM LABEL. .Sh SYSCTL VARIABLES The following .Xr sysctl 8 @@ -979,14 +1002,14 @@ This may break a mirrored volume and lead to data damage. Exit status is 0 on success, and 1 if the command fails. .Sh EXAMPLES Create a GPT scheme on -.Pa ad0 : +.Pa ada0 : .Bd -literal -offset indent -/sbin/gpart create -s GPT ad0 +/sbin/gpart create -s GPT ada0 .Ed .Pp Embed GPT bootstrap code into a protective MBR: .Bd -literal -offset indent -/sbin/gpart bootcode -b /boot/pmbr ad0 +/sbin/gpart bootcode -b /boot/pmbr ada0 .Ed .Pp Create a dedicated @@ -1011,15 +1034,15 @@ aligned on a 64 kB boundary without the need to specify an explicit offset or alignment. The boot partition itself is aligned on a 4 kB boundary. .Bd -literal -offset indent -/sbin/gpart add -b 40 -s 88 -t freebsd-boot ad0 -/sbin/gpart bootcode -p /boot/gptboot -i 1 ad0 +/sbin/gpart add -b 40 -s 88 -t freebsd-boot ada0 +/sbin/gpart bootcode -p /boot/gptboot -i 1 ada0 .Ed .Pp Create a 512MB-sized .Cm freebsd-ufs partition to contain a UFS filesystem from which the system can boot. .Bd -literal -offset indent -/sbin/gpart add -s 512M -t freebsd-ufs ad0 +/sbin/gpart add -s 512M -t freebsd-ufs ada0 .Ed .Pp Create an MBR scheme on diff --git a/sbin/geom/class/raid/graid.8 b/sbin/geom/class/raid/graid.8 index 630cd01..ed33e00 100644 --- a/sbin/geom/class/raid/graid.8 +++ b/sbin/geom/class/raid/graid.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 13, 2012 +.Dd January 16, 2013 .Dt GRAID 8 .Os .Sh NAME @@ -274,7 +274,6 @@ complete it there. Do not run GEOM RAID class on migrating volumes under pain of possible data corruption! .Sh 2TiB BARRIERS -Promise metadata format does not support disks above 2TiB. NVIDIA metadata format does not support volumes above 2TiB. .Sh SYSCTL VARIABLES The following diff --git a/sbin/geom/class/raid3/geom_raid3.c b/sbin/geom/class/raid3/geom_raid3.c index 3f037cd..cd0aa65 100644 --- a/sbin/geom/class/raid3/geom_raid3.c +++ b/sbin/geom/class/raid3/geom_raid3.c @@ -76,7 +76,7 @@ struct g_command class_commands[] = { { "insert", G_FLAG_VERBOSE, NULL, { { 'h', "hardcode", NULL, G_TYPE_BOOL }, - { 'n', "number", NULL, G_TYPE_NUMBER }, + { 'n', "number", G_VAL_OPTIONAL, G_TYPE_NUMBER }, G_OPT_SENTINEL }, "[-hv] <-n number> name prov" diff --git a/sbin/geom/class/raid3/graid3.8 b/sbin/geom/class/raid3/graid3.8 index f396cc3..a82d388 100644 --- a/sbin/geom/class/raid3/graid3.8 +++ b/sbin/geom/class/raid3/graid3.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 5, 2010 +.Dd January 15, 2012 .Dt GRAID3 8 .Os .Sh NAME @@ -53,7 +53,7 @@ .Nm .Cm insert .Op Fl hv -.Fl n Ar number +.Op Fl n Ar number .Ar name .Ar prov .Nm @@ -171,6 +171,8 @@ Add the given component to the existing array, if one of the components was removed previously with the .Cm remove command or if one component is missing and will not be connected again. +If no number is given, new component will be added instead of first missed +component. .Pp Additional options include: .Bl -tag -width ".Fl h" |