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..As far as I know growfs(8) can only expand a filesystem, not shrink it.
growfs -s new_size partition
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.
I found this in my notes for UFS file system (alternative way using dump and restore)It didn't work for me.
sudo umount /mnt/oldfs
sudo dump -0Lauf /path/to/backup.dump /dev/ada0pX
sudo newfs -U /dev/ada0pX
sudo newfs -U /dev/ada0pX
sudo mount /dev/ada0pX /mnt/newfs
sudo cd /mnt/newfs
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< ---