Hi
I have followed the RAID guide and I have had a few experiences which doesn't fully correspond with the guide. http://www.freebsd.org/doc/en/books/handbook/geom-mirror.html (Creating a Mirror with an Existing Drive).
First, I experienced that unless you disabled the SU-J options for all UFS devices during bsdinstall, it would be difficult to dump the filesystems. I thought I could disable journaling and soft updates relatively easy by using tunefs in singleuser mode
[cmd=]tunefs -j disable <filesystem>[/cmd]
[cmd=]tunefs -n disable <filesystem>[/cmd]
This ultimately gave a bunch of errors and at this early point I just reinstalled and let bsdinstall take care of it. I naturally forgot to save the exact error messages, but some of them were messages saying it failed to update the super block (again, the exact message is lost). However, it also said that soft updates and journaling were disabled for the filesystem despite the 3-4 accompanying error messages. The problems with SU-J made any attempt to dump a filesystem fail:
Now because of bsdinstall I disabled as previously mentioned SU-J options on all filesystems and dump worked like a charm. Have any of you experienced this?
Now, when that was circumvented by bsdinstall, I hit another oddity later on:
At one point I thought I had shot myself in the foot. This was after doing the dump and restores of the filesystems on ada0 onto the RAID, i.e.
[cmd=]dump -C16 -b64 -0aL -f - /usr | (cd /mnt/usr && restore -rf -)[/cmd]
This, at least on my FreeBSD 9.1-RELEASE, will create a dump but not restore anything else than the restoresymboltable file. I wondered why my system crashed hard after dumping all the data until I realized that filesystems like /usr, /var etc. were empty.
I had to manually dump to a file and then restore the file to achieve a successful dump->restore, like this:
Mount mirror version of /usr:
[cmd=]$ mount /dev/mirror/gm0s1d /mnt[/cmd]
Dump /usr on ada0:
[cmd=]$ dump -C16 -b64 -0aL -f /mnt/usr.dmp /usr[/cmd]
Restore ada0 contents on mirrored version:
And then after waiting a long while, the /usr filesystem is successfully restored onto the mirror device.
Now, I got it working but I am still pondering a bit whether this could be related to changes (patches, natural evolution, etc) or simply me having done something wrong at some point. It is not really important since I got it working, but I'd still like to get some insight in why the commands in the guide only creates a symbolrestoretable file.
And hopefully someone else can use these experiences in the future to try out if they experience similar oddities.
All in all, I think that this little process despite the issues (which may entirely be to blame on myself) was a good learning to get a bit more comfortable with software RAIDs instead of simply setting a RAID up in your hardware RAID controller's BIOS.
I have followed the RAID guide and I have had a few experiences which doesn't fully correspond with the guide. http://www.freebsd.org/doc/en/books/handbook/geom-mirror.html (Creating a Mirror with an Existing Drive).
First, I experienced that unless you disabled the SU-J options for all UFS devices during bsdinstall, it would be difficult to dump the filesystems. I thought I could disable journaling and soft updates relatively easy by using tunefs in singleuser mode
[cmd=]tunefs -j disable <filesystem>[/cmd]
[cmd=]tunefs -n disable <filesystem>[/cmd]
This ultimately gave a bunch of errors and at this early point I just reinstalled and let bsdinstall take care of it. I naturally forgot to save the exact error messages, but some of them were messages saying it failed to update the super block (again, the exact message is lost). However, it also said that soft updates and journaling were disabled for the filesystem despite the 3-4 accompanying error messages. The problems with SU-J made any attempt to dump a filesystem fail:
Code:
$ dump -C16 -b64 -0aL -f - /usr | (cd /mnt/usr && restore -rf -)
mksnap_ffs: Cannot create snapshot //.snap/dump_snapshot: /: Snapshots are not yet supported when running with journaled soft updates: Operation not supported
dump: Cannot create //.snap/dump_snapshot: No such file or directory
Now because of bsdinstall I disabled as previously mentioned SU-J options on all filesystems and dump worked like a charm. Have any of you experienced this?
Now, when that was circumvented by bsdinstall, I hit another oddity later on:
At one point I thought I had shot myself in the foot. This was after doing the dump and restores of the filesystems on ada0 onto the RAID, i.e.
[cmd=]dump -C16 -b64 -0aL -f - /usr | (cd /mnt/usr && restore -rf -)[/cmd]
This, at least on my FreeBSD 9.1-RELEASE, will create a dump but not restore anything else than the restoresymboltable file. I wondered why my system crashed hard after dumping all the data until I realized that filesystems like /usr, /var etc. were empty.
I had to manually dump to a file and then restore the file to achieve a successful dump->restore, like this:
Mount mirror version of /usr:
[cmd=]$ mount /dev/mirror/gm0s1d /mnt[/cmd]
Dump /usr on ada0:
[cmd=]$ dump -C16 -b64 -0aL -f /mnt/usr.dmp /usr[/cmd]
Restore ada0 contents on mirrored version:
Code:
$ cd /mnt
$ restore -rf usr.dmp
And then after waiting a long while, the /usr filesystem is successfully restored onto the mirror device.
Now, I got it working but I am still pondering a bit whether this could be related to changes (patches, natural evolution, etc) or simply me having done something wrong at some point. It is not really important since I got it working, but I'd still like to get some insight in why the commands in the guide only creates a symbolrestoretable file.
And hopefully someone else can use these experiences in the future to try out if they experience similar oddities.
All in all, I think that this little process despite the issues (which may entirely be to blame on myself) was a good learning to get a bit more comfortable with software RAIDs instead of simply setting a RAID up in your hardware RAID controller's BIOS.