UFS Help to resize partition / without data loss with gpart

I need to resize the / without losing data, I believe I will need to do this with a FreeBSD LIVE distro, but I'm concerned about the lack of experience with gpart.

Below is the disk partition table >
Code:
root@FreeBSD:~ # gpart show ada1
=>       63  468862065  ada1  MBR  (224G)
        63          1        - free -  (512B)
        64      81920     1  efi  (40M)
     81984    7956480     2  freebsd  [active]  (3.8G)       (I need to resize this partition to 20GB)
   8038464  460823662     3  freebsd  (220G)                (I have 160GB free on this partition)
 468862126          2        - free -  (1.0K)

=>      0  7956480  ada1s2  BSD  (3.8G)
        0       16          - free -  (8.0K)
       16  7956464       1  freebsd-ufs  (3.8G)

=>        0  460823662  ada1s3  BSD  (220G)
          0         16          - free -  (8.0K)
         16  460823646       1  freebsd-ufs  (220G)

Thanks in advance,
Marcelo
 
Last edited by a moderator:
You can add space at the end of the partition and use growfs to grow the file system.
And please make backups. You might need them. If not now, maybe later.
 
You can add space at the end of the partition and use growfs to grow the file system.
And please make backups. You might need them. If not now, maybe later.
Hi Crivens, how are you?

So I actually checked this out at ( https://people.freebsd.org/~rodrigc/doc/handbook/disks-growing.html )
But I have some doubts >
1- Is it necessary to decrease the size of the /home partition to free up space for the / partition?

2- By reducing the size of the /home partition the freed space would be available at the end of the /home partition right? If this is the scenario then I would need to move the /home partition to the end and thus leave the continuous space for use by the / ? Or does Gpart make this allocation automatically?

3- Doing the procedure from a live FreeBSD DVD I don't need to worry about it ? > sysctl kern.geom.debugflags=16

4- How can I check if my disk is using 4096 bytes (4K) in each sector?

Sorry for the amount of questions, I'm new to the FreeBSD world and I ran into these problems!

Best wishes and thanks again,
Marcelo
 
Back
Top