Bug 220391 - "gpart resize" = panic
Summary: "gpart resize" = panic
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-geom (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-30 19:08 UTC by mwlucas
Modified: 2019-04-12 00:33 UTC (History)
5 users (show)

See Also:


Attachments
crashinfo (192.94 KB, text/plain)
2017-06-30 19:08 UTC, mwlucas
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description mwlucas 2017-06-30 19:08:41 UTC
Created attachment 183957 [details]
crashinfo

storm~;gpart show da3
=>        40  1953525088  da3  GPT  (932G)
          40        1024    1  freebsd-boot  (512K)
        1064         984       - free -  (492K)
        2048    16777216    2  freebsd-swap  (8.0G)
    16779264    10485760    3  freebsd-ufs  (5.0G)
    27265024    10485760    4  freebsd-ufs  (5.0G)
    37750784   209715200    5  freebsd-ufs  (100G)
   247465984   209715200    6  freebsd-ufs  (100G)
   457181184  1496343944       - free -  (714G)

storm~;gpart resize -i 5 -s 50g da3

...and my SSH terminal goes away. Console drops to debugger. Enter "dump", "reset."
Comment 1 Edward Tomasz Napierala freebsd_committer freebsd_triage 2017-07-03 10:17:55 UTC
Could you try to update to a current 12-CURRENT (r320390 or newer) or 11-STABLE (r320562 or newer) and see if the problem persists?
Comment 2 Edward Tomasz Napierala freebsd_committer freebsd_triage 2017-07-03 10:20:28 UTC
Erm, please disregard the previous comment - I hadn't noticed your crashinfo; it's a different bug.
Comment 3 Mariusz Zaborski freebsd_committer freebsd_triage 2018-02-17 13:23:05 UTC
I'm trying to reproduce this bug, but I'm failing to do so.

Could you provide some more details for me:
- What is your root? (It was da3p5?)
- Was da3p5 mounted?
- da3p5 was clean or there was a UFS there? (Did you do newfs before resize?)
- How much data you had on da3p5?
Comment 4 James Qin 2018-03-08 13:45:24 UTC
(In reply to Mariusz Zaborski from comment #3)

I hit this bug as well, trying to resize da0p2 of a secondary disk that has 3 partitions.
Maybe I could answer your questions to help reproduce the error.

- What is your root? (It was da3p5?)
# my root is on another disk

- Was da3p5 mounted?
# the partition I tried to resize wasn't mounted

- da3p5 was clean or there was a UFS there? (Did you do newfs before resize?)
# newfs was ran on all the partitions on this disk before resize (freebsd-ufs)

- How much data you had on da3p5?
# the resize partition is new and empty with 50G of space

$ sudo gpart resize -i 2 -a 1M -s 25G da0

After kernel panic and rebooted manually, gpart in my case is showing resize was completed.

gpart show da0
=>       40  625142368  da0  GPT  (298G)
         40       2008       - free -  (1.0M)
       2048  209715200    1  freebsd-ufs  (100G)
  209717248   52428800    2  freebsd-ufs  (25G)
  262146048   52428800       - free -  (25G)
  314574848  310566912    3  freebsd-ufs  (148G)
  625141760        648       - free -  (324K)


I hope this helps.
Comment 5 mwlucas 2018-03-08 14:20:53 UTC
(sorry for the delay, back with this system now)

My root was ada0p1, a totally different drive.

Partition was not mounted.

It did have a UFS. I intended to growfs after resizing.
Comment 6 James Qin 2018-03-09 02:52:34 UTC
(In reply to James Qin from comment #4)

Follow up to the data I provided. After I tried expand the "shrink" partition gpart is showing the original size of 50G.

$ sudo gpart resize -i 2 -a 1M -s 35G da0
$ gpart show da0
=>       40  625142368  da0  GPT  (298G)
         40       2008       - free -  (1.0M)
       2048  209715200    1  freebsd-ufs  (100G)
  209717248  104857600    2  freebsd-ufs  (50G)
  314574848  310566912    3  freebsd-ufs  (148G)
  625141760        648       - free -  (324K)