Background
I have been rebuilding a small home NAS. This server represents my first 'real' foray into the world of server administration and it has taught me quite a bit already. Originally, the thing was setup using FreeNAS on a thumb drive with 3 magnetic disks configured in a raidz1. I have since resolved to migrate the entire system to FreeBSD 9.0 (STABLE) for greater control of the system as well as to simply learn how to "do it myself". Everything has been going well, with the operating system successfully installed and updated (thumb drive again, rw, with access times and a few other things disabled to prevent flash abuse).
Now I am working on setting up my magnetic disk storage, again using a raidz1. To this end, I have copied all of the files that I want to persist to external storage. While exploring the various zfs commands, I discovered that the original zpool from the FreeNAS installation was still visible. I imported and upgraded the pool using
# zpool import ZFS1 tank //Import the original zpool 'ZFS1', renaming it 'tank'
# zpool upgrade tank //FreeNAS uses an older ZFS version, FreeBDS is v28
# zfs mount tank
and was able to view my files again. Gravy. After poking around a bit, I decided that I still wanted to blow away the old pool and start fresh. I issued
# zfs umount tank
# zpool destroy tank
which completed without error. Now I am looking to recreate a 'clean' raidz1 with these disks.
Question
Before I created the new raidz1, I did some poking around in /dev
, just to see what I could learn. I wanted to examine the magnetic disks that were used in the array, but the output I got seems odd to me. Worse, googling doesn't really explain what is going on. The disks are listed as follows:
# ls -l ad*
lrwxr-xr-x 1 root wheel 4 Aug 12 20:50 ad2 -> ada2
lrwxr-xr-x 1 root wheel 4 Aug 12 20:50 ad4 -> ada0
lrwxr-xr-x 1 root wheel 4 Aug 12 20:50 ad6 -> ada1
crw-r----- 1 root operator 0, 96 Aug 12 20:50 ada0
crw-r----- 1 root operator 0, 98 Aug 12 20:50 ada1
crw-r----- 1 root operator 0, 100 Aug 12 20:50 ada2
I know that I created three virtual disks in FreeNAS while setting up the raid which is where I suspect the links came from. My questions about this are as follows:
From searching on how symlinks work, it is my understanding that a symlink is just a file that links one item to another. If that is the case, why aren't the ada* devices listed with the 'l' attribute and the actual hardware devices listed with another attribute (perhaps block device)?
These links are an artifact of the previous setup that I do not think are necessary. Can they be deleted? If so, how (kinda afraid to go removing things willy-nilly; see the last link in the references section)? Will deleting the
ad*
entries implicitly remove theada*
nodes, as they now refer to a link that doesn't exist? Or do I have this backwards?Which are the actual hardware devices? As I mentioned in my previous question, I would think the
ad*
nodes would be a character device or something similar and theada*
nodes would be the link files.Finally, I know that there is definitely be some variance based on setup and individual preferences but what is the 'accepted' way to have my SATA devices configured for a simple raidz1? All of this symlink business seems like overkill for a simple home NAS.
My apologies for the long post, but I have been trying for quite some time to understand this. Thank you in advance for your time and assistance.