Report this

What is the reason for this report?

FreeBSD growfs: operation not permitted (aka: enlarge your partition)

Posted on May 18, 2015

Hi there,

I recently upgrade my Droplet from 20 to 30 GiB space, yet I’m unable to resize my filesystem space in order to fill the new hard disk size. I have a FreeBSD 10.1 droplet.

I followed the instruction described by the official FreeBSD handbook: disk growing.

I executed the commands from single user mode.

The error occurs at the very final step:

growfs /dev/vtbd0p3
Operation not permitted

Anyone is aware of special actions to take care for DigitalOcean droplets? Someone managed to increase the disk space?

Thank you very much.

Best Regards,

Nicholas



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

You need to be in single user mode (init 0). You have to do it from the control panel console, You can’t do it from an ssh session. (Which makes sense, since single-user mode disables outside access.)

A useful page is in the FreeBSD Handbook: https://www.freebsd.org/doc/handbook/disks-growing.html (note especially if your current partition is not the last one)

The steps I took: (my disk was vtbd0, partition to grow was #3)

  1. snapshot
  2. droplet resize
  3. restore snapshot
  4. gpart show, gpart recover
  5. gpart resize -i [partition] -a 4k -s [full size] [disk id, in my case vtbd0]
  6. single user mode (init 1)
  7. growfs /dev/vtbd0p3
  8. reboot to multiuser mode (init 6, or just a normal reboot)

Hope that helps someone!

But I really do growfs /dev/vtbd0p3 at SSH , and it really work. I’ve tried reboot again after “growfs” and it still show new size of droplet (I change from 20GB to 40GB)

Thanks for the comment of “veeblefetzer” I just use

ns1:/usr/local/www>df -h

Filesystem         Size    Used   Avail Capacity  Mounted on
/dev/gpt/rootfs     19G    9.6G    8.3G    54%    /
devfs              1.0K    1.0K      0B   100%    /dev
fdescfs            1.0K    1.0K      0B   100%    /dev/fd

ns1:/usr/local/www>growfs /dev/gpt/rootfs growfs: requested size 20GB is not larger than the current filesystem size 20GB

ns1:/usr/local/www>growfs /dev/vtbd0p3 growfs: requested size 20GB is not larger than the current filesystem size 20GB

ns1:/usr/local/www>service growfs onestart

Growing root partition to fill device
vtbd0 recovered
vtbd0p3 resized
super-block backups (for fsck_ffs -b #) at:
 42314112, 43596352, 44878592, 46160832, 47443072, 48725312, 50007552, 51289792, 52572032, 53854272,
 55136512, 56418752, 57700992, 58983232, 60265472, 61547712, 62829952, 64112192, 65394432, 66676672,
 67958912, 69241152, 70523392, 71805632, 73087872, 74370112, 75652352, 76934592, 78216832, 79499072,
 80781312

ns1:/usr/local/www>df -h

Filesystem         Size    Used   Avail Capacity  Mounted on
/dev/gpt/rootfs     38G    9.6G     25G    28%    /
devfs              1.0K    1.0K      0B   100%    /dev
fdescfs            1.0K    1.0K      0B   100%    /dev/fd

ns1:/usr/local/www>gpart show

=>       3  83886075  vtbd0  GPT  (40G)
         3        32      1  freebsd-boot  (16K)
        35   2097152      2  freebsd-swap  (1.0G)
   2097187  81788891      3  freebsd-ufs  (39G)

ns1:/usr/local/ww>gpart status

Name  Status  Components
vtbd0p1      OK  vtbd0
vtbd0p2      OK  vtbd0
vtbd0p3      OK  vtbd0

and it really easy wonderful work…easy until you unbelievable (I use FreeBSD 10.2)

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.