JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Oracle Solaris Containers-Resource Management and Oracle Solaris Zones     Oracle Solaris 10 1/13 Information Library
search filter icon
search icon

Document Information

Preface

Part I Resource Management

1.  Introduction to Solaris 10 Resource Management

2.  Projects and Tasks (Overview)

3.  Administering Projects and Tasks

4.  Extended Accounting (Overview)

5.  Administering Extended Accounting (Tasks)

6.  Resource Controls (Overview)

7.  Administering Resource Controls (Tasks)

8.  Fair Share Scheduler (Overview)

9.  Administering the Fair Share Scheduler (Tasks)

10.  Physical Memory Control Using the Resource Capping Daemon (Overview)

11.  Administering the Resource Capping Daemon (Tasks)

12.  Resource Pools (Overview)

13.  Creating and Administering Resource Pools (Tasks)

14.  Resource Management Configuration Example

15.  Resource Control Functionality in the Solaris Management Console

Part II Zones

16.  Introduction to Solaris Zones

17.  Non-Global Zone Configuration (Overview)

18.  Planning and Configuring Non-Global Zones (Tasks)

19.  About Installing, Halting, Cloning, and Uninstalling Non-Global Zones (Overview)

20.  Installing, Booting, Halting, Uninstalling, and Cloning Non-Global Zones (Tasks)

21.  Non-Global Zone Login (Overview)

22.  Logging In to Non-Global Zones (Tasks)

23.  Moving and Migrating Non-Global Zones (Tasks)

24.  Oracle Solaris 10 9/10: Migrating a Physical Oracle Solaris System Into a Zone (Tasks)

25.  About Packages and Patches on an Oracle Solaris System With Zones Installed (Overview)

26.  Adding and Removing Packages and Patches on an Oracle Solaris System With Zones Installed (Tasks)

27.  Oracle Solaris Zones Administration (Overview)

28.  Oracle Solaris Zones Administration (Tasks)

What's New in This Chapter?

What's New in This Chapter for Oracle Solaris 10 1/06?

What's New in This Chapter for Oracle Solaris 10 6/06?

What's New in This Chapter for Oracle Solaris 10 8/07?

Using the ppriv Utility

How to List Oracle Solaris Privileges in the Global Zone

How to List the Non-Global Zone's Privilege Set

How to List a Non-Global Zone's Privilege Set With Verbose Output

Using DTrace in a Non-Global Zone

How to Use DTrace

Checking the Status of SMF Services in a Non-Global Zone

How to Check the Status of SMF Services From the Command Line

How to Check the Status of SMF Services From Within a Zone

Mounting File Systems in Running Non-Global Zones

How to Import Raw and Block Devices by Using zonecfg

How to Mount the File System Manually

How to Place a File System in /etc/vfstab to Be Mounted When the Zone Boots

How to Mount a File System From the Global Zone Into a Non-Global Zone

Adding Non-Global Zone Access to Specific File Systems in the Global Zone

How to Add Access to CD or DVD Media in a Non-Global Zone

How to Add a Writable Directory under /usr in a Non-Global Zone

How to Export Home Directories in the Global Zone Into a Non-Global Zone

Using IP Network Multipathing on an Oracle Solaris System With Zones Installed

Oracle Solaris 10 8/07: How to Use IP Network Multipathing in Exclusive-IP Non-Global Zones

How to Extend IP Network Multipathing Functionality to Shared-IP Non-Global Zones

Oracle Solaris 10 8/07: Administering Data-Links in Exclusive-IP Non-Global Zones

How to Use dladm show-linkprop

How to Use dladm set-linkprop

How to Use dladm reset-linkprop

Using the Fair Share Scheduler on an Oracle Oracle Solaris System With Zones Installed

How to Set FSS Shares in the Global Zone Using the prctl Command

How to Change the zone.cpu-shares Value in a Zone Dynamically

Using Rights Profiles in Zone Administration

How to Assign the Zone Management Profile

Example--Using Profile Shells With Zone Commands

Backing Up an Oracle Solaris System With Installed Zones

How to Use ufsdump to Perform Backups

How to Create a UFS Snapshot Using fssnap

How to Use find and cpio to Perform Backups

How to Print a Copy of a Zone Configuration

Restoring a Non-Global Zone

How to Restore an Individual Non-Global Zone

29.  Upgrading an Oracle Solaris 10 System That Has Installed Non-Global Zones

30.  Troubleshooting Miscellaneous Oracle Solaris Zones Problems

Part III lx Branded Zones

31.  About Branded Zones and the Linux Branded Zone

32.  Planning the lx Branded Zone Configuration (Overview)

33.  Configuring the lx Branded Zone (Tasks)

34.  About Installing, Booting, Halting, Cloning, and Uninstalling lx Branded Zones (Overview)

35.  Installing, Booting, Halting, Uninstalling and Cloning lx Branded Zones (Tasks)

36.  Logging In to lx Branded Zones (Tasks)

37.  Moving and Migrating lx Branded Zones (Tasks)

38.  Administering and Running Applications in lx Branded Zones (Tasks)

