Browse Articles 2009 (6) April (6) How to create a RAIDZ2 pool with a hot spare Monitoring performance of ZFS file system using zf... Best Practises: Migrate your non-system data from ... Step by Step: Migrate root UFS file system to ZFS Playing around with ZFS File system using Virtual ... Playing around with ZFS File system using Virtual ... 2008 (23) Solaris Guru ~ Helps you Get Quick Start on Solaris Solaris related quick tips and tricks. mo n d a y , a p r i l 6 , 2 0 0 9 Playing around with ZFS File system using Virtual Disk created from Sun xVM VirtualBox - Working with ZFS hotspares In our earlier scenario we created a zpool and added extra storage to it. Here we would detail how to create a zpool with a hotspare. But before we could do this, we need to delete / destroy our previous pool. (Note - doing this would erase all your data in your zpool). Here's how we do it:
root@opensolaris:~# zpool destroy zpooldata
So with this, zpooldata is gone.
Now lets go ahead and a create one with a hotspare.
In our case, we would be using Disk 1 as a hotspare and Disk 7 and Disk 8 would form part of zpooldata. Here's how we do this:
Page 1 of 4 Solaris Guru ~ Helps you Get Quick Start on Solaris: Playing around with ZFS File system using Virtual Disk created from Su... 4/27/2012 http://solarisguru.getquickstart.com/2009/04/playing-around-with-zfs-file-system_06.html Categories Basics (11) (SAN) Storage (2) BLOG Maintained by - Vishal Sharma | GetQuickStart NAME STATE READ WRITE CKSUM zpooldata ONLINE 0 0 0 c5t4d0 ONLINE 0 0 0 c5t5d0 ONLINE 0 0 0 spares c3d1 AVAIL
errors: No known data errors root@opensolaris:~#
the above shows that Disk 2 is a spare.
Now lets go ahead and add another disk to the hotspare. Here's how we do it.
root@opensolaris:~# zpool add zpooldata spare c4d1 root@opensolaris:~# zpool status
root@opensolaris:~# zpool remove zpooldata c3d1 c4d1 Page 2 of 4 Solaris Guru ~ Helps you Get Quick Start on Solaris: Playing around with ZFS File system using Virtual Disk created from Su... 4/27/2012 http://solarisguru.getquickstart.com/2009/04/playing-around-with-zfs-file-system_06.html Volume Manager Veritas (2) ZFS (8) Zones (6) Newer Post Older Post root@opensolaris:~# zpool status
NAME STATE READ WRITE CKSUM zpooldata ONLINE 0 0 0 c5t4d0 ONLINE 0 0 0 c5t5d0 ONLINE 0 0 0
errors: No known data errors root@opensolaris:~#
Remember, adding or removing hotspares from your zpool wont really affect the total available storage in your pool. These are just hotspare disks and would be used in an event when a disk in the main pool fails. Posted by Vishal Sharma at 2:57 AM Labels: ZFS 0 comments: Post a Comment Links to this post Create a Link Home Subscribe to: Post Comments (Atom) ISO Certification India Get ISO 9001, 14001, 22000, 27001, HACCP, OHSAS 18001 and CE Marking www.ICRindia.in Page 3 of 4 Solaris Guru ~ Helps you Get Quick Start on Solaris: Playing around with ZFS File system using Virtual Disk created from Su... 4/27/2012 http://solarisguru.getquickstart.com/2009/04/playing-around-with-zfs-file-system_06.html Page 4 of 4 Solaris Guru ~ Helps you Get Quick Start on Solaris: Playing around with ZFS File system using Virtual Disk created from Su... 4/27/2012 http://solarisguru.getquickstart.com/2009/04/playing-around-with-zfs-file-system_06.html