UFS How to increase UFS partitions

Hello to everyone!
I have decided to increase disk space for my FreeBSD partitions at home.
I have Windows and FreeBSD installed in one disk ada0.

Now I have such picture:
1. NFTS disk C
2. NTFS extended disk (D, E)
3. Free space 50 G - which I want to use
4. My current FreeBSD partition

I decreased space in Extended disk and left 50 free G before my current FreeBSD partition.

Code:
root@initr0 ~> gpart show /dev/ada0
=>       63  625142385  ada0  MBR  (298G)
         63       1985        - free -  (993K)
       2048     102400     1  ntfs  (50M)
     104448  102807552     2  ntfs  (49G)
  102912000        390        - free -  (195K)
  102912390  229060218     3  ebr  (109G)
  331972608  105668608        - free -  (50G) 
  437641216  186646528     4  freebsd  [active]  (89G)
  624287744     854704        - free -  (417M)

Questions
1. is it possible to move my current FreeBSD partitions where I have free space and resize (for example /usr) partition?
2. if first step is not possible - how to create another UFS partition?

thanks!
 
Yes to need to move the FreeBSD partition to -free - (50G) at location 331972608
Then gpart resize and then growfs.

As you stated you could create a new UFS partition in that 50G free and copy everything over to new partition then delete 89G partition and expand the new 50G one to full disk.
That only works if 89G partition is not >50G used.
 
gpart resize uses an INDEX number to reference partitions.
Notice your UFS partition is #4 INDEX number above from gpart show.
gpart resize -i4 ada0 Using no --size flag here uses rest of disk.
Resizing it, after using the gparted LIVECD to move partition, should be done in single user mode.

Step One in this whole evolution is to do a fsck on partition. Make sure what you are working on is OK.
 
Back
Top