One can rename a zpool on import zpool import -f pool_or_id newname Is there any way to rename it (back again, perhaps) on export? (I had to rename rpool in an old disk image to access some stuff in it, and I''d like to put it back the way it was so it''s properly usable if I ever want to boot off of it.) But I suppose there must be other scenarios where that would be useful too... -- This message posted from opensolaris.org
----- "Richard L. Hamilton" <rlhamil at smart.net> skrev:> One can rename a zpool on import > > zpool import -f pool_or_id newname > > Is there any way to rename it (back again, perhaps) > on export? > > (I had to rename rpool in an old disk image to access > some stuff in it, and I''d like to put it back the way it > was so it''s properly usable if I ever want to boot off of it.) > > But I suppose there must be other scenarios where that would > be useful too...just export it and reimportit with the old name roy
Hi Richard, Renaming the root pool is not recommended. I have some details on what actually breaks, but I can''t find it now. This limitation is described in the ZFS Admin Guide, but under the LiveUpgrade section in the s10 version. I will add this limitation under the general limitation section. Obviously, you can''t export a root pool that is in use, but you can boot from alternate media and rename the exported root pool when it is imported. I simulated this process below. Thanks, Cindy To restart the Solaris installation program, type "install-solaris". Solaris installation program exited. # zpool import pool: rpool id: 2186941205144212601 state: ONLINE action: The pool can be imported using its name or numeric identifier. config: rpool ONLINE c1t0d0s0 ONLINE # zpool import rpool rpool2 cannot mount ''/export'': failed to create mountpoint cannot mount ''/export/home'': failed to create mountpoint cannot mount ''/rpool'': failed to create mountpoint # zpool status pool: rpool2 state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM rpool2 ONLINE 0 0 0 c1t0d0s0 ONLINE 0 0 0 errors: No known data errors # zpool export rpool2 # zpool import rpool2 rpool cannot mount ''/export'': failed to create mountpoint cannot mount ''/export/home'': failed to create mountpoint cannot mount ''/rpool'': failed to create mountpoint # zfs list NAME USED AVAIL REFER MOUNTPOINT rpool 8.06G 58.9G 96K /rpool rpool/ROOT 4.50G 58.9G 21K legacy rpool/ROOT/s10s_u9wos_07 4.50G 58.9G 4.49G / rpool/ROOT/s10s_u9wos_07 at now 4.80M - 4.49G - rpool/dump 1.50G 58.9G 1.50G - rpool/export 44K 58.9G 23K /export rpool/export/home 21K 58.9G 21K /export/home rpool/swap 2.06G 60.9G 16K - On 05/02/10 07:33, Richard L. Hamilton wrote:> One can rename a zpool on import > > zpool import -f pool_or_id newname > > Is there any way to rename it (back again, perhaps) > on export? > > (I had to rename rpool in an old disk image to access > some stuff in it, and I''d like to put it back the way it > was so it''s properly usable if I ever want to boot off of it.) > > But I suppose there must be other scenarios where that would > be useful too...
Hi Does this mean exporting and re-importing a rpool break things? I have tried exporting and re-importing other pools with new names and yet haven''t seen problems with it roy ----- "Cindy Swearingen" <cindy.swearingen at oracle.com> skrev:> Hi Richard, > > Renaming the root pool is not recommended. I have some details on > what > actually breaks, but I can''t find it now. > > This limitation is described in the ZFS Admin Guide, but under the > LiveUpgrade section in the s10 version. I will add this limitation > under > the general limitation section. > > Obviously, you can''t export a root pool that is in use, but you can > boot from alternate media and rename the exported root pool when it > is > imported. > > I simulated this process below. > > Thanks, > > Cindy > > > To restart the Solaris installation program, > type "install-solaris". > Solaris installation program exited. > # zpool import > pool: rpool > id: 2186941205144212601 > state: ONLINE > action: The pool can be imported using its name or numeric > identifier. > config: > > rpool ONLINE > c1t0d0s0 ONLINE > # zpool import rpool rpool2 > cannot mount ''/export'': failed to create mountpoint > cannot mount ''/export/home'': failed to create mountpoint > cannot mount ''/rpool'': failed to create mountpoint > # zpool status > pool: rpool2 > state: ONLINE > scrub: none requested > config: > > NAME STATE READ WRITE CKSUM > rpool2 ONLINE 0 0 0 > c1t0d0s0 ONLINE 0 0 0 > > errors: No known data errors > # zpool export rpool2 > # zpool import rpool2 rpool > cannot mount ''/export'': failed to create mountpoint > cannot mount ''/export/home'': failed to create mountpoint > cannot mount ''/rpool'': failed to create mountpoint > # zfs list > NAME USED AVAIL REFER MOUNTPOINT > rpool 8.06G 58.9G 96K /rpool > rpool/ROOT 4.50G 58.9G 21K legacy > rpool/ROOT/s10s_u9wos_07 4.50G 58.9G 4.49G / > rpool/ROOT/s10s_u9wos_07 at now 4.80M - 4.49G - > rpool/dump 1.50G 58.9G 1.50G - > rpool/export 44K 58.9G 23K /export > rpool/export/home 21K 58.9G 21K /export/home > rpool/swap 2.06G 60.9G 16K - > > > > On 05/02/10 07:33, Richard L. Hamilton wrote: > > One can rename a zpool on import > > > > zpool import -f pool_or_id newname > > > > Is there any way to rename it (back again, perhaps) > > on export? > > > > (I had to rename rpool in an old disk image to access > > some stuff in it, and I''d like to put it back the way it > > was so it''s properly usable if I ever want to boot off of it.) > > > > But I suppose there must be other scenarios where that would > > be useful too... > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
On Mon, May 3, 2010 at 9:13 AM, Cindy Swearingen <cindy.swearingen at oracle.com> wrote:> Renaming the root pool is not recommended. I have some details on what > actually breaks, but I can''t find it now.Really? I asked about using a new pool for the rpool, and there were some comments that it works fine. In fact, you''d suggested using beadm to move the BE to the new pool. On x86, grub looks at the findroot command, which checks /rpool/boot/grub/bootsign/ (See http://docs.sun.com/app/docs/doc/819-2379/ggvms?a=view) The zpool should have the bootfs property set (although I''ve had it work without this set). (See http://docs.sun.com/app/docs/doc/819-2379/ggqhp?l=en&a=view) To answer Richard''s question, if you have to rename a pool during import due to a conflict, the only way to change it back is to re-import it with the original name. You''ll have to either export the conflicting pool, or (if it''s rpool) boot off of a LiveCD which doesn''t use an rpool to do the rename. -B -- Brandon High : bhigh at freaks.com
[...]> To answer Richard''s question, if you have to rename a > pool during > import due to a conflict, the only way to change it > back is to > re-import it with the original name. You''ll have to > either export the > conflicting pool, or (if it''s rpool) boot off of a > LiveCD which > doesn''t use an rpool to do the rename.Thanks. The latter is what I ended up doing (well, off of the SXCE install CD image that I''d used to set up that disk image in VirtualBox in the first place). -- This message posted from opensolaris.org
Brandon, Using beadm to migrate your BEs to another root pool (and then performing all the steps to get the system to boot) is different than just outright renaming your existing root pool on import. Since pool renaming isn''t supported, I don''t think we have identified all the boot/mount-at-boot components that need to be changed. Cindy On 05/03/10 18:34, Brandon High wrote:> On Mon, May 3, 2010 at 9:13 AM, Cindy Swearingen > <cindy.swearingen at oracle.com> wrote: >> Renaming the root pool is not recommended. I have some details on what >> actually breaks, but I can''t find it now. > > Really? I asked about using a new pool for the rpool, and there were > some comments that it works fine. In fact, you''d suggested using beadm > to move the BE to the new pool. > > On x86, grub looks at the findroot command, which checks > /rpool/boot/grub/bootsign/ (See > http://docs.sun.com/app/docs/doc/819-2379/ggvms?a=view) > The zpool should have the bootfs property set (although I''ve had it > work without this set). (See > http://docs.sun.com/app/docs/doc/819-2379/ggqhp?l=en&a=view) > > To answer Richard''s question, if you have to rename a pool during > import due to a conflict, the only way to change it back is to > re-import it with the original name. You''ll have to either export the > conflicting pool, or (if it''s rpool) boot off of a LiveCD which > doesn''t use an rpool to do the rename. > > -B >
On Tue, May 4, 2010 at 7:19 AM, Cindy Swearingen <cindy.swearingen at oracle.com> wrote:> Using beadm to migrate your BEs to another root pool (and then > performing all the steps to get the system to boot) is different > than just outright renaming your existing root pool on import.Does beadm take care of all the other steps that need to happen? I imagine you''d have to keep rpool around otherwise ... I ended up doing an offline copy to a new pool, which I renamed to rpool at the end to avoid any problems -B -- Brandon High : bhigh at freaks.com
No, beadm doesn''t take care of all the steps that I provided previously and included below. Cindy You can use the OpenSolaris beadm command to migrate a ZFS BE over to another root pool, but you will also need to perform some manual migration steps, such as - copy over your other rpool datasets - recreate swap and dump devices - install bootblocks - update BIOS and GRUB entries to boot from new root pool The BE recreation gets you part of the way and its fast, anyway. !. Create the second root pool. # zpool create rpool2 c5t1d0s0 2. Create the new BE in the second root pool. # beadm create -p rpool2 osol2BE 3. Activate the new BE. # beadm activate osol2BE 4. Install the boot blocks. 5. Test that the system boots from the second root pool. 6. Update BIOS and GRUB to boot from new pool. On 05/04/10 11:04, Brandon High wrote:> On Tue, May 4, 2010 at 7:19 AM, Cindy Swearingen > <cindy.swearingen at oracle.com> wrote: >> Using beadm to migrate your BEs to another root pool (and then >> performing all the steps to get the system to boot) is different >> than just outright renaming your existing root pool on import. > > Does beadm take care of all the other steps that need to happen? I > imagine you''d have to keep rpool around otherwise ... > > I ended up doing an offline copy to a new pool, which I renamed to > rpool at the end to avoid any problems > > -B >
Cindy Swearingen <cindy.swearingen <at> oracle.com> writes: Cindy - this discusses how to rename the rpool temporarily. Is there a way to do it permanently and will it break anything? I have to rename a root pool because of a type-o. This is on a Solaris sparc environment. Please help! thanks Julie LaMothe
On Fri, 2 Jul 2010, Julie LaMothe wrote:> Cindy - this discusses how to rename the rpool temporarily. Is there a > way to do it permanently and will it break anything? I have to rename a > root pool because of a type-o. This is on a Solaris sparc environment. > Please help!The only difference with a sparc environment is step 6 of Cindy''s list. Instead of using BIOS to configure the boot disk, use the eeprom command instead. E.g.: eeprom boot-device=disk1:a substitute your new disk for the disk1 there. If you''re not sure which disk to use, try the "devalias" command at the boot prom''s "ok" prompt.
----- Original Message -----> Cindy Swearingen <cindy.swearingen <at> oracle.com> writes: > > Cindy - this discusses how to rename the rpool temporarily. Is there a > way to > do it permanently and will it break anything? I have to rename a root > pool > because of a type-o. > This is on a Solaris sparc environment. > Please help!To rename a pool, export the pool # zpool export mypooll and reimport it with a new name # zpool import mypooll mypool Vennlige hilsener / Best regards roy -- Roy Sigurd Karlsbakk (+47) 97542685 roy at 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.
Hi Roy, Yes, but Julie asked about renaming the root pool, which isn''t recommended because it can cause the system not to boot. You also can''t export the root pool without booting from alternate media. Thanks, Cindy On 07/02/10 09:22, Roy Sigurd Karlsbakk wrote:> ----- Original Message ----- >> Cindy Swearingen <cindy.swearingen <at> oracle.com> writes: >> >> Cindy - this discusses how to rename the rpool temporarily. Is there a >> way to >> do it permanently and will it break anything? I have to rename a root >> pool >> because of a type-o. >> This is on a Solaris sparc environment. >> Please help! > > To rename a pool, export the pool > > # zpool export mypooll > > and reimport it with a new name > > # zpool import mypooll mypool > > Vennlige hilsener / Best regards > > roy > -- > Roy Sigurd Karlsbakk > (+47) 97542685 > roy at 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 at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
so - if i boot up off of cdrom and do an export of the root pool under name rpool1 can i reimport it under rpool2 (using the same disk) and keep it at that name permanently and have not issues with booting in the future or any other O/S related issues? That is the question. :-) On Fri, Jul 2, 2010 at 11:36 AM, Cindy Swearingen < cindy.swearingen at oracle.com> wrote:> Hi Roy, > > Yes, but Julie asked about renaming the root pool, which isn''t > recommended because it can cause the system not to boot. You > also can''t export the root pool without booting from alternate > media. > > Thanks, > > Cindy > > > On 07/02/10 09:22, Roy Sigurd Karlsbakk wrote: > >> ----- Original Message ----- >> >>> Cindy Swearingen <cindy.swearingen <at> oracle.com> writes: >>> >>> Cindy - this discusses how to rename the rpool temporarily. Is there a >>> way to >>> do it permanently and will it break anything? I have to rename a root >>> pool >>> because of a type-o. >>> This is on a Solaris sparc environment. >>> Please help! >>> >> >> To rename a pool, export the pool >> >> # zpool export mypooll >> >> and reimport it with a new name >> >> # zpool import mypooll mypool >> >> Vennlige hilsener / Best regards >> >> roy >> -- >> Roy Sigurd Karlsbakk >> (+47) 97542685 >> roy at 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 at opensolaris.org >> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >> >-- Handcrafted Sterling Silver Jewelry http://twofinewhines.com Turning Energy into Income Julie LaMothe http://jlamothe.igniteinc.biz 678-516-9585 "Deregulation of energy will be the largest redistribution of wealth this country has ever seen" Warren Buffet " You miss every shot you don''t take" Susan Fisher -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20100702/833cab4d/attachment.html>
Hi Julie, I think the answer is no, you cannot rename the root pool and expect that any other O/S-related boot operation will complete successfully. Live Upgrade in particular would be unhappy and changing the root dataset mount point might cause the system not to boot. Thanks, Cindy On 07/02/10 10:39, Julie LaMothe wrote:> so - if i boot up off of cdrom and do an export of the root pool under > name rpool1 can i reimport it under rpool2 (using the same disk) and > keep it at that name permanently and have not issues with booting in the > future or any other O/S related issues? > > That is the question. :-) > > On Fri, Jul 2, 2010 at 11:36 AM, Cindy Swearingen > <cindy.swearingen at oracle.com <mailto:cindy.swearingen at oracle.com>> wrote: > > Hi Roy, > > Yes, but Julie asked about renaming the root pool, which isn''t > recommended because it can cause the system not to boot. You > also can''t export the root pool without booting from alternate > media. > > Thanks, > > Cindy > > > On 07/02/10 09:22, Roy Sigurd Karlsbakk wrote: > > ----- Original Message ----- > > Cindy Swearingen <cindy.swearingen <at> oracle.com > <http://oracle.com/>> writes: > > Cindy - this discusses how to rename the rpool temporarily. > Is there a > way to > do it permanently and will it break anything? I have to > rename a root > pool > because of a type-o. > This is on a Solaris sparc environment. > Please help! > > > To rename a pool, export the pool > > # zpool export mypooll > > and reimport it with a new name > > # zpool import mypooll mypool > > Vennlige hilsener / Best regards > > roy > -- > Roy Sigurd Karlsbakk > (+47) 97542685 > roy at karlsbakk.net <mailto:roy at 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 at opensolaris.org <mailto:zfs-discuss at opensolaris.org> > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss > > > > > -- > Handcrafted Sterling Silver Jewelry > http://twofinewhines.com > > Turning Energy into Income > Julie LaMothe > http://jlamothe.igniteinc.biz > 678-516-9585 > > "Deregulation of energy will be the largest redistribution of wealth > this country has ever seen" Warren Buffet > > " You miss every shot you don''t take" Susan Fisher >
On 02/07/2010 17:57, Cindy Swearingen wrote:> I think the answer is no, you cannot rename the root pool and expect > that any other O/S-related boot operation will complete successfully. > Live Upgrade in particular would be unhappy and changing the root > dataset mount point might cause the system not to boot.Live Upgrade on Solaris 10 does indeed get up set. Live Upgrade does not exist on OpenSolaris, the equivalent beadm does not. I know this because I have had reason to rename root pools on multiple occasions. However you do have to be careful (it may need hand editing) with the grub menu as it will usually contain the name of the root pool. -- Darren J Moffat
so has anyone done it successfully on Solaris 10 sparc? On Fri, Jul 2, 2010 at 2:42 PM, Darren J Moffat <darrenm at opensolaris.org>wrote:> On 02/07/2010 17:57, Cindy Swearingen wrote: > >> I think the answer is no, you cannot rename the root pool and expect >> that any other O/S-related boot operation will complete successfully. >> Live Upgrade in particular would be unhappy and changing the root >> dataset mount point might cause the system not to boot. >> > > Live Upgrade on Solaris 10 does indeed get up set. Live Upgrade does not > exist on OpenSolaris, the equivalent beadm does not. > > I know this because I have had reason to rename root pools on multiple > occasions. > > However you do have to be careful (it may need hand editing) with the grub > menu as it will usually contain the name of the root pool. > > -- > Darren J Moffat >-- Handcrafted Sterling Silver Jewelry http://twofinewhines.com Turning Energy into Income Julie LaMothe http://jlamothe.igniteinc.biz 678-516-9585 "Deregulation of energy will be the largest redistribution of wealth this country has ever seen" Warren Buffet " You miss every shot you don''t take" Susan Fisher -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20100702/5dd3b0a6/attachment.html>