• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

UnixArena

  • Home
  • kubernetes
  • DevOps
    • Terraform
    • Jenkins
    • Docker
    • Openshift
      • OKD
    • Ansible engine
    • Ansible Tower
      • AWX
    • Puppet
  • Cloud
    • Azure
    • AWS
    • Openstack
    • Docker
  • VMware
    • vCloud Director
    • VMware-Guests
    • Vcenter Appliance 5.5
    • vC OPS
    • VMware SDDC
    • VMware vSphere 5.x
      • vSphere Network
      • vSphere DS
      • vShield Suite
    • VMware vSphere 6.0
    • VSAN
    • VMware Free Tools
  • Backup
    • Vembu BDR
    • Veeam
    • Nakivo
    • Azure Backup
    • Altaro VMBackup
    • Spinbackup
  • Tutorials
    • Openstack Tutorial
    • Openstack Beginner’s Guide
    • VXVM-Training
    • ZFS-Tutorials
    • NetApp cDot
    • LVM
    • Cisco UCS
    • LDOM
    • Oracle VM for x86
  • Linux
    • How to Articles
    • Q&A
    • Networking
    • RHEL7
  • DevOps Instructor-led Training
  • Contact

How to assign VXFS FS to Solaris local zone from global ?

May 30, 2013 By Cloud_Devops 1 Comment

How to assign different type of filesystems from Solaris global zone to local zone ? The filesystem type could be type of vxfs , zfs or ufs. Oracle Solaris offers various way of assigning filesystem to Solaris zones.But we need to find out the best method for adding different type filesystems  to local zones. The best method must meet the following. 

1. Filesystems can be added to the local zones on fly without rebooting the server.
2. Newly added filesystem should be come up automatically when the zone reboots.

We will differentiate filesystems in to ZFS and Non ZFS. Here we will see about adding/assigning  Non-ZFS filesystems in to local zones and this could be done in two ways.

1.Non ZFS filesystems can be mounted using lofs.(Here i have shown for veritas filesystem)
Existing Setup:

bash-3.00# df -h /vol1
Filesystem             size   used  avail capacity  Mounted on
/dev/vx/dsk/UADG/vol1
                       100M   3.1M    91M     4%    /vol1
bash-3.00# zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global           running    /                              native   shared
  17 sol1             running    /export/zone/sollz1            native   shared

We will see how to add the /vol1 to local zone “sol1” without rebooting it using lofs method.But /vol1 should be mounted in global zone before proceeding the below steps.

bash-3.00# mount -F lofs /vol1 /export/zone/sollz1/root/vol1
mount: Mount point /export/zone/sollz1/root/vol1 does not exist.
bash-3.00# mkdir -p /export/zone/sollz1/root/vol1
bash-3.00# mount -F lofs /vol1 /export/zone/sollz1/root/vol1
bash-3.00# zlogin sol1 df -h /vol1
Filesystem             size   used  avail capacity  Mounted on
/vol1                  100M   3.1M    91M     4%    /vol1

The mount details will look like below for both vxfs & lofs.

bash-3.00# mount -v |grep vol1
/dev/vx/dsk/UADG/vol1 on /vol1 type vxfs read/write/setuid/devices/delaylog/largefiles/qio/ioerror=mwdisable/xattr/dev=4147530 on Thu May 30 20:50:22 2013
/vol1 on /export/zone/sollz1/root/vol1 type lofs read/write/setuid/devices/dev=4147530 on Thu May 30 20:54:29 2013


To make the above work persist across the reboot,you need to add it zonecfg.
Note:/vol1 should be in global zone’s vfstab to mount vxfs across the reboot.

bash-3.00# zonecfg -z sol1
zonecfg:sol1> add fs
zonecfg:sol1:fs> set dir=/vol1
zonecfg:sol1:fs> set special=/vol1
zonecfg:sol1:fs> set type=lofs
zonecfg:sol1:fs> end
zonecfg:sol1> commit
zonecfg:sol1> exit
bash-3.00# zonecfg -z sol1 info
zonename: sol1
zonepath: /export/zone/sollz1
brand: native
autoboot: false
bootargs:
pool:
limitpriv:
scheduling-class:
ip-type: shared
hostid:
inherit-pkg-dir:
        dir: /lib
