# FreeBSD UFS - Resize Partitions



## schafferm (May 26, 2013)

Hi *a*ll*,*

Noob here on *Free*BSD (I'm normally on Ubuntu).I want to re-partition my existing 1 TB *d*rives, that already have data on them.  I know I can do this with gparted, however how would I do this with FreeBSD (Sade, gpart)? Also will any of these allow me to shrink the existing partition (50%) used and create a new partition without damaging the existing data? I'd appreciate a quick run-through of what tool you'd use and any special considerations.

Thanks!


----------



## kpa (May 26, 2013)

I would use gparted. The reasoning is that it's a tailor made tool for the job and probably knows more about resizing Linux/NTFS/etc partitions than native FreeBSD tools.


----------



## schafferm (May 26, 2013)

*GParted for UFS*

I was under the impression that gparted can't handle UFS file systems, is that wrong?


----------



## wblock@ (May 26, 2013)

Be very careful, "resize" means more than one thing.  gpart(8) can resize partitions, but it will not resize the filesystems on them.  I doubt there is a utility out there to resize UFS filesystems other than growfs(8).

The normal way to resize a UFS filesystem is to back up with dump(8), delete and recreate the partition, then newfs(8) and restore(8).  Not a lot of extra steps, since a backup should always be done first anyway.


----------



## schafferm (May 27, 2013)

*Resize*

Ok. So assuming I do this and than partition my 1 TB drive into two 500 GB drives, can I use use two partitions on the same device for mirroring with ZFS or is that a really dumb idea since a drive crash would destroy both partitions possibly?


----------



## wblock@ (May 27, 2013)

Not just that, but head contention will make it slower than a single drive.  So no, don't do that.


----------

