resizing root partition (root server) in FreeBSD rescue mode

Hi,

I ran in little trouble with my root server running OpenBSD. The standard installation gave me just about 5GB for OS. I'm trying to resize the root partition with my FreeBSD rescue mode (no OpenBSD rescue mode available).

Code:
root@mfsbsd:~ # gpart show ada0s4
=>         0  1953520001  ada0s4  BSD  (932G)
           0          63          - free -  (32K)
          63    10485760       1  freebsd-ufs  (5.0G)
    10485823     2097585       2  freebsd-swap  (1.0G)
    12583408  1940936593          - free -  (926G)

I'm trying to do it this way but always end up with a big mess.

Code:
root@mfsbsd:~ # gpart delete -i 2 ada0s4
ada0s4b deleted
root@mfsbsd:~ # gpart show ada0s4
=>         0  1953520001  ada0s4  BSD  (932G)
           0          63          - free -  (32K)
          63    10485760       1  freebsd-ufs  (5.0G)
    10485823  1943034178          - free -  (927G)

root@mfsbsd:~ # gpart resize -s 925G -i 1 ada0s4
ada0s4a resized
root@mfsbsd:~ # gpart show ada0s4
=>         0  1953520001  ada0s4  BSD  (932G)
           0          63          - free -  (32K)
          63  1939865600       1  freebsd-ufs  (925G)
  1939865663    13654338          - free -  (6.5G)

root@mfsbsd:~ # gpart add -s 1G -t freebsd-swap ada0s4
ada0s4b added
root@mfsbsd:~ # gpart add -t freebsd-ufs ada0s4
ada0s4d added
root@mfsbsd:~ # gpart show ada0s4
=>         0  1953520001  ada0s4  BSD  (932G)
           0          63          - free -  (32K)
          63  1939865600       1  freebsd-ufs  (925G)
  1939865663           1          - free -  (512B)
  1939865664     2097152       2  freebsd-swap  (1.0G)
  1941962816    11557184       4  freebsd-ufs  (5.5G)
  1953520000           1          - free -  (512B)

root@mfsbsd:~ # growfs -s 925G /dev/ada0s4a
growfs: superblock not recognized

And of course booting after this is not successful. :-(

I'm reading now for a few days various threads about this topic but can not find a solution.
Perhaps anyone of you can help me please?

Thanks, Sasu
 
Re: resizing root partition (root server) in FreeBSD rescue

Questions regarding OpenBSD should be asked on the OpenBSD forums.
 
Re: resizing root partition (root server) in FreeBSD rescue

Thx Thanks for your reply.

My problem is the Rescue Mode - I'm using at my root server - is FreeBSD 10.0. I'm afraid the guys at OpenBSD will tell me to ask someone at FreeBSD.... :-(
 
Re: resizing root partition (root server) in FreeBSD rescue

So what operating system are you running, FreeBSD or OpenBSD? And what exactly are you trying to do?
 
Re: resizing root partition (root server) in FreeBSD rescue

I'm running OpenBSD and trying to resize my root partition. Because OpenBSD is always a little bit slower with new things there is no way to resize the root partition while running the OS. I have to do this from my Rescue Mode (of the server). Because it is a rented root server I can just choose between a list of Operating Systems for the Rescue Mode (list: Linux 32bit, Linux 64bit, FreeBSD 32bit, FreeBSD 64bit, vKVM). I booted the server in Rescue Mode with FreeBSD 64bit as OS.

Now I'm trying to resize my root partition in rescue mode. Perhaps it is a mistake to do it this way? I hope you can understand my problem.

With regards, sash
 
Re: resizing root partition (root server) in FreeBSD rescue

sasu said:
I'm running OpenBSD and trying to resize my root partition. Because OpenBSD is always a little bit slower with new things there is no way to resize the root partition while running the OS.
Please ask on the OpenBSD forums how to do this.
 
Back
Top