Glossary

Index

Backing Up an Oracle Solaris System With Installed Zones

The following procedures can be used to back up files in zones. Remember to also back up the zones' configuration files.

How to Use ufsdump to Perform Backups

You can perform full or incremental backups using the ufsdump command. This procedure backs up the zone /export/my-zone to /backup/my-zone.ufsdump, where my-zone is replaced with the name of a zone on your system. You might want to have a separate file system, for example, a file system mounted on /backup, to hold the backups.

  1. Become superuser, or assume the Primary Administrator role.

    To create the role and assign the role to a user, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. (Optional) Shut down the zone to put the zone in a quiescent state and to avoid creating backups of shared file systems.
    global# zlogin -S my-zone init 0
  3. Check the zone's status.
    global# zoneadm list -cv

    You will see a display similar to the following:

    ID  NAME     STATUS       PATH                           BRAND      IP
     0  global   running      /                              native     shared
     -  my-zone  installed    /export/home/my-zone           native     shared
  4. Perform the backup.
    global# ufsdump 0f /backup/my-zone.ufsdump /export/my-zone

    You will see a display similar to the following:

    DUMP: Date of this level 0 dump: Wed Aug 10 16:13:52 2005
    DUMP: Date of last level 0 dump: the epoch
    DUMP: Dumping /dev/rdsk/c0t0d0s0 (bird:/) to /backup/my-zone.ufsdump. 
    DUMP: Mapping (Pass I) [regular files]
    DUMP: Mapping (Pass II) [directories]
    DUMP: Writing 63 Kilobyte records
    DUMP: Estimated 363468 blocks (174.47MB).
    DUMP: Dumping (Pass III) [directories]
    DUMP: Dumping (Pass IV) [regular files]
    DUMP: 369934 blocks (180.63MB) on 1 volume at 432 KB/sec
    DUMP: DUMP IS DONE
  5. Boot the zone.
    global# zoneadm -z my-zone boot

How to Create a UFS Snapshot Using fssnap

This approach uses the fssnap command, which creates a temporary image of a file system intended for backup operations.

This method can be used to provide a clean, consistent backup of the zone files only, and it can be executed while zones are running. However, it is a good idea to suspend or checkpoint active applications that are updating files when the snapshot is created. An application updating files when the snapshot is created might leave these files in an internally inconsistent, truncated, or otherwise unusable state.

In the example procedure below, note the following:

Before You Begin

The destination backup is /backup/my-zone.ufsdump. You must create the directory backup under /.

  1. Become superuser, or assume the Primary Administrator role.

    To create the role and assign the role to a user, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. Create the snapshot.
    global# fssnap -o bs=/export /export/home

    You will see a display similar to the following:

    dev/fssnap/0
  3. Mount the snapshot.
    global# mount -o ro /dev/fssnap/0 /mnt
  4. Back up my-zone from the snapshot.
    global# ufsdump 0f /backup/my-zone.ufsdump /mnt/my-zone

    You will see a display similar to the following:

    DUMP: Date of this level 0 dump: Thu Oct 06 15:13:07 2005
       DUMP: Date of last level 0 dump: the epoch
       DUMP: Dumping /dev/rfssnap/0 (pc2:/mnt) to /backup/my-zone.ufsdump.
       DUMP: Mapping (Pass I) [regular files]
       DUMP: Mapping (Pass II) [directories]
       DUMP: Writing 32 Kilobyte records
       DUMP: Estimated 176028 blocks (85.95MB).
       DUMP: Dumping (Pass III) [directories]
       DUMP: Dumping (Pass IV) [regular files]
       DUMP: 175614 blocks (85.75MB) on 1 volume at 2731 KB/sec
       DUMP: DUMP IS DONE
  5. Unmount the snapshot.
    global# umount /mnt
  6. Delete the snapshot.
    global# fssnap -d /dev/fssnap/0

    Note that the snapshot is also removed from the system when the system is rebooted.

How to Use find and cpio to Perform Backups

  1. Become superuser, or assume the Primary Administrator role.

    To create the role and assign the role to a user, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. Change directories to the root directory.
    global# cd /
  3. Back up my-zone files that are not loopback mounted to /backup/my-zone.cpio.
    global# find export/my-zone -fstype lofs -prune -o -local
     | cpio -oc -O /backup/my-zone.cpio type as one line
  4. Verify the results.
    global# ls -l backup/my-zone.cpio

    You will see a display similar to the following:

    -rwxr-xr-x   1 root     root     99680256 Aug 10 16:13 backup/my-zone.cpio

How to Print a Copy of a Zone Configuration

You should create backup files of your non-global zone configurations. You can use the backups to recreate the zones later, if necessary. Create the copy of the zone's configuration after you have logged in to the zone for the first time and have responded to the sysidtool questions. This procedure uses a zone named my-zone and a backup file named my-zone.config to illustrate the process.

  1. Become superuser, or assume the Primary Administrator role.

    To create the role and assign the role to a user, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. Print the configuration for the zone my-zone to a file named my-zone.config.
    global# zonecfg -z my-zone export > my-zone.config