1. Boot into single user mode.
2.
fsck -p && mount -a
3.
umount /home
4.
dump 0af /usr/home.dump /home
Now, at this point we're actually going to destroy the existing /home partition, so make sure the dump worked correctly first. In this case, my home partition was on /dev/ad0p5.
5.
gjournal load
6.
gjournal label -f /dev/ad0p5
I didn't bother specifying a -s argument, so the default journal size of 1 GB will be in effect.
7.
newfs -J -L home /dev/ad0p5.journal
8. At this point, /dev/ufs/home should reappear. Edit /etc/fstab and find the line that mounts /home and change 'rw' to 'rw,async' since with journaling enabled we'll be using an asynchronous mount.
9.
mount /home
. Now type 'mount
' and make sure that both 'asynchronous' and 'journal' show up in the list of mount options for /home.10.
cd /home && restore -rf /usr/home/dump
11. Edit /boot/loader.conf and add a line that says
geom_journal_load="YES"
12. reboot.
So why bother? Because now /home will not need to have an fsck performed on it ever again.
No comments:
Post a Comment