Solaris ZFS File System instance Configuration

Source: Internet
Author: User

ZFS file system is an important feature of Solaris 10. instance configuration allows you to learn more about ZFS file system configurations.
1. Solaris disk Basics
1. How to view Disks
# Format
Available disk selections:
0. c0d1 <xxx cyl 6524 alt 2 hd 255 sec 63>
/Pci @ 0, 0/pci-ide @ 7, 1/ide @ 1/cm
1. c1t0d0 <VMware,-VMwareVirtualS-1.0 cyl 1302 alt 2 hd 255 sec 63>
/Pci @ 1976/pci15ad, @ 10/sd @
2. c1t1d0 <VMware,-VMware Virtual S-1.0-10.00GB>
/Pci @ 1976/pci15ad, @ 10/sd @
3. c1t2d0 <VMware,-VMware Virtual-1.0 cyl 1303 alt 2 hd 255 sec 63>
/Pci @ 1976/pci15ad, @ 10/sd @
4. c1t3d0 <VMware,-VMware Virtual S-1.0-10.00GB>
/Pci @ 1976/pci15ad, @ 10/sd @
Specify disk (enter its number): 3
# Quit exit

2. How to view disk capacity
# Iostat-E

Ii. ZFS File System Configuration
1. Create zpool (raid0)
Create a zfs file system named first
# Zpool create-f first c1t0d0 c1t1d0 c1t2d0
'First' successfully created, but with no redundancy; failure of one
Device will cause loss of the pool
# It indicates that the three disks are not redundant, but all the disks are damaged.
# The Hard Disk added to the pool is the whole disk, which facilitates the management of the hard disk by the pool.
# Ufs has been used before the disk added to the pool. Therefore, you must use the-f option during the creation process to ignore the ufs file format and forcibly Add the hard disk to the pool.

Resize the pool
# Zpool add first c1t3d0
-N results after Simulated resizing
-F Force Execution
# Zpool add-n-f first c1t3d0
Wocould update 'first' to the following configuration:

2. Create an image pool. Generally, the two disks have the same size (raid1)
# Zpool create-f first mirror c1t0d0 c1t1d0
3. Create a mirror pool (raid 10)
# Zpool create-f first mirror c1t0d0 c1t1d0 mirror c1t2d0 c1t3d0
4. Create raidz zpool (raid5)
# Zpool create first raidz2 c1t0d0 c1t1d0 c1t2d0 c1t3d0
5. Create a raid zpool and add a hot spare disk.
# Zpool create first raidz2 c1t0d0 c1t1d0 c1t2d0 spare c1t3d0
(1) Add a hot spare Disk
# Zpool add first spare c1t3d0
(2) Delete hot spare Disk
# Zpool remove first c1t3d0
6. Image and image splitting
(1) create an image
If the physical disk is single when zpool is created, you can mirror it. The command format is
# Zpool attach first old disk new disk
# Zpool attach first c1t0d0 c1t1d0
(2) split the image (opposite to the image process because it affects data)
# Zpool detach first c1t1d0

7. Delete zpool
# Zpool destroy poolname
# Zpool destroy-f poolname

8. view the zpool list and status
# Zpool list
# Zpool status [-x] [-v]
# Purpose of verification
# Zpool scrub poolname
# Purpose of verification, which usually takes a long time,
# Check the check progress in zpool status. It is best to check the check progress once in case of hardware problems.

9. Create a File System
Classic example
1) create a u01 File System
# Zfs create first/u01
2) mount it to the/u01 directory. You can directly use it without mounting it.
# Zfs set mountpoint =/u01 first/u01
3) set the disk quota
# Zfs set quota = 20G first/u01
Create Snapshot
1) create a snapshot
# Zfs snapshot first/u01 @ OK
2) Restore snapshots
# Zfs rollback first/u01 @ OK
3) Delete snapshots and ZFS file systems
Note: When you delete a snapshot of u01, add the-R parameter to the same source to delete the snapshot. Use it with caution.
# Zfs destroy-R first/u01 @ OK

Create a ZFS clone:
Create a zfs directory using a snapshot
# Zfs clone first/u01 @ OK first/bak

Recommended reading:

Build an nfs Network File System server in Ubuntu

How to mount the file system of another Linx server on a Linux Server

MFS file system deployment (2 servers)

Configure the ACFS Cluster File System on CentOS 5.8

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.