This discussion is archived
4 Replies Latest reply: Jan 29, 2013 3:40 PM by cindys RSS

Create ZONE in ZFS pool solaris10

manin21 Newbie
Currently Being Moderated
Hi Gurus,

I'm reading some solaris 10 tutorials about ZFS and Zones. Is it possible to create a new storage pool using my current hard disk in which I installed solaris???

I'm a bit new in Solaris, I have a SPARC box in which I'm learnin about solaris 10. I have installed Solaris 10 using ZFS file system. I think my box only have 1 disk but not sure. I see 46 GB of free space running "df -kh " command

I run "format" command, this is the output

root@orclidm # format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
0. c0t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
/pci@780/pci@0/pci@9/scsi@0/sd@0,0
1. c0t1d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
/pci@780/pci@0/pci@9/scsi@0/sd@1,0
Specify disk (enter its number):

zpool list "display this:"

root@orclidm # zpool list
NAME SIZE ALLOC FREE CAP HEALTH ALTROOT
rpool 68G 13.1G 54.9G 19% ONLINE -

zfs list "display this:"
root@orclidm # zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 21.3G 45.6G 106K /rpool
rpool/ROOT 11.6G 45.6G 31K legacy
rpool/ROOT/s10s_u10wos_17b 11.6G 45.6G 11.6G /
rpool/dump 1.50G 45.6G 1.50G -
rpool/export 66K 45.6G 32K /export
rpool/export/home 34K 45.6G 34K /export/home
rpool/swap 8.25G 53.9G 16K -

I read in a tutorial that when you create a zpool you need to specify an empty hard disk, is that correct?

Please point me on the best approach to create zones using zfs pools.

Regards
  • 1. Re: Create ZONE in ZFS pool solaris10
    bigdelboy Pro
    Currently Being Moderated
    manin21 wrote:
    Hi Gurus,

    I'm reading some solaris 10 tutorials about ZFS and Zones. Is it possible to create a new storage pool using my current hard disk in which I installed solaris???
    IF you have a spare partition you may use that.

    >
    I'm a bit new in Solaris, I have a SPARC box in which I'm learnin about solaris 10. I have installed Solaris 10 using ZFS file system. I think my box only have 1 disk but not sure. I see 46 GB of free space running "df -kh " command

    I run "format" command, this is the output

    root@orclidm # format
    Searching for disks...done


    AVAILABLE DISK SELECTIONS:
    0. c0t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
    /pci@780/pci@0/pci@9/scsi@0/sd@0,0
    1. c0t1d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
    /pci@780/pci@0/pci@9/scsi@0/sd@1,0
    Specify disk (enter its number):
    This shows two disks. In a production setup you might mirror this.

    zpool list "display this:"

    root@orclidm # zpool list
    NAME SIZE ALLOC FREE CAP HEALTH ALTROOT
    rpool 68G 13.1G 54.9G 19% ONLINE -
    The command:

    zpool status

    would show you what devices you are using
    zfs list "display this:"
    root@orclidm # zfs list
    NAME USED AVAIL REFER MOUNTPOINT
    rpool 21.3G 45.6G 106K /rpool
    rpool/ROOT 11.6G 45.6G 31K legacy
    rpool/ROOT/s10s_u10wos_17b 11.6G 45.6G 11.6G /
    rpool/dump 1.50G 45.6G 1.50G -
    rpool/export 66K 45.6G 32K /export
    rpool/export/home 34K 45.6G 34K /export/home
    rpool/swap 8.25G 53.9G 16K -

    I read in a tutorial that when you create a zpool you need to specify an empty hard disk, is that correct?
    No.

    You can use partions/slices instead. A zone storage pool is composed of one or more devices; each device can be a a whole disk, disk slice or even a file if i remember correctly ( .... but you really dont want to use a file normally).
    Please point me on the best approach to create zones using zfs pools.

    Regards
    Your storage rpool is 68GB in size on a 72GB disk .... therefore the disk is full up and their is no space for another zfs pool. If zpool status shows your disk is mirrored by zfs that is that. Otherwise you may choose to create a storage pool on the other disk (not best production practice).

    often one creates a zfs filesystem out of an existing filesystem.

    zfs create -o mountpoint=/zones rpool/zones
    zfs create rpool/zones/myzone

    Then use zonepath=/zones/myzone creating the zone.

    - I was googling to cross check my answer ... the following blog has an example but it is a little old and may be opensolaris orientated.
    https://blogs.oracle.com/DanX/entry/solaris_zfs_and_zones_simple

    Authorative information is at http://docs.oracle.com, notably:

    http://docs.oracle.com/cd/E23823_01/index.html

    http://docs.oracle.com/cd/E23823_01/html/819-5461/index.html
    http://docs.oracle.com/cd/E18752_01/html/817-1592/index.html
  • 2. Re: Create ZONE in ZFS pool solaris10
    cindys Pro
    Currently Being Moderated
    Welcome to ZFS land. :-)

    This particular system is limited to 2 devices so you are limited in how you can configure your pools.
    Can you add additional disks eventually?

    If so, I would recommend:

    1 disk for rpool
    1 disk for non-rpool (data pool for zones and stuff)

    Then, mirror each of these if you add more disks to this system:

    # zpool attach rpool disk1 disk3
    # zpool attach dpool disk2 disk3

    If not, then a mirrored root pool is another option. I would not recommend partitioning disks (other than the rpool disk),
    which is required for booting, because disk partitioning is more difficult to manage. Your existing rpool disk is already
    used so you can create a new file system, like rpool/zoneA.

    If you are going to use zones and you also want to upgrade this system with Live Upgrade, then please
    review the supported ZFS/zones configuration information, here:

    http://docs.oracle.com/cd/E23823_01/html/819-5461/ggpdm.html#gigek

    Thanks, Cindy
  • 3. Re: Create ZONE in ZFS pool solaris10
    manin21 Newbie
    Currently Being Moderated
    Hi Bigdelboy, Cindy.

    Thanks for sharing your expertise. This is the display from "zpool status". I'm not planning to attach more disks

    root@orclidm # zpool status
    pool: rpool
    state: ONLINE
    scan: none requested
    config:

    NAME STATE READ WRITE CKSUM
    rpool ONLINE 0 0 0
    c0t0d0s0 ONLINE 0 0 0

    errors: No known data errors

    From your helpuful comments I understand that, in my case, Shall I proceed in the following way (as suggested by bigdelboy) without risk of damaging my system?:

    often one creates a zfs filesystem out of an existing filesystem.

    zfs create -o mountpoint=/zones rpool/zones
    zfs create rpool/zones/myzone

    Then use zonepath=/zones/myzone creating the zone.

    Thanks for your support.

    Regards
  • 4. Re: Create ZONE in ZFS pool solaris10
    cindys Pro
    Currently Being Moderated
    Yes, you can create that file system and it won't harm your system,
    just take some time to understand the mount point value and so on.

    And also review some of the zone configuration info that I sent you.

    Thanks, Cindy

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points