Transcript

Demonstration – Create the Boot Disk, Boot the Zone

>> Mick:  Hello. Welcome to SkillBuilders. Today we’re going to look at creating alternative storage for our Kernel zone.

 

[pause]

 

The default storage is held on to rpool VARSHARE zones which is part of the operating system root pool. But you can put that anywhere you like and that’s what we’re going to do today.

 

One thing you can do if you’re happy to keep the default location, you can actually specify an alternative size. So when you do the zone ADM install of the zone you could put -X install size = 45G, for example, and that will give you 45 gigabytes. But I’m going to use a completely separate location.

 

[pause]

 

So let’s start up by creating something in some storage somewhere. The server on the right-hand side here I’m creating a little data set that I’m going to use to hold my Kernel zone emulated volumes that I’m going to use for my root pools. And then within that I’m going to create an emulated volume of 150 gigabytes I called kzone2vol.

 

I’ve used the -s option again to make sure it’s sparsely allocated and doesn’t use up more space than it needs. It will appear to be 150 gigs to the actual Kernel zone.

 

[pause]

 

Okay, I’m just going to check that the device name is being created. I’m going to be using the raw device name that’s associated with the emulated volume to define that within my zone configuration and that looks fine.

 

[pause]

 

Now I can begin configuring the zone which I’m calling kzone2 and use create -t. In ordinary create we just create a native zone and I want the kernel one so that zone is a branded zone and the branded zone type is SYSsolaris-kz. A normal default storage area will end up in a zone to this and if I did an info, there I can actually see the storage device. I’m going to get rid of that storage device.

 

[pause]

 

So remove device id=0 and then we’re going to add the device I just created. So id=0 and then set match = and the device name which is devzvolrdsk/rpool/kzones/kzone2vol. Set bootpri=0 to make sure it becomes the boot device and then end, verify, commit, and exit. So not really very much to it.

 

Now I could install my zone and it will use the new storage device. So we let that install and we’ll come back to it a little bit later then I can show you once I’ve logged in what the storage device looks like.

 

My zone is now installed as we can see on the terminal window there. So I’m going to boot it and then log into the console straight away.

 

The zlogin -C denotes that I want to log in on the console. So I can see all the boot messages and the way it goes. And that will now carry on booting for a few minutes.

 

Once it’s finished booting it will go into a configuration stage where I’ll have to enter the details such as the host name IP address. Okay. What you can see on the screen now are the service manifest being read into the services known as the service management facility, SMF. We’ll come back very shortly and carry on with the rest of the tutorial.

Copyright SkillBuilders.com 2017

×
Transcript

Demonstration – Adding a 2nd Disk to the Zone

>> Mick: Okay, here’s the system configuration tool that was entered during the first boot with the Kernel zone. And I will just proceed through this hitting F2 and entering things like the host name, IP address, etc. I’ll complete all these and then I’ll come back to the rest of the presentation.

 

[pause]

 

All right, I finished the configuration of the zone and I’ve logged into it as a root.

 

[pause]

 

Now we’re going to run format and you can see the disk that has come up. One disk is [00:39 inaudible] and it’s 150 gigabytes rather than the default 16 gig. So that’s been successful.

 

If I come out of format and run df-h, there you can see the file systems with the root pool, again, all of 150 gigabytes disk.

 

[pause]

 

Now what I’m going to do is exit from the zone, come out from the console, and I’m going to add another disk device. Again, I’m going to create an emulated volume, 50 gigs this time. I’ll use the -s flag to just use sparse allocation so I don’t use any actual storage until it’s called upon.

 

[pause]

 

I’ll call the device kzone2store. And then I can go into zonecfg-z kzone2. Add a device. Set id=1. Set match=/dev/zvol/rdsk/rpool/kzones/kzone2store. No bootpri needed this time.

 

[pause]

 

End, verify, commit, and exit.

 

Now, that hasn’t changed the running zone. But it has committed the information to the zone static storage and [2:37 inaudible] zones.

 

[pause]

 

If I want the zone to see the disks straight away, I can then do zoneadm – z kzone2 apply. And there is adding the device.

 

If I then go back in, log into the zone and then do format, there’s my second disk. I can select it. Because it’s on an Intel platform, I have to run the fdisk command within format. Just press “y” and now I’ve created a normal a normal zone disk label on that new disk drive.

 

That concludes the tutorial. Just a quick note to remind you that you need to obey. When you’re dealing with the zones, you need to obey the Oracle licensing conditions. There’s a pdf that Oracle provide called hard partitioning with Oracle Solaris Zones that will guide you. You can easily do a Google search of that.

 

[pause]

 

Then lastly, there’s a little tweak to the Global zone that you might need to do when building Kernel zones because the ZFS ARC cache may use a lot of the memory for buffering purposes and it might not be quick enough to release it and you may get a few error messages when you try and use Kernel zones. What that involves is creating a file, etc. system .d called something, whatever you like, and you have to put the set user_reserve_hint=pct option in. Here I’ve set it to a value of 60 which basically assures that I’ll always have 60% of my memory free when I run applications and that this ZFS ARC cache won’t use above 40%.

 

That’s the end of that. Thank you very much indeed.

Copyright SkillBuilders.com 2017

×
Free Online Registration Required

The tutorial session you want to view requires your registering with us.

It’s fast and easy, and totally FREE.

And best of all, once you are registered, you’ll also have access to all the other 100’s of FREE Video Tutorials we offer!

 

×