Solved shrinking the partition (freeBSD)

if I use gparted on linux side to srink the freeBSD UFS partition down will the system still work okey dokey when it gets booted into.
 
No, but I don't think GParted will let you do it anyway. UFS isn't shrinkable and GParted will only offer to shrink filesystems that do support the feature.
 
As far as I know growfs(8) can only expand a filesystem, not shrink it.
I've done this before. I looked through my notes but couldn't find exactly how I did it. You can do this with a trick. Even the manual doesn't mention anything for shrink, but it is possible..
If I'm not mistaken, something like that:

growfs -s new_size partition

If I find that thread in the forum I will post it.
 
thank you eveyone, yeah I discovered gparted can't do that so I just ended up swiping some off the other part of the sdd. plaied it better safe then sorry.
 
I've done this before. I looked through my notes but couldn't find exactly how I did it. You can do this with a trick. Even the manual doesn't mention anything for shrink, but it is possible..
If I'm not mistaken, something like that:

growfs -s new_size partition

If I find that thread in the forum I will post it.
1738337847497.png

It didn't work for me.
 
It didn't work for me.
I found this in my notes for UFS file system (alternative way using dump and restore)

unmount the filesystem:
sudo umount /mnt/oldfs

create a backup of your files:
sudo dump -0Lauf /path/to/backup.dump /dev/ada0pX

delete old file system:
sudo newfs -U /dev/ada0pX

create a new filesystem:
sudo newfs -U /dev/ada0pX

restore data:
sudo mount /dev/ada0pX /mnt/newfs

sudo cd /mnt/newfs

restore data:
sudo restore -rf /path/to/backup.dump

sudo umount /mnt/newfs
 
I found this in my notes for UFS file system (alternative way using dump and restore)

unmount the filesystem:
sudo umount /mnt/oldfs

-- 8< ---


I'd solve it in the good old-fashioned way.

# newfs -U /dev/new-fs
# mount /dev/new-fs /mnt
# cd /mnt
# dump -0a -f - /dev/old-fs | restore -rf -

1738344804577.png
 
Back
Top