inherit-pkg-dir:
        dir: /platform
inherit-pkg-dir:
        dir: /sbin
inherit-pkg-dir:
        dir: /usr
fs:
        dir: /vol1
        special: /vol1
        raw not specified
        type: lofs
        options: []

verifying our work,

bash-3.00# zoneadm -z sol1 halt
bash-3.00# zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global           running    /                              native   shared
   - sol1             installed  /export/zone/sollz1            native   shared
bash-3.00# df -h /vol1
Filesystem             size   used  avail capacity  Mounted on
/dev/vx/dsk/UADG/vol1
                       100M   3.1M    91M     4%    /vol1
bash-3.00# mount -v |grep vol1
/dev/vx/dsk/UADG/vol1 on /vol1 type vxfs read/write/setuid/devices/delaylog/largefiles/qio/ioerror=mwdisable/xattr/dev=4147530 on Thu May 30 20:50:22 2013
bash-3.00# zoneadm -z sol1 boot
bash-3.00# mount -v |grep vol1
/dev/vx/dsk/UADG/vol1 on /vol1 type vxfs read/write/setuid/devices/delaylog/largefiles/qio/ioerror=mwdisable/xattr/dev=4147530 on Thu May 30 20:50:22 2013
/vol1 on /export/zone/sollz1/root/vol1 type lofs read/write/setuid/devices/dev=4147530 on Thu May 30 22:01:56 2013
bash-3.00# zlogin sol1 df -h /vol1
Filesystem             size   used  avail capacity  Mounted on
/vol1                  100M   3.1M    91M     4%    /vol1


2.Mounting Non-ZFS filesystem in to local zone’s root path directly.
(Easy and recommend method for adding filesystems to local zone )
In this method,We can directly mount the vxfs filesystems to local zone’s root path.So we no need to mount the filesystem in global and you don;t see it if you do “df -h” .In the first method ,you need to maintain global zone’s vfstab and zone’s configuration.But here just modifying zone’s configuration will be sufficient. 

bash-3.00# zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global           running    /                              native   shared
  18 sol1             running    /export/zone/sollz1            native   shared
bash-3.00# mount -F vxfs /dev/vx/dsk/UADG/vol1 /export/zone/sollz1/root/vol1
bash-3.00# zlogin sol1 df -h /vol1
Filesystem             size   used  avail capacity  Mounted on
/vol1                  100M   3.1M    91M     4%    /vol1

To make the above work persist across the reboot,you need to modify zone’s configuration.

bash-3.00# zonecfg -z sol1
zonecfg:sol1> add fs
zonecfg:sol1:fs> set type=vxfs
zonecfg:sol1:fs> set special=/dev/vx/dsk/UADG/vol1
zonecfg:sol1:fs> set raw=/dev/vx/rdsk/UADG/vol1
zonecfg:sol1:fs> set dir=/vol1
zonecfg:sol1:fs> end
zonecfg:sol1> commit
zonecfg:sol1> verify
zonecfg:sol1> exit
bash-3.00# zoneadm -z sol1 boot
bash-3.00# zlogin sol1 df -h /vol1
Filesystem             size   used  avail capacity  Mounted on
/vol1                  100M   3.1M    91M     4%    /vol1
bash-3.00# df -h /export/zone/sollz1/root/vol1
Filesystem             size   used  avail capacity  Mounted on
/dev/vx/dsk/UADG/vol1
                       100M   3.1M    91M     4%    /export/zone/sollz1/root/vol1


Hope you have learned about assigning/adding veritas filesystem in to local zones.

Thank you for reading this article.

Filed Under: Solaris 10, VXVM, Zones

Reader Interactions

Comments

  1. VIKRANT AGGARWAL says

    June 8, 2013 at 7:16 pm

    Hi Lingeswaran,

    i am trying to create stripe-mirror arrangement in VXVM using four disk, column two with below command
    vxassist -g mydg1 make volume2 1g layout=stripe-mirror ncol=2 disk1 disk2 disk3 disk4

    i want to confirm how much total space will be taken from 4 disks whether it is 4GB or 2GB?

    Thanks in advance

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Follow UnixArena

  • Facebook
  • LinkedIn
  • Twitter

Copyright © 2025 · UnixArena ·

Go to mobile version