Skip Navigation Links | |
Exit Print View | |
System Administration Guide: Oracle Solaris Containers-Resource Management and Oracle Solaris Zones Oracle Solaris Legacy Containers |
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)
13. Creating and Administering Resource Pools (Tasks)
14. Resource Management Configuration Example
15. Resource Control Functionality in the Solaris Management Console
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)
27. Oracle Solaris Zones Administration (Overview)
28. Oracle Solaris Zones Administration (Tasks)
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?
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
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 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
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
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)
You can mount file systems in a running non-global zone. The following procedures are covered.
As the global administrator in the global zone, you can import raw and block devices into a non-global zone. After the devices are imported, the zone administrator has access to the disk. The zone administrator can then create a new file system on the disk and perform one of the following actions:
Mount the file system manually
Place the file system in /etc/vfstab so that it will be mounted on zone boot
As the global administrator, you can also mount a file system from the global zone into the non-global zone.
This procedure uses the lofifile driver, which exports a file as a block device.
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.
global# cd /usr/tmp
global# mkfile 10m fsfile
The first available slot, which is /dev/lofi/1 if no other lofi devices have been created, is used.
global# lofiadm -a `pwd`/fsfile
You will also get the required character device.
global# zonecfg -z my-zone zonecfg:my-zone> add device zonecfg:my-zone:device> set match=/dev/rlofi/1 zonecfg:my-zone:device> end zonecfg:my-zone> add device zonecfg:my-zone:device> set match=/dev/lofi/1 zonecfg:my-zone:device> end
global# zoneadm -z my-zone boot
my-zone# ls -l /dev/*lofi/*
You will see a display that is similar to this:
brw------- 1 root sys 147, 1 Jan 7 11:26 /dev/lofi/1 crw------- 1 root sys 147, 1 Jan 7 11:26 /dev/rlofi/1
See Also
For more information, see the lofiadm(1M) and lofi(7D) man pages.
You must be the zone administrator and have the Zone Management profile to perform this procedure. This procedure uses the newfs command, which is described in the newfs(1M) man page.
my-zone# newfs /dev/lofi/1
newfs: construct a new file system /dev/rlofi/1: (y/n)? y
You will see a display that is similar to this:
/dev/rlofi/1: 20468 sectors in 34 cylinders of 1 tracks, 602 sectors 10.0MB in 3 cyl groups (16 c/g, 4.70MB/g, 2240 i/g) super-block backups (for fsck -F ufs -o b=#) at: 32, 9664, 19296,
my-zone# fsck -F ufs /dev/rlofi/1
You will see a display that is similar to this:
** /dev/rlofi/1 ** Last Mounted on ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 2 files, 9 used, 9320 free (16 frags, 1163 blocks, 0.2% fragmentation)
my-zone# mount -F ufs /dev/lofi/1 /mnt
my-zone# grep /mnt /etc/mnttab
You will see a display similar to this:
/dev/lofi/1 /mnt ufs rw,suid,intr,largefiles,xattr,onerror=panic,zone=foo,dev=24c0001 1073503869
This procedure is used to mount the block device /dev/lofi/1 on the file system path /mnt. The block device contains a UFS file system. The following options are used:
logging is used as the mount option.
yes tells the system to automatically mount the file system when the zone boots.
/dev/rlofi/1 is the character (or raw) device. The fsck command is run on the raw device if required.
/dev/lofi/1 /dev/rlofi/1 /mnt ufs 2 yes logging
Assume that a zone has the zonepath /export/home/my-zone. You want to mount the disk /dev/lofi/1 from the global zone into /mnt in the non-global zone.
You must be the global administrator in the global zone to perform this procedure.
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.
global# mount -F ufs /dev/lofi/1 /export/home/my-zone/root/mnt
See Also
For information about lofi, see the lofiadm(1M) and lofi(7D) man pages.