Hello, I have a situation where a host, which is booted off its ''rpool'', need to temporarily import the ''rpool'' of another host, edit some files in it, and export the pool back retaining its original name ''rpool''. Can this be done ? Here is what I am trying to do: # zpool import -R /a rpool temp-rpool # zfs set mountpoint=/mnt temp-rpool/ROOT/s10_u8 # zfs mount temp-rpool/ROOT/s10_u8 ### For example, edit /a/mnt/etc/hosts # zfs set mountpoint=/ temp-rpool/ROOT/s10_u8 # zfs export temp-rpool --> But, I want to give temp-rpool its original name ''rpool'' before or after this export. I cannot see how this can be achieved. So, I decided to live with the name ''temp-rpool''. But, is renaming ''rpool'' recommended or supported parctice ? Any help is appreciated. Thanks Arjun
Fajar A. Nugraha
2011-Apr-08 07:21 UTC
[zfs-discuss] How to rename rpool. Is that recommended ?
On Fri, Apr 8, 2011 at 2:10 PM, Arjun YK <arjunyk at gmail.com> wrote:> Hello, > > I have a situation where a host, which is booted off its ''rpool'', need > to temporarily import the ''rpool'' of another host, edit some files in > it, and export the pool back retaining its original name ''rpool''. Can > this be done ? > > Here is what I am trying to do: > > # zpool import -R /a rpool temp-rpoolI think it''d be easier for this purpose if you simply use a live cd / network boot. You can then just import the pool without having to change the name.> # zfs export temp-rpool ? ?--> But, I want to give temp-rpool its > original name ''rpool'' before or after this export. > > I cannot see how this can be achieved.Live CD / network boot> So, I decided to live with the > name ''temp-rpool''. But, is renaming ''rpool'' ?recommended or supported > parctice ?It should work, as long as you edit the necessary files. Whether it''s supported or not is an entirely different problem. -- Fajar
Hi, Let me add another query. I would assume it would be perfectly ok to choose any name for root pool, instead of ''rpool'', during the OS install. Please suggest otherwise. Thanks Arjun On 4/8/11, Arjun YK <arjunyk at gmail.com> wrote:> Hello, > > I have a situation where a host, which is booted off its ''rpool'', need > to temporarily import the ''rpool'' of another host, edit some files in > it, and export the pool back retaining its original name ''rpool''. Can > this be done ? > > Here is what I am trying to do: > > # zpool import -R /a rpool temp-rpool > # zfs set mountpoint=/mnt temp-rpool/ROOT/s10_u8 > # zfs mount temp-rpool/ROOT/s10_u8 > ### For example, edit /a/mnt/etc/hosts > # zfs set mountpoint=/ temp-rpool/ROOT/s10_u8 > # zfs export temp-rpool --> But, I want to give temp-rpool its > original name ''rpool'' before or after this export. > > I cannot see how this can be achieved. So, I decided to live with the > name ''temp-rpool''. But, is renaming ''rpool'' recommended or supported > parctice ? > > Any help is appreciated. > > Thanks > Arjun >
Fajar A. Nugraha
2011-Apr-08 07:31 UTC
[zfs-discuss] How to rename rpool. Is that recommended ?
On Fri, Apr 8, 2011 at 2:24 PM, Arjun YK <arjunyk at gmail.com> wrote:> Hi, > > Let me add another query. > I would assume it would be perfectly ok to choose any name for root > pool, instead of ''rpool'', during the OS install. Please suggest > otherwise.Have you tried it? Last time I try, the pool name is predetermined, you can''t change it. I tried cloning an exsisting openinstallation manually, changing the pool name in the process. IIRC it works (sorry for the somewhat vague detail, it was several years ago). -- Fajar
Stephan Budach
2011-Apr-08 07:37 UTC
[zfs-discuss] How to rename rpool. Is that recommended ?
Am 08.04.11 09:31, schrieb Fajar A. Nugraha:> On Fri, Apr 8, 2011 at 2:24 PM, Arjun YK<arjunyk at gmail.com> wrote: >> Hi, >> >> Let me add another query. >> I would assume it would be perfectly ok to choose any name for root >> pool, instead of ''rpool'', during the OS install. Please suggest >> otherwise. > Have you tried it? > > Last time I try, the pool name is predetermined, you can''t change it. > I tried cloning an exsisting openinstallation manually, changing the > pool name in the process. IIRC it works (sorry for the somewhat vague > detail, it was several years ago). >You can re-name a zpool at import time by simply issueing: zpool import <oldpool> <newpool> -- Stephan Budach Jung von Matt/it-services GmbH Glash?ttenstra?e 79 20357 Hamburg Tel: +49 40-4321-1353 Fax: +49 40-4321-1114 E-Mail: stephan.budach at jvm.de Internet: http://www.jvm.com Gesch?ftsf?hrer: Ulrich Pallas, Frank Wilhelm AG HH HRB 98380 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20110408/fe21729e/attachment-0001.html>
Casper.Dik at oracle.com
2011-Apr-08 07:48 UTC
[zfs-discuss] How to rename rpool. Is that recommended ?
>On Fri, Apr 8, 2011 at 2:24 PM, Arjun YK <arjunyk at gmail.com> wrote: >> Hi, >> >> Let me add another query. >> I would assume it would be perfectly ok to choose any name for root >> pool, instead of ''rpool'', during the OS install. Please suggest >> otherwise. > >Have you tried it? > >Last time I try, the pool name is predetermined, you can''t change it. >I tried cloning an exsisting openinstallation manually, changing the >pool name in the process. IIRC it works (sorry for the somewhat vague >detail, it was several years ago).You can only rename it by exporting it and importing under a different name. NOTE: when you modify your root pool on a different system, throw away the zfs.cache file. (Earlier implementation of a bug where if you rename your root pool and then your re-import it under a different name, zfs claims to have found two pools and then starts to corrupt them) Casper
Fajar A. Nugraha
2011-Apr-08 08:16 UTC
[zfs-discuss] How to rename rpool. Is that recommended ?
On Fri, Apr 8, 2011 at 2:37 PM, Stephan Budach <stephan.budach at jvm.de> wrote:> You can re-name a zpool at import time by simply issueing: > > zpool import <oldpool> <newpool>Yes, I know :) The last question from Arjun was can we "choose any name for root pool, instead of ''rpool'', during the OS install" :D -- Fajar
> NOTE: when you modify your root pool on a different system, throw away the > zfs.cache file. (Earlier implementation of a bug where if you rename your > root pool and then your re-import it under a different name, zfs claims to > have found two pools and then starts to corrupt them) > > Casper >Also update the new pool name in these files, then everything works fine. /etc/dumpadm.conf /etc/vfstab -- randw
Cindy Swearingen
2011-Apr-08 14:46 UTC
[zfs-discuss] How to rename rpool. Is that recommended ?
Arjun, Yes, you an choose any name for the root pool, but an existing limitation is that you can''t rename the root pool by using the zpool export/import with new name feature. Too much internal boot info is tied to the root pool name. What info are you changing? Instead, could you create a new BE and update the info in the new BE. Creating a new BE is the best solution. Another solution is to create a mirrored root pool and then use the zpool split option to create an identical root pool (that is then imported with a new name, like rpool2), but this identical root pool won''t be bootable either. You would then need to mount rpool2''s file systems and copy whatever data you needed. Thanks, Cindy On 04/08/11 01:24, Arjun YK wrote:> Hi, > > Let me add another query. > I would assume it would be perfectly ok to choose any name for root > pool, instead of ''rpool'', during the OS install. Please suggest > otherwise. > > Thanks > Arjun > > On 4/8/11, Arjun YK <arjunyk at gmail.com> wrote: >> Hello, >> >> I have a situation where a host, which is booted off its ''rpool'', need >> to temporarily import the ''rpool'' of another host, edit some files in >> it, and export the pool back retaining its original name ''rpool''. Can >> this be done ? >> >> Here is what I am trying to do: >> >> # zpool import -R /a rpool temp-rpool >> # zfs set mountpoint=/mnt temp-rpool/ROOT/s10_u8 >> # zfs mount temp-rpool/ROOT/s10_u8 >> ### For example, edit /a/mnt/etc/hosts >> # zfs set mountpoint=/ temp-rpool/ROOT/s10_u8 >> # zfs export temp-rpool --> But, I want to give temp-rpool its >> original name ''rpool'' before or after this export. >> >> I cannot see how this can be achieved. So, I decided to live with the >> name ''temp-rpool''. But, is renaming ''rpool'' recommended or supported >> parctice ? >> >> Any help is appreciated. >> >> Thanks >> Arjun >> > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Glenn Lagasse
2011-Apr-08 16:00 UTC
[zfs-discuss] How to rename rpool. Is that recommended ?
* Arjun YK (arjunyk at gmail.com) wrote:> Hi, > > Let me add another query. > I would assume it would be perfectly ok to choose any name for root > pool, instead of ''rpool'', during the OS install. Please suggest > otherwise.While there is nothing special about the name ''rpool'' (thus you *could* change it) none of the Installers allow you to specify the name of your ''root pool'' during installation. Cheers, Glenn
Brandon High
2011-Apr-08 20:38 UTC
[zfs-discuss] How to rename rpool. Is that recommended ?
On Fri, Apr 8, 2011 at 12:10 AM, Arjun YK <arjunyk at gmail.com> wrote:> I have a situation where a host, which is booted off its ''rpool'', need > to temporarily import the ''rpool'' of another host, edit some files in > it, and export the pool back retaining its original name ''rpool''. Can > this be done ?Yes you can do it, no it is not recommended. I had a need to do something similar to what you''re attempting and ended up using a Live CD (which doesn''t have an rpool to have a naming conflict) to do the manipulations. -B -- Brandon High : bhigh at freaks.com
Cindy, Here is what I was trying to do.. I have some scripts that allows to quickly deploy LDOM guest domains. The Golden OS Image of guest domain boot disk is on a ZFS Volume. This ZFS Volume has been Snapshot and Cloned for the quick deployment of guest domains. To build new ldom, create a new Clone, asssign it to Control Domain as a ''vdisk'', edit files in vdisk as required for giving a new hostname, IP, etc, then unassign vdisk from control domain, and assign it back to the guest domain. As control domain is already booted from ''rpool'', importing another rpool from vdisk required renaiming the rpool on vdisk. But, I couldn''t see how rpool on vdisk can be renamed back to its original name ''rpool'' after the files in it have been updated. I think, the solution here is to have different name for boot pool on control domain and on the ldom boot disk (one being Cloned) Thanks Arjun On Fri, Apr 8, 2011 at 10:46 PM, Cindy Swearingen < cindy.swearingen at oracle.com> wrote:> Arjun, > > Yes, you an choose any name for the root pool, but an existing > limitation is that you can''t rename the root pool by using the > zpool export/import with new name feature. > > Too much internal boot info is tied to the root pool name. > > What info are you changing? Instead, could you create a new BE > and update the info in the new BE. > > Creating a new BE is the best solution. > > Another solution is to create a mirrored root pool and then use the > zpool split option to create an identical root pool (that is then > imported with a new name, like rpool2), but this identical root pool > won''t be bootable either. You would then need to mount rpool2''s file > systems and copy whatever data you needed. > > Thanks, > > Cindy > > > > > On 04/08/11 01:24, Arjun YK wrote: > >> Hi, >> >> Let me add another query. >> I would assume it would be perfectly ok to choose any name for root >> pool, instead of ''rpool'', during the OS install. Please suggest >> otherwise. >> >> Thanks >> Arjun >> >> On 4/8/11, Arjun YK <arjunyk at gmail.com> wrote: >> >>> Hello, >>> >>> I have a situation where a host, which is booted off its ''rpool'', need >>> to temporarily import the ''rpool'' of another host, edit some files in >>> it, and export the pool back retaining its original name ''rpool''. Can >>> this be done ? >>> >>> Here is what I am trying to do: >>> >>> # zpool import -R /a rpool temp-rpool >>> # zfs set mountpoint=/mnt temp-rpool/ROOT/s10_u8 >>> # zfs mount temp-rpool/ROOT/s10_u8 >>> ### For example, edit /a/mnt/etc/hosts >>> # zfs set mountpoint=/ temp-rpool/ROOT/s10_u8 >>> # zfs export temp-rpool --> But, I want to give temp-rpool its >>> original name ''rpool'' before or after this export. >>> >>> I cannot see how this can be achieved. So, I decided to live with the >>> name ''temp-rpool''. But, is renaming ''rpool'' recommended or supported >>> parctice ? >>> >>> Any help is appreciated. >>> >>> Thanks >>> Arjun >>> >>> _______________________________________________ >> zfs-discuss mailing list >> zfs-discuss at opensolaris.org >> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20110411/bc38614e/attachment.html>