How to create metadb with zpool in Solaris 11

Hi, my root pool is as follows. How can I create a metadb if I want to create SVM volumes?

zpool status
  pool: rpool1
 state: ONLINE
 scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        rpool1      ONLINE       0     0     0
          c4t1d0s0  ONLINE       0     0     0

errors: No known data errors

 df -h
Filesystem             Size   Used  Available Capacity  Mounted on
rpool1/ROOT/solaris     67G   7.9G        40G    17%    /
/devices                 0K     0K         0K     0%    /devices
/dev                     0K     0K         0K     0%    /dev
ctfs                     0K     0K         0K     0%    /system/contract
proc                     0K     0K         0K     0%    /proc
mnttab                   0K     0K         0K     0%    /etc/mnttab
swap                   8.3G   688K       8.3G     1%    /system/volatile
objfs                    0K     0K         0K     0%    /system/object
sharefs                  0K     0K         0K     0%    /etc/dfs/sharetab
fd                       0K     0K         0K     0%    /dev/fd
swap                   8.3G    40K       8.3G     1%    /tmp
rpool1/export           67G    32K        40G     1%    /export
rpool1/export/home      67G    32K        40G     1%    /export/home
rpool1/export/home/mike
                        67G    10G        40G    21%    /export/home/mike
rpool1                  67G    74K        40G     1%    /rpool1
/dev/lofi/2             94M   3.7M        80M     5%    /global/.devices/node@2
/dev/lofi/1             94M   4.4M        80M     6%    /global/.devices/node@1
/export/home/mike      51G    10G        40G    21%    /home/mike

You wouldn't want to use SVM for ZFS file systems. ZFS has the ability to handle mirroring on its own, and is much nicer than SVM.

ZFS Best Practices Guide - Siwiki

One thing to add. You would have to check if there are blocks free on the disk, as you the metadb needs to be on its own slice.

When I installed the OS, I used the whole disk and did not partition with UFS.
So how can I now slice it?

I posted a link earlier, but it said the moderators have to inspect it first before it shows up on this thread. The instructions explain how to setup mirroring.

You don't need SVM with ZFS. ZFS is capable of handling mirroring on its own, and ZFS mirroring is much, MUCH better than SVM.

---------- Post updated at 01:06 AM ---------- Previous update was at 01:02 AM ----------

If you don't have any space left on the disk you're out of luck on adding any additional slices unless you reinstall the OS. However, ZFS can do anything that SVM could do (and more).

Yeah, I know the capabilities of ZFS. I have worked on it somewhat. But the thing now is, I need to create SVM volumes for some purpose and the host Im creating is not using UFS. So, my question is how can I create a metadb on the ZFS root pool, instead of using another disk (eg SAN lun, which is not recommended though).
Re-install the OS is the best option? :frowning:

You want copies of the meta database on both disks you're mirroring, and you would want them to have the same VTOC. If ZFS is taking up the entire physical disk then there won't be anywhere to put your metadb. I don't see you having any other option other than possibly setting up metadb on non-root disks.

1 Like

if you need to create svm mirrors (or other raid level) on external disks, create a "metaset" with these disks and all needed informations are on this disks.

Solaris Volume Manager Administration Guide
Solaris Volume Manager Administration Guide

Yeah, there isn't much point in setting up your meta database on your ZFS disks. You should have your meta database on the disks that you're actually using for LVM.

also your system seems to be a cluster and if you need to share the disks between the hosts, a metaset or a zpool is the only way (beside a vxvm volume) to achieve this...

Thanks alot guys.. Conclusion is that, if I installed S11 using rpool whole disk, do not fall back on SVM. Instead continue using zfs. If installed OS using UFS with free slice, then use SVM. That's it :slight_smile: