ZFS How to access second disk added to zpool?

Hi all
As you know, in MS Windows if I add hard disk, this hard disk will appear as drive D or drive E and so on so that I can access it by clicking on the drive icon.

My FreeBSD box had only 1 160 GB disk. Because it's not enough for data storage, I just additionally added one 500 GB disk to it by command:
zpool add zroot ada1s2

Now how do I access to newly added 500 GB disk?
Thanks.
 
Last edited by a moderator:
Your zroot pool should now simply have 500 GB more space. Just use it like before. Check available space with e.g. zpool list.
 
Note that you have now 'striped' the two disks together. It is not a separate disk like it would be if you plugged it into Windows and just let Windows format it as normal.

If either disk fails you will lose all the data on both.
 
Hi usdmatt and all,
I understood. My way is non-redundant, RAID0. So assume that I added one more disk to my box, and create second pool and add second disk to second pool. Later on if first disk fails, does data on second disk shall be lost also? If yes, is there anyway I can prevent my data on second disk without going RAID route under ZFS?

If no way, is is possible under UFS?

Thanks.
 
Last edited by a moderator:
No, there's no way to avoid data loss in case of a disk failure unless you use a mirror or raid-z setup. On a two disk striped RAID0 pool like you have now even single problem on either of the disks can render the whole pool unusable and non-recoverable


With UFS there the situation is no better, once you stripe data between the disks using RAID0 regardless of the method (gstripe(8), graid(8) etc.) constructing the data requires both disks to be intact and available.
 
hanhtm, If you create a separate zpool(8) for each of the two disks in your machine, you will have no redundancy. If one disk fails however, the data on the other disk will remain available assuming the remaining disk is still functional. If you only have access to two disks, you have to decide how important the data is. If it is very important, use both disks to create a mirrored zpool(8) to hold both the operating system and your data. Otherwise, as I mentioned already, create a separate zpool(8) for each disk. Having access to a third disk would give you the best option of creating a single vdev zpool(8) for the operating system, and then using the two remaining disks to create a separate mirrored zpool(8) for your data giving you some redundancy for that data. In other words, if one of the data disks dies or goes bad, your data is still available on the remaining and functioning data disk. No matter which path you take, backups are mandatory if your data is very important.
 
Back
Top