> > 1. How does it go about finding the zpools? Does it scan all disks? All > partitions? The first hard disk? > > "zpool import", see below. >
Makes sense. > If it can't find the "zones" pool it will run the setup script unless >>> you've booted in a way that indicated that you don't want to (see the >>> menu.lst file shipped on the ISO) >>> >> > I will look at it. Not documented anywhere? > > Looking at the menu.lst file, I see options for console=, console-mode= (those make sense), root_shadow= (not a clue), smartos=true, standalone=true (for noinstall/recovery), and noimport=true. I assume that noimport=true means don't run zpool import, but then what does it boot into? Oh, wait. If this really is a live distro, then / is read only from the iso (or other boot media). I get it. > Sure. The short answer from the zpool man page is that under illumos (and > SmartOS) "zpool import" scans all devices under /dev/dsk to see if they are > part of a zpool or not. There will be device nodes in there for both whole > drives and for partitions. > Ah, so zpool import scans for all the zpools on all dsk it can find. Got it. Sounded vaguely familiar, but I think the last time I did real work with ZFS was when it was first released under Sun. Senior moment. > Let me clarify, it mounts up ZFS filesystems from within the "zones" pool > that store critical configuration. > > The short answer is that it's mostly hard-coded. > > When you import a ZFS pool, most filesystems get mounted automatically. > There are a few that SmartOS mounts differently, and the code that does it > is here: > > https://github.com/joyent/smartos-live/blob/master/overlay/generic/lib/svc/method/fs-joyent#L124-L126 > And those three - zones/var zones/config zones/opt - are the ones that contain the critical configuration info? I have a few suggestions: > > 1. Learn more about ZFS and get comfortable with ZFS pools and filesystems. > 2. Boot your system in noinstall/rescue mode (replace "smartos=true" with > "standalone=true,noimport=true") and run "zpool import" just to see what it > returns. > 3. If your system has other zpools you don't want SmartOS to touch, the > safest thing to do is change "smartos=true" to "smartos=true,zpools=zones" > so that you can be confident that SmartOS won't touch your other zpools. > Good idea. I will do that. Thanks again, great help. I do wish this were all on a wiki page. Now that I can, do you want me to create it? It will be incomplete, but a start... Avi -- Avi Deitcher Follow me http://twitter.com/avideitcher Read me http://blog.atomicinc.com ------------------------------------------- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com
