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!

 

×
Podcast
×
Transcript

Shadow migration and Splitting a Mirrored Zpool

Another handy facility is something called shadow migration where you can take an existing local or remote file system, UFS, ZFS or whatever, NFS mounted, if you like, and you can migrate it to a ZFS dataset and be using that new ZFS dataset as though it was a complete file system while the migration is going on. 

You can only do copy from a read-only file system. So if you’d at the bottom here you can see that you have to have the read-only property on a ZFS dataset. If it’s a UFS local 1 then remount it with the read-only option. If it’s NFS make sure it’s shared read-only from the server. 

[pause]

Secondly, you have to have an additional package installed which might not have been there when you installed Solaris 11 in the first place and you have to do PKG install shadow migration. You can learn more about the packaging system and installing Solaris on the full 5-day transition to Solaris 11 course that’s available from SkillBuilders. 

[pause]

Once that’s installed, imagine that we have a remote machine that has a directory on it called /software. As it happens, I happen to have one here, the name of the machine is actually whale so the command I’m going to use is slightly different and I’m going to put it into my rpool because I have more space available in that particular zpool. So I’m going to do zfs create -o shadow = nfs://whale (which is my server)/software rpool/software. 

[pause]

The prompt came straight back. The migration is going on in the background. I should be able to ls/rpool/software, and the actual source of /software has got quite a bit of stuff contained within it – various course templates and Solaris distribution and so forth – but I can access it as it’s already complete. So you can use that dataset and that directory quite happily as though the whole thing is there. In fact, you can use shadowstat to watch the progress of the migration. It’s complaining that I don’t have the shadowd demon enabled. So shadowd – and let’s try shadowstat this time. 

[pause]

Hopefully, this will start out putting some data to me fairly soon. There we go. The transfer is treated as a bit of a background process and the program does seem a little bit erratic. You can see sometimes you’re reported on the amount of space left and sometimes it doesn’t. 

[pause]

Here is an example, if I do a control C, I have this. You can do df -h, and let’s have a look for whale, and there you can see the mount. When the migration is completed, the file system will be unmounted. So we can leave that running. Hopefully, it won’t fill up my rpool before the end of the presentation. 

[pause]

The last thing I want to show you is how you can actually split a zpool. Now this can be done on any sort of mirrored pool. Obviously, you need a mirror so you can split a mirrored component. But what you could do on a small scale server you could, for example, add an external disc drive and zpool attach it to your root pool. Wait until the disc is re-silvered and then split the pool and you’ve effectively got a back-up and you can actually mount that pool, you can import it on another mount point on the same machine or indeed because it’s an external removable drive, you can take it somewhere else and mount it there. So it’s quite useful. 

[pause]

If you just do a zpool split, the last device that you added is the one that is split away but you can give the command line another option which allows you to define the actual physical component you want to split. 

[pause]

Here’s an example of a zpool that has got a two mirror component. Let’s make one. 

[pause]

Let’s use lakenodedup because there’s not an awful lot of space actually occupied. 

[pause]

Why don’t we use lakededup instead? 

[pause]

They are attaching a new component to the existing component, c2d3s1. It wasn’t a mirror before, it will now be a mirror through the wonders of the zpool command, which hopefully we can see. 

[pause]

There we go. The system’s a bit tied up doing lots of disc work. Let’s just have a look at lakededup, shall we? That’s better. And it’s already re-silvered. Wasn’t that amazing? So let’s split it. 

[pause]

There, we split it.

[pause]

We still have our lakededup mounted. And there’s not a mirror anymore, we’ve removed one of the components. 

[pause]

If we do a zpool import, we can see that the zpool split has created a new pool which hasn’t been imported by default. So we can do a zpool import, lakededup new. 

[pause]

And there it is on a completely different mount point, and we can use it as a separate pool. So that used the most recent disc I added to create the split pool. I can actually specify – if you look on the left-hand side you can see I can actually specify the device name to split away. You can also split and automatically mount by using the -R and the directory name to automatically import and mount the split away pool. 

[pause]

There are other features with ZFS in Solaris 11 including a new SCSI server and client mechanism. Also, you can now encrypt datasets as well. A lot of a new features and well worth to switch to Solaris 11. I hope you’ve enjoyed the presentation and I hope the features were of interest to you. Thanks for attending and we hope to see you on the full transition to Solaris 11 course. 

Please feel free to contact SkillBuilders, www.SkillBuilders.com. SkillBuilders have skills in lots of different Oracle areas including Oracle database, database administration, database development, database performance tuning, database stabilization projects, and in addition, skills with the Oracle servers especially the new T series, T4s. 

Thank you very much indeed.

Copyright SkillBuilders.com 2017

×