Geom label lost after expanding partition
Kevin Oberman
kob6558 at gmail.com
Thu Aug 16 17:01:04 UTC 2012
On Thu, Aug 16, 2012 at 9:52 AM, Mark Saad <nonesuch at longcount.org> wrote:
> On Thu, Aug 16, 2012 at 12:30 PM, Kevin Oberman <kob6558 at gmail.com> wrote:
>> I have a GPT formatted disk where I recently expanded the size of a
>> partition. I used "gpart resize -i 6 ada1" first to expand the
>> partition to use the remaining free space and then growfs to modify
>> the FFS file system to use the full partition. This was all done in
>> single-user mode, of course, but when I enter "exit" to bring the
>> system up, it failed to mount /usr. This was because /dev/ufs/usr did
>> not exist!
>>
>> I assumed that gpart "lost" the label when it resized the partition
>> (which looked like a minor bug to me), but I have been completely
>> unable to re-create the label. I first tried tunefs and then glabel.
>> (The handbook says glabel can be used, though the glabel man page is
>> explicit that it can't.) Both complete with no errors, but neither
>> fixes the problem. I still don't see any /dev/usf/usr. "glabel list"
>> does not even list the geom.
>>
>> I do get the following GEOM messages in dmesg:
>> GEOM: ada1p2: invalid disklabel.
>> GEOM: ufsid/4df4feeda0ce6d5c: invalid disklabel.
>> GEOM: ufs/root: invalid disklabel.
>> GEOM: gpt/root: invalid disklabel.
>> GEOM: gptid/43f0eafd-ba3a-11e0-b70a-f0def166a11e: invalid disklabel.
>>
>> but /dev/ufs/root works fine to mount /, and I have always seen these
>> errors and have never been able to figure out what is causing them.
>>
>> I ended up entering the actual drive node (/dev/ada1p6) into my
>> fstab. This works, but brings back the old issues of having to edit
>> the fstab any time the drive is moved.
>>
>> Does anyone have any idea how to get the labels to work again? I'm not
>> even sure what tool displays what label as I can label with glabel,
>> tunefs, and newfs
>> --
>> R. Kevin Oberman, Network Engineer
>> E-mail: kob6558 at gmail.com
>> _______________________________________________
>> freebsd-stable at freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
>> To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"
>
> Kevin
> I believe the UFS or geom_labels are stuck at the end of the
> partition so , I can see how it would wipe them out if you resized it.
> Can you run "glabel status" and "glabel list" send us the results ?
Mark,
Thanks for looking at this.
I assume that "gpart resize" would take care of moving the geom
metadata to the new last sector of the geom, but glabel does not seem
to know it is there at all: (The partition in question is ada1p6.)
> glabel status
Name Status Components
ntfs/SYSTEM_DRV N/A ada0s1
ntfs/Windows7_OS N/A ada0s2
ntfs/Lenovo_Recovery N/A ada0s3
ntfs/Media N/A ada0s4
gptid/12c41a54-ba3a-11e0-b70a-f0def166a11e N/A ada1p1
ufs/root N/A ada1p2
ufs/var N/A ada1p4
ufs/tmp N/A ada1p5
gpt/Aux N/A ada1p7
gptid/aef508e9-bbbb-11e0-abd6-f0def166a11e N/A ada1p7
> glabel list
Geom name: ada0s1
Providers:
1. Name: ntfs/SYSTEM_DRV
Mediasize: 1258291200 (1.2G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 1048576
Mode: r1w1e1
secoffset: 0
offset: 0
seclength: 2457600
length: 1258291200
index: 0
Consumers:
1. Name: ada0s1
Mediasize: 1258291200 (1.2G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 1048576
Mode: r1w1e2
Geom name: ada0s2
Providers:
1. Name: ntfs/Windows7_OS
Mediasize: 113291296768 (105G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 1259339776
Mode: r1w1e1
secoffset: 0
offset: 0
seclength: 221272064
length: 113291296768
index: 0
Consumers:
1. Name: ada0s2
Mediasize: 113291296768 (105G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 1259339776
Mode: r1w1e2
Geom name: ada0s3
Providers:
1. Name: ntfs/Lenovo_Recovery
Mediasize: 16777216000 (15G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 2646605824
Mode: r1w1e1
secoffset: 0
offset: 0
seclength: 32768000
length: 16777216000
index: 0
Consumers:
1. Name: ada0s3
Mediasize: 16777216000 (15G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 2646605824
Mode: r1w1e2
Geom name: ada0s4
Providers:
1. Name: ntfs/Media
Mediasize: 188743629312 (175G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 2881518592
Mode: r1w1e1
secoffset: 0
offset: 0
seclength: 368639901
length: 188743629312
index: 0
Consumers:
1. Name: ada0s4
Mediasize: 188743629312 (175G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 2881518592
Mode: r1w1e2
Geom name: ada1p1
Providers:
1. Name: gptid/12c41a54-ba3a-11e0-b70a-f0def166a11e
Mediasize: 65536 (64k)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
secoffset: 0
offset: 0
seclength: 128
length: 65536
index: 0
Consumers:
1. Name: ada1p1
Mediasize: 65536 (64k)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
Geom name: ada1p2
Providers:
1. Name: ufs/root
Mediasize: 1073741824 (1.0G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e1
secoffset: 0
offset: 0
seclength: 2097152
length: 1073741824
index: 0
Consumers:
1. Name: ada1p2
Mediasize: 1073741824 (1.0G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e2
Geom name: ada1p4
Providers:
1. Name: ufs/var
Mediasize: 5231345664 (4.9G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e1
secoffset: 0
offset: 0
seclength: 10217472
length: 5231345664
index: 0
Consumers:
1. Name: ada1p4
Mediasize: 5231345664 (4.9G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e2
Geom name: ada1p5
Providers:
1. Name: ufs/tmp
Mediasize: 536870912 (512M)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e1
secoffset: 0
offset: 0
seclength: 1048576
length: 536870912
index: 0
Consumers:
1. Name: ada1p5
Mediasize: 536870912 (512M)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e2
Geom name: ada1p7
Providers:
1. Name: gpt/Aux
Mediasize: 659313926144 (614G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
secoffset: 0
offset: 0
seclength: 1287722512
length: 659313926144
index: 0
Consumers:
1. Name: ada1p7
Mediasize: 659313926144 (614G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
Geom name: ada1p7
Providers:
1. Name: gptid/aef508e9-bbbb-11e0-abd6-f0def166a11e
Mediasize: 659313926144 (614G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
secoffset: 0
offset: 0
seclength: 1287722512
length: 659313926144
index: 0
Consumers:
1. Name: ada1p7
Mediasize: 659313926144 (614G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
--
R. Kevin Oberman, Network Engineer
E-mail: kob6558 at gmail.com
More information about the freebsd-stable
mailing list