Re: [zfs-discuss] changing vdev types
On Wed, Jun 1, 2011 at 2:54 PM, Matt Harrison iwasinnamuk...@genestate.com wrote: Hi list, I've got a pool thats got a single raidz1 vdev. I've just some more disks in and I want to replace that raidz1 with a three-way mirror. I was thinking I'd just make a new pool and copy everything across, but then of course I've got to deal with the name change. Basically, what is the most efficient way to migrate the pool to a completely different vdev? Since you can't mix vdev types in a single pool, you'll have to create a new pool. But you can use zfs send/recv to move the datasets, so your mountpoints and other properties will be preserved. Eric ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] changing vdev types
On 01/06/2011 20:45, Eric Sproul wrote: On Wed, Jun 1, 2011 at 2:54 PM, Matt Harrison iwasinnamuk...@genestate.com wrote: Hi list, I've got a pool thats got a single raidz1 vdev. I've just some more disks in and I want to replace that raidz1 with a three-way mirror. I was thinking I'd just make a new pool and copy everything across, but then of course I've got to deal with the name change. Basically, what is the most efficient way to migrate the pool to a completely different vdev? Since you can't mix vdev types in a single pool, you'll have to create a new pool. But you can use zfs send/recv to move the datasets, so your mountpoints and other properties will be preserved. Eric Thanks Eric, however seeing as I can't have two pools named 'tank', I'll have to name the new one something else. I believe I will be able to rename it afterwards, but I just wanted to check first. I'd have to have to spend hours changing the pool name in a thousand files. Thanks ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] changing vdev types
On Wed, Jun 1, 2011 at 3:47 PM, Matt Harrison iwasinnamuk...@genestate.com wrote: Thanks Eric, however seeing as I can't have two pools named 'tank', I'll have to name the new one something else. I believe I will be able to rename it afterwards, but I just wanted to check first. I'd have to have to spend hours changing the pool name in a thousand files. What files would those be? Usually the pool name (and therefore the dataset names) doesn't matter-- only mountpoints matter to most things on the system, but maybe you have a more interesting use case. :) Eric ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] changing vdev types
Hi Matt, You have several options in terms of migrating the data but I think the best approach is to do something like I have described below. Thanks, Cindy 1. Create snapshots of the file systems to be migrated. If you want to capture the file system properties, then see the zfs.1m man page for a description of what you need. 2. Create your mirrored pool with the new disks and call it pool2, if your raidz pool is pool1, for example. 3. Use zfs send/receive to send your snapshots to pool2. 4. Review the pool properties on pool1 if you want pool2 set up similarly. # zpool get all pool1 5. After your pool2 is setup and your data is migrated, then you can destroy pool1. 6. You can export pool2 and import is as pool1. On 06/01/11 12:54, Matt Harrison wrote: Hi list, I've got a pool thats got a single raidz1 vdev. I've just some more disks in and I want to replace that raidz1 with a three-way mirror. I was thinking I'd just make a new pool and copy everything across, but then of course I've got to deal with the name change. Basically, what is the most efficient way to migrate the pool to a completely different vdev? Thanks ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] changing vdev types
On 01/06/2011 20:52, Eric Sproul wrote: On Wed, Jun 1, 2011 at 3:47 PM, Matt Harrison iwasinnamuk...@genestate.com wrote: Thanks Eric, however seeing as I can't have two pools named 'tank', I'll have to name the new one something else. I believe I will be able to rename it afterwards, but I just wanted to check first. I'd have to have to spend hours changing the pool name in a thousand files. What files would those be? Usually the pool name (and therefore the dataset names) doesn't matter-- only mountpoints matter to most things on the system, but maybe you have a more interesting use case. :) Eric Nothing that impressive :D I have quite a few scripts and config files that of course access the data via the mountpoint, which in my case refers to the pool name. It's just slightly possible I exaggerated the number of files, but still I'd prefer not to do it at all. :) But Cindy has just chimed in and confirmed that I can indeed just import the pool under the old name. So many thanks to both of you, I'll go and read up on the snapshot options so I can get an accurate replica :) Thanks Matt ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] changing vdev types
On 01/06/2011 20:53, Cindy Swearingen wrote: Hi Matt, You have several options in terms of migrating the data but I think the best approach is to do something like I have described below. Thanks, Cindy 1. Create snapshots of the file systems to be migrated. If you want to capture the file system properties, then see the zfs.1m man page for a description of what you need. 2. Create your mirrored pool with the new disks and call it pool2, if your raidz pool is pool1, for example. 3. Use zfs send/receive to send your snapshots to pool2. 4. Review the pool properties on pool1 if you want pool2 set up similarly. # zpool get all pool1 5. After your pool2 is setup and your data is migrated, then you can destroy pool1. 6. You can export pool2 and import is as pool1. Thanks Cindy, Started with it now, just a bit of reading to do. Matt ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] changing vdev types
On 01 June, 2011 - Eric Sproul sent me these 0,8K bytes: On Wed, Jun 1, 2011 at 2:54 PM, Matt Harrison iwasinnamuk...@genestate.com wrote: Hi list, I've got a pool thats got a single raidz1 vdev. I've just some more disks in and I want to replace that raidz1 with a three-way mirror. I was thinking I'd just make a new pool and copy everything across, but then of course I've got to deal with the name change. Basically, what is the most efficient way to migrate the pool to a completely different vdev? Since you can't mix vdev types in a single pool, you'll have to create a new pool. But you can use zfs send/recv to move the datasets, so You can mix as much as you want to, but you can't remove a vdev (yet). /Tomas -- Tomas Ögren, st...@acc.umu.se, http://www.acc.umu.se/~stric/ |- Student at Computing Science, University of Umeå `- Sysadmin at {cs,acc}.umu.se ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] changing vdev types
On Wed, Jun 1, 2011 at 3:57 PM, Matt Harrison iwasinnamuk...@genestate.com wrote: On 01/06/2011 20:52, Eric Sproul wrote: What files would those be? Usually the pool name (and therefore the dataset names) doesn't matter-- only mountpoints matter to most things on the system, but maybe you have a more interesting use case. :) Eric Nothing that impressive :D I have quite a few scripts and config files that of course access the data via the mountpoint, which in my case refers to the pool name. It's just slightly possible I exaggerated the number of files, but still I'd prefer not to do it at all. :) But Cindy has just chimed in and confirmed that I can indeed just import the pool under the old name. I think Eric's point was that the zpool/zfs name and the mountpoint do NOT have to be the same. See the zfs mountpoint property (zfs get mountpoint zfs and zfs set mountpoint=foo zfs). -- {1-2-3-4-5-6-7-} Paul Kraus - Senior Systems Architect, Garnet River ( http://www.garnetriver.com/ ) - Sound Coordinator, Schenectady Light Opera Company ( http://www.sloctheater.org/ ) - Technical Advisor, RPI Players ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] changing vdev types
On Wed, Jun 1, 2011 at 12:45 PM, Eric Sproul espr...@omniti.com wrote: On Wed, Jun 1, 2011 at 2:54 PM, Matt Harrison iwasinnamuk...@genestate.com wrote: Hi list, I've got a pool thats got a single raidz1 vdev. I've just some more disks in and I want to replace that raidz1 with a three-way mirror. I was thinking I'd just make a new pool and copy everything across, but then of course I've got to deal with the name change. Basically, what is the most efficient way to migrate the pool to a completely different vdev? Since you can't mix vdev types in a single pool Side note: you most certainly can mix vdevs in a pool. It's not recommended, nor even suggested, but it's most certainly possible. You just have to add -f to the zpool add command. I use this at home, where my pool has a 3-disk raidz1 vdev (SATA1) and a 2-disk mirror vdev (IDE). I can't connect to my home machine right now, so can't post the zpool status output. But if you want to see it in action, I'll post when I get home. That said, you can't remove top-level vdevs (raidz*, mirror, single) from a pool, so you can't add a new vdev and remove the old vdev to convert between vdev types. The only solution to the OP's question is to create a new pool, transfer the data, and destroy the old pool. There are several ways to do this. -- Freddie Cash fjwc...@gmail.com ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] changing vdev types
Since you can't mix vdev types in a single pool, you'll have to create a new pool. But you can use zfs send/recv to move the datasets, so your mountpoints and other properties will be preserved. Last I checked, mixing different VDEV types in a pool was possible, but not really recommended. Try zpool add -f somedev to a raidz3 pool, and it will work, but break redundancy Vennlige hilsener / Best regards roy -- Roy Sigurd Karlsbakk (+47) 97542685 r...@karlsbakk.net http://blogg.karlsbakk.net/ -- I all pedagogikk er det essensielt at pensum presenteres intelligibelt. Det er et elementært imperativ for alle pedagoger å unngå eksessiv anvendelse av idiomer med fremmed opprinnelse. I de fleste tilfeller eksisterer adekvate og relevante synonymer på norsk. ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] changing vdev types
On Wed, Jun 1, 2011 at 2:34 PM, Freddie Cash fjwc...@gmail.com wrote: On Wed, Jun 1, 2011 at 12:45 PM, Eric Sproul espr...@omniti.com wrote: On Wed, Jun 1, 2011 at 2:54 PM, Matt Harrison iwasinnamuk...@genestate.com wrote: Hi list, I've got a pool thats got a single raidz1 vdev. I've just some more disks in and I want to replace that raidz1 with a three-way mirror. I was thinking I'd just make a new pool and copy everything across, but then of course I've got to deal with the name change. Basically, what is the most efficient way to migrate the pool to a completely different vdev? Since you can't mix vdev types in a single pool Side note: you most certainly can mix vdevs in a pool. It's not recommended, nor even suggested, but it's most certainly possible. You just have to add -f to the zpool add command. I use this at home, where my pool has a 3-disk raidz1 vdev (SATA1) and a 2-disk mirror vdev (IDE). I can't connect to my home machine right now, so can't post the zpool status output. But if you want to see it in action, I'll post when I get home. [fcash@rogue /home/fcash]$ zpool status pool pool: pool state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM pool ONLINE 0 0 0 raidz1 ONLINE 0 0 0 ad8ONLINE 0 0 0 ad10 ONLINE 0 0 0 ad9ONLINE 0 0 0 mirror ONLINE 0 0 0 ad4ONLINE 0 0 0 ad6ONLINE 0 0 0 cache label/cache ONLINE 0 0 0 errors: No known data errors [fcash@rogue /home/fcash]$ zpool get version pool NAME PROPERTY VALUESOURCE pool version 14 default [fcash@rogue /home/fcash]$ zfs get version pool NAME PROPERTY VALUESOURCE pool version 3- [fcash@rogue /home/fcash]$ uname -a FreeBSD rogue.ashesofthe.net 8.1-RELEASE FreeBSD 8.1-RELEASE #0 r211388: Sun Aug 22 15:18:36 PDT 2010 r...@rogue.ashesofthe.net:/usr/obj/usr/src-8/sys/ROGUE i386 -- Freddie Cash fjwc...@gmail.com ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss