ZFS terminology queston

If I do a zpool create testpool raidz ada0 ada1 ada2 this creates a pool named testpool and it is created from a nameless vdev consisting of ada0, ada1 and ada2. Is my above statement correct?

Bill
 
Pretty much.

I don't know what you mean by 'nameless vdev' though. I'm not aware of any way to 'name' a vdev. When you view the configuration of your pool with zpool status, the vdev will show as raidz1-0, as it's the first (counting from 0) RAID-Z1 vdev in the pool. I would just say a pool named testpool, containing a single RAID-Z1 vdev of ada{0,1,2}.
 
bnorton916 said:
If I do a zpool create testpool raidz ada0 ada1 ada2 this creates a pool named testpool and it is created from a nameless vdev consisting of ada0, ada1 and ada2. Is my above statement correct?
I'd suggest labeling the drives with glabel and then creating the pool with label/disk0, label/disk1, etc. (assuming that you name your disks disk0, disk1, etc.). That way if you move them to a different controller, they will still have the same names in the ZFS pool.
 
I would not label them using glabel, for me it was nothing but trouble. I always use gpart to label and create the disks. The -b 2048 sets the start point on disk also right for 4096 sector size.

A good read is http://www.freebsddiary.org/zfs-with-gpart.php. I do not leave disk space at the end, so I do not use the -s with gpart add.

Code:
# gpart create -s GPT /dev/ada0
# gpart add -b 2048 -t freebsd-zfs -l disk00 /dev/ada0
# gpart create -s GPT /dev/ada1
# gpart add -b 2048 -t freebsd-zfs -l disk01 /dev/ada1
# gpart create -s GPT /dev/ada2
# gpart add -b 2048 -t freebsd-zfs -l disk02 /dev/ada2
# zpool create testpool raidz gpt/disk00 gpt/disk01 gpt/disk02

# zpool status
  pool: storage
 state: ONLINE
 scrub: none requested
config:

        NAME                      STATE     READ WRITE CKSUM
        storage                   ONLINE       0     0     0
          raidz                   ONLINE       0     0     0
            gpt/disk00            ONLINE       0     0     0
            gpt/disk01            ONLINE       0     0     0
            gpt/disk02            ONLINE       0     0     0


errors: No known data errors

Regards
Johan
 
I think internally ZFS uses the drive's UUID, so it really shouldn't matter on what controller and what devicename the drives get, ZFS should still be able to find the correct ones. Labels only make life easier for us mere mortals ;)
 
SirDice said:
I think internally ZFS uses the drive's UUID, so it really shouldn't matter on what controller and what devicename the drives get, ZFS should still be able to find the correct ones. Labels only make life easier for us mere mortals ;)

That was my understanding but I have a disk array that upon reboot zfs can't find the drives. If I label them? No problem.

Bill
 
bnorton916 said:
SirDice said:
I think internally ZFS uses the drive's UUID, so it really shouldn't matter on what controller and what devicename the drives get, ZFS should still be able to find the correct ones. Labels only make life easier for us mere mortals ;)
That was my understanding but I have a disk array that upon reboot zfs can't find the drives. If I label them? No problem.
Labels (both logical and physical) also help the user when dealing with a failed drive - the user can confirm that the logical label that ZFS reports as having a problem matches the label on the physical drive, so the correct drive can be pulled and replaced without triggering the dreaded "insufficent replicas" error - if you have a RAID-Z1 with a failed drive and pull the wrong drive, you get big problems.
 
Back
Top