LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 05-30-2010, 11:19 AM   #1
sang_froid
Member
 
Registered: Oct 2006
Posts: 179

Rep: Reputation: 15
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 ??
 
Old 05-30-2010, 11:38 AM   #2
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 97
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.
 
Old 05-30-2010, 07:16 PM   #3
sang_froid
Member
 
Registered: Oct 2006
Posts: 179

Original Poster
Rep: Reputation: 15
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:
Originally Posted by Robhogg View Post
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 diska logical volume manager.
 
Old 05-31-2010, 04:33 AM   #4
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 97
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 :-/.
 
Old 05-31-2010, 10:24 AM   #5
sang_froid
Member
 
Registered: Oct 2006
Posts: 179

Original Poster
Rep: Reputation: 15
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 ??
 
Old 05-31-2010, 10:42 AM   #6
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 97
No, you shouldn't need any command to force re-mirroring.

Code:
zpool attach [-f] pool device  new_device

   Attaches new_device to an existing zpool device. The existing device cannot be part of a raidz
   configuration. If device is not currently part of a mirrored configuration, device automatically 
   transforms into a two-way mirror of device and new_device. If device is part of a two-way 
   mirror, attaching new_device creates a three-way mirror, and so on. In either case, new_device   
   begins to resilver immediately.
Did you try running zpool status after re-attaching the drive, and then again before detaching the other half? If you did, you should have seen a message informing you that the drive was being resilvered in the status line immediately after re-attaching. It would be wise to check before running zpool detach, though I'd be surprised if the utilities would allow you to detach a drive from a pool with inconsistencies.

Last edited by Robhogg; 05-31-2010 at 11:13 AM.
 
Old 05-31-2010, 04:52 PM   #7
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
The linked articles:

http://www.linuxquestions.org/questi...advice-700873/? Although, maybe you want specific and that is fairly general.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Article ZFS data integrity testing and more random ZFS thoughts. LXer Syndicated Linux News 0 05-15-2010 01:51 PM
ZFS /dev/me Slackware 4 05-06-2010 12:15 PM
Solaris Express ZFS vs Solaris 10 ZFS? kebabbert Solaris / OpenSolaris 8 06-29-2007 08:05 AM
ZFS Root / Boot into ZFS from a usb flash drive Kataku Solaris / OpenSolaris 1 07-15-2006 05:13 AM
When will zfs be out? Thaidog Solaris / OpenSolaris 1 07-12-2005 09:01 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 05:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration