Zfs zfs
Hi
I am finding quite hard times in understanding ZFS. I was trying to learn it from Sun's documentation. But I am finding quite difficult from understanding it as it jumps directly from one place to other. Do you have any other better sites in understanding ZFS ?? |
Have you tried starting with the Wikipedia article?
To be honest, I've learned ZFS as I've gone along. What is it that you're having difficulty understanding? The thing that gave me most trouble at first was the concept that it is both a filesystem, and a logical volume manager. |
Dragging myself, I am slowly getting it bit by bit...
By the way, I have one question. I created mirror pool called tank tank 767K 1.98G 0 0 7 91 mirror 767K 1.98G 0 0 7 91 c1t1d0 - - 0 0 116 95 c1t2d0 - - 0 0 78 95 ---------- ----- ----- ----- ----- ----- ----- Also, there are two folders inside tank: #zfs list tank 762K 1.95G 21K /tank tank/home 659K 1.95G 24K /export/zfs tank/home/bandar 317K 1024M 317K /export/zfs/bandar Now, when I write anything to /tank/home/bandar, it is going to write the same information to both disks c1t1d0 and c1t2d0. Am I correct ? If so, if i remove one of the disks, I should still be able to get data. Is that true ? And how about if I remove one of the disks and add it later again. Will it do mirroring automatically or do I need to run some commands ? Quote:
|
Yes, the "mirror" in the zpool status output shows that the two disks are in a mirrored array, so the same data will be duplicated on each device. You can detach one side of the mirror, and continue to use volumes in the pool.
If you re-attach the device to the pool, it will re-silver automatically (re-mirror in ZFS speak). However, if you add it to the pool, the devices will be striped together, rather than mirrored.* I found a reasonable looking tutorial, which may be of help. I also found a good article on the principles behind ZFS on Snoracle's BigAdmin site, though unfortunately it's quite out-of-date (pre-ZFS being bootable, for one thng). * I made this mistake once, and In current versions of ZFS, you can't shrink a pool. The only solution was to send the data out to a file, then destroy and re-create the pool :-/. |
Thank you for the information. By the way, I tried removing one of the hard drives and was still able to see data.
Next I attached the one which I just removed. Then after some time, I removed the second hard drive. In this case, I didn't see any data. Isn't is supposed to mirror data back when I attached the first drive back ? Or do I need to run any commands to force mirroring ?? |
No, you shouldn't need any command to force re-mirroring.
Code:
zpool attach [-f] pool device new_device |
The linked articles:
http://www.linuxquestions.org/questi...advice-700873/? Although, maybe you want specific and that is fairly general. |
All times are GMT -5. The time now is 06:46 PM. |