One of the most interesting features in Solaris is its ZFS filesystem. Read on for a quick guide to ZFS administration.
ZFS is an open source file system that was developed at Sun Microsystems and runs on OpenSolaris releases and Solaris 10 releases. The ZFS file system was also ported to Fuse, FreeBSD, and Mac OS X releases. In this article, we’ll look at some basic tasks that you can do with ZFS, and how to accomplish them.
ZFS is About Easy Administration
ZFS is a general purpose file system that is built on top of a storage pool. You can use ZFS to reduce the time it takes to manage your storage and your data because ZFS cuts out the middle man. ZFS doesn’t use a virtualized volume layer like other volume management products, so, you can easily aggregate your storage under ZFS with a few simple commands.
ZFS makes it easy to create and manage file systems without needing multiple commands or editing configuration files. You can easily set quotas or reservations, turn compression on or off, manage mount points for numerous file systems, and so on, all with a single command.
ZFS provides unlimited constant-time snapshots. A snapshot is a read-only, point-in-time copy of a file system. Any snapshot can generate a full backup, and any pair of snapshots can generate an incremental backup.
No arbitrary limits exist in ZFS. You can have as many files as you want, including unlimited links, directory entries, snapshots, and so on.
Setting Up Your ZFS Storage Pools and File Systems
ZFS aggregates devices into a storage pool instead of using a volume management layer that virtualizes volumes. A ZFS storage pool describes the physical characteristics of the storage, such as the device layout and data redundancy.
File systems created from a storage pool are allowed to share space with all file systems in the pool. You don’t have to predetermine the size of a file system because file systems grow automatically within the space allocated to the storage pool. When new storage is added, all file systems within the pool can immediately use the additional space.
For redundancy, ZFS supports mirrored, RAID-Z (single parity), or RAIDZ-2 (double parity) configurations. RAID-Z is similar to RAID-5, but uses variable stripe width to eliminate the RAID-5 write hole (stripe corruption due to loss of power between data and parity updates). All RAID-Z writes are full-stripe writes. There’s no read-modify-write tax, no write hole, and the best part, no need for NVRAM in hardware.
Check here for recommendations about the best ZFS redundancy configuration for your storage needs, which describes strategies for using ZFS with storage devices that also provide redundancy. One benefit of using ZFS redundancy is that ZFS is not only able to report, but also repair potential data inconsistencies.
However, if you choose not to implement ZFS redundancy, then ZFS can only report those data inconsistencies.
Create a Simple ZFS Storage Pool
The following example shows how to create a simple, non-redundant (striped) storage pool called users with two 465GB disks.
# zpool create users c1t0d0 c1t1d0
# zpool status users
pool: users
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
users ONLINE 0 0 0
c1t0d0 ONLINE 0 0 0
c2t0d0 ONLINE 0 0 0
errors: No known data errors
The approximate space in this pool is 928 Gbytes.
# zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
users 928G 112K 928G 0% ONLINE -
A ZFS file system is called /users is automatically created and mounted.
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
users 108K 913G 18K /users
A striped configuration doesn’t provide the ZFS redundancy feature to repair data inconsistencies. We can easily convert this pool into a mirrored ZFS configuration to provide device redundancy protection.
For more information, see Convert a Simple ZFS Storage Pool to a Mirrored Storage Pool later in this article.
Create ZFS File Systems
After the pool is created, you can create a hierarchy of ZFS file systems to match your environment.
Each file system has access to all the usable space in the pool.
# zfs create users/userA
# zfs create users/userB
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
users 160K 913G 19K /users
users/userA 18K 913G 18K /users/userA
users/userB 18K 913G 18K /users/userB
If userA needs more disk space, then set a reservation so that userA has this space available.
# zfs set reservation=30GB users/userA
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
users 30.0G 883G 21K /users
users/userA 18K 913G 18K /users/userA
users/userB 18K 883G 18K /users/userB
Next, create snapshots for each user file system in the pool.
# zfs snapshot -r users@today
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
users 30.0G 883G 21K /users
users@today 0 - 21K -
users/userA 18K 913G 18K /users/userA
users/userA@today 0 - 18K -
users/userB 18K 883G 18K /users/userB
users/userB@today 0 - 18K -
Convert a Simple ZFS Storage Pool to a Mirrored Storage Pool
You can convert a non-redundant pool by attaching same size disks to create a mirrored storage pool configuration.
# zpool attach users c1t0d0 c2t0d0
# zpool attach users c1t1d0 c2t1d0
# zpool status
pool: users
state: ONLINE
scrub: resilver completed with 0 errors on Thu Feb 14 14:02:58 2008
config:
NAME STATE READ WRITE CKSUM
users ONLINE 0 0 0
mirror ONLINE 0 0 0
c1t0d0 ONLINE 0 0 0
c2t0d0 ONLINE 0 0 0
mirror ONLINE 0 0 0
c1t1d0 ONLINE 0 0 0
c2t1d0 ONLINE 0 0 0
errors: No known data errors
The above syntax converts the simple striped configuration to a two two-way mirrored configuration by using the zpool attach command. Specify one of the existing disks for each attach operation. The amount of disk space remains the same, but the data protection is greatly increased.
In a ZFS mirrored configuration, you can use the zpool detach and zpool attach features to automatically expand the size of a pool. For more information, see the ZFS Administration Guide.
Replace Devices in a ZFS Storage Pool
You can identify faulted devices with the zpool status command. The output below identifies that c2t1d0 is unavailable.
# zpool status
pool: users
state: DEGRADED
status: One or more devices could not be opened. Sufficient replicas exist for the pool to continue functioning in a degraded state.
action: Attach the missing device and online it using 'zpool online'.
see: http://www.sun.com/msg/ZFS-8000-2Q
scrub: resilver completed with 0 errors on Thu Feb 14 14:17:14 2008
config:
NAME STATE READ WRITE CKSUM
users DEGRADED 0 0 0
mirror ONLINE 0 0 0
c1t0d0 ONLINE 0 0 0
c2t0d0 ONLINE 0 0 0
mirror DEGRADED 0 0 0
c1t1d0 ONLINE 0 0 0
c2t1d0 UNAVAIL 0 0 0 cannot open
errors: No known data errors
Because this is a mirrored configuration with sufficient replication, all data is online and available. After the faulted device is physically replaced, notify ZFS of the replacement with the zpool replace command. The basic steps are:
- Shut down the system (if devices are not hot-pluggable)
- Replace the faulty disk
- Bring the system back up (if devices are not hot-pluggable)
- Notify ZFS of the disk replacement. (For example, c2t1d0 was replaced with an identical device in the same location with
#zpool replace users c2t1d0
.)
In addition to faulty device replacement, you can use the zpool replace
command to expand your existing storage pool with larger disks. For example, if your storage pool consists of 3 100-Gbyte disks (c0t1d0, c1t1d0, c2t1d0), you could replace them with three 300GB disks (c3t1d0, c4t1d0, c5t1d0), by using syntax similar to the following:
# zpool replace pool-name c0t1d0 c3t1d0
# zpool replace pool-name c1t1d0 c4t1d0
# zpool replace pool-name c2t1d0 c5t1d0
Currently, you will need to export and import the pool to see the expanded disk space. For more information, see the ZFS Administration Guide. Keep in mind that the amount of time it takes to copy or resilver data from the original disk to the replacement disk depends on the amount of data on the original disk.
Reduce Hardware Down Time by Using Hot Spares
You can also add spare devices to your storage pool to reduce hardware failure down time, like so:
# zpool add users spare c3t1d0 c4t1d0
# zpool status
pool: users
state: ONLINE
scrub: resilver completed with 0 errors on Thu Feb 14 14:19:01 2008
config:
NAME STATE READ WRITE CKSUM
users ONLINE 0 0 0
mirror ONLINE 0 0 0
c1t0d0 ONLINE 0 0 0
c2t0d0 ONLINE 0 0 0
mirror ONLINE 0 0 0
c1t2d0 ONLINE 0 0 0
c2t1d0 ONLINE 0 0 0
spares
c3t1d0 AVAIL
c4t1d0 AVAIL
If a device in a storage pool fails, the spare automatically kicks in.
Tips on Managing ZFS Storage Pools and File Systems
To close, let’s take a quick look at a few tips for managing ZFS storage pools and file systems.
Set up a zpool scrub schedule to search for data inconsistencies. For more information, see the best practices guide here.
Monitor pool and file system activity with the zpool history
command.
Always notify ZFS when you are going to remove devices from a pool. You cannot detach or offline disks in a non-redundant ZFS configuration. If you remove a disk from the system without notifying ZFS, the pool might become unavailable. For considerations about using ZFS in your environment, see the FAQ.
You can set the redundancy level for file system data by using the ZFS copies property, but setting this property does not protect against all disk failures. For more information about using the copies property, check out the blogs.
For a list of ZFS product reviews and topics, such as using ZFS with iSCSI volumes, databases, and an automatic snapshot services, see this site.
There is, of course, much more to ZFS, but this article should get you started in administering ZFS.
Comments on "Solving Common Administration Problems with ZFS"
http://carinsuranceratesbest.top/car-insurance/car-insurance-for-learner/30-day-car-insurance-for-learner-drivers/ http://autoinsurancequotesme.top/insurance-company/insurance-company-in-the-world/ http://alohathemurrays.com/for-car/what-are-the-cheapest-colors-for-car-insurance/ http://alohathemurrays.com/car-insurance/in-car-insurance/definition-of-partner-in-car-insurance/ http://meznagna.com/best-insurance/the-best-insurance-company/find-the-best-insurance-company/
because http://carscoverageonline.com value other drivers http://autoinsurancemaw.info latest updates state http://carinsuranceratescto.info young possible processes http://gotcargotinsurance.com border many cases http://carisuranceassist.com/ insurance fuel
http://alohathemurrays.com/insurance-rate/car-with-lowest-insurance-rate/
http://autoinsurancemiss.info/ http://autoinsurancemiss.info/car-insurance/car-insurance-drop-at-25/average-car-insurance-drop-at-25/ http://reflectionsevents.com/car-insurance/car-insurance-for-veterans/best-car-insurance-for-veterans/ http://autoinsurancemiss.info/car-insurance/get-cheap-car-insurance/illegal-ways-to-get-cheap-car-insurance/ http://bullheadlodge.com/car-insurance/cheap-car-insurance/cheap-car-insurance-for-special-constables/
http://carinsurancegnomos.info/car-insurance/car-insurance-policy/cancellation-of-car-insurance-policy-letter/ http://reflectionsevents.com/insurance-companies/best-insurance-companies/best-insurance-companies-for-house-and-auto/
http://reflectionsevents.com/free-car-insurance/free-car-insurance-lease/ http://autoinsurancequotesme.top/car-insurance-for/cheap-car-insurance-for/cheap-car-insurance-for-one-month-only/ http://carinsurancegnomos.info/insurance-for-car/hail-insurance-for-car/ http://bullheadlodge.com/car-insurance/general-car-insurance/how-reliable-is-the-general-car-insurance/
http://bullheadlodge.com/insurance-definition/quote-insurance-definition/ http://carinsurancegnomos.info/car-insurance/car-insurance-for-impounded-cars/temporary-car-insurance-for-impounded-cars/ http://carinsuranceratesbest.top/car-insurance-for/car-insurance-for-over-50-female/ http://carinsurancegnomos.info/auto-insurance/21st-auto-insurance-phone-number/
http://autoinsurancequotesme.top/car-insurance-for/car-insurance-for-17-year-old-female/ http://alohathemurrays.com/car-insurance/direct-line-car-insurance-policies/ http://autoinsurancemiss.info/car-insurance/can-you-get-car-insurance-for-6-months/ http://alohathemurrays.com/car-insurance-for/cheap-car-insurance-for-drivers-with-no-claims-bonus/ http://meznagna.com/insurance-coverage/vasectomy-reversal-insurance-coverage/ http://meznagna.com/casualty-insurance/casualty-insurance-company/ocean-harbor-casualty-insurance-company-phone-number/
http://bullheadlodge.com/car-insurance/average-car-insurance/average-car-insurance-rates-per-month-by-state/ http://carinsurancegnomos.info/car-insurance/cheap-house-and-car-insurance/ http://bullheadlodge.com/auto-claims/progressive-insurance-auto-claims-phone-number/ http://carinsurancegnomos.info/car-insurance/state-car-insurance/out-of-state-car-insurance-coverage/ http://reflectionsevents.com/car-insurance/car-insurance-quotes-compare/ http://autoinsurancemiss.info/auto-insurance/direct-auto-insurance-covington-tn/ http://autoinsurancequotesme.top/insurance-companies-in/top-ten-insurance-companies-in-the-world/top-ten-insurance-companies-in-the-world-2012/ http://autoinsurancequotesme.top/car-insurance/car-insurance-policies/liberty-mutual-car-insurance-policies/
http://meznagna.com/car-insurance/how-to-find-out-if-i-have-car-insurance/ http://meznagna.com/car-insurance/get-a-car-insurance/when-is-the-best-time-to-get-a-car-insurance-quote/ http://autoinsurancequotesme.top/car-insurance/century-car-insurance/21-century-car-insurance-login/ http://alohathemurrays.com/car-insurance-quotes/car-insurance-quotes-in-tn/ http://autoinsurancemiss.info/auto-insurance/cheap-auto-insurance/cheap-auto-insurance-75237/
http://autoinsurancequotesme.top/auto-insurance/general-auto-insurance-quotes/ http://carinsurancegnomos.info/insurance-cover/does-car-insurance-cover-repairs/ http://carinsuranceratesbest.top/auto-insurance-companies/cheap-auto-insurance-companies/top-cheap-auto-insurance-companies/ http://meznagna.com/liability-insurance/liability-insurance-definition/umbrella-liability-insurance-definition/ http://autoinsurancemiss.info/for-car/premium-for-car-insurance/ http://carinsuranceratesbest.top/insurance-deals/cheapest-car-insurance-deals/ http://alohathemurrays.com/car-insurance-for/car-insurance-for-multi-car-policy/ http://reflectionsevents.com/best-auto-insurance/best-auto-insurance-for-college-graduates/
http://autoinsurancequotesme.top/insurance-companies/military-auto-insurance-companies/ http://autoinsurancequotesme.top/insurance-compare/short-term-car-insurance-compare-the-market/ http://bullheadlodge.com/car-insurance/my-car-insurance/will-my-car-insurance-go-up/
http://reflectionsevents.com/insurance-quotes/car-insurance-quotes-long-beach-ca/ http://bullheadlodge.com/car-insurance-claim/average-length-of-time-for-car-insurance-claim/ http://autoinsurancequotesme.top/insurance-price/best-auto-insurance-price/ http://autoinsurancemiss.info/auto-insurance-quotes/comparative-auto-insurance-quotes/ http://autoinsurancemiss.info/insurance-cover/what-does-comprehensive-car-insurance-cover/
http://autoinsurancemiss.info/insurance-company/casualty-insurance-company/nova-casualty-insurance-company/ http://carinsurancegnomos.info/car-insurance/union-car-insurance/the-farmers-union-car-insurance/ http://carinsuranceratesbest.top/insurance-reviews/nationwide-insurance-reviews/ http://autoinsurancequotesme.top/for-insurance/marketing-ideas-for-insurance/ http://bullheadlodge.com/compare-car-insurance/go-compare-car-insurance-contact-phone-number/ http://meznagna.com/auto-insurance/auto-insurance-policies/can-i-have-two-auto-insurance-policies/
http://carinsurancegnomos.info/insurance-quote/insurance-quote-without-car/ http://autoinsurancequotesme.top/insurance-policy/auto-insurance-policy/who-is-the-custodian-of-an-auto-insurance-policy/ http://autoinsurancequotesme.top/car-insurance/car-insurance-estimate-no-personal-information/ http://autoinsurancemiss.info/car-insurance/affordable-car-insurance/affordable-car-insurance-in-grand-rapids-mi/ http://carinsuranceratesbest.top/auto-insurance/progressive-auto-insurance/customer-reviews-progressive-auto-insurance/
than girls http://lastminutecarinsurancedeals.com/ find law thus http://carinsurancesniffer.com/ here where like accidents http://autoinsurancecop.com amount
http://alohathemurrays.com/auto-insurance/to-auto-insurance/alternatives-to-auto-insurance/
http://alohathemurrays.com/car-insurance-for/car-insurance-for-vintage-cars/cheap-car-insurance-for-vintage-cars/ http://alohathemurrays.com/cheap-auto-insurance/reviews-on-cheap-auto-insurance/
http://autoinsurancemiss.info/car-insurance/car-insurance-coverage/car-insurance-coverage-on-rentals/ http://bullheadlodge.com/automobile-insurance/automobile-insurance-provider/ http://autoinsurancemiss.info/insurance-rates/car-insurance-rates/mass-car-insurance-rates-by-town/ http://autoinsurancemiss.info/coverage-auto-insurance/full-coverage-auto-insurance/
http://reflectionsevents.com/insurance-agency/rouse-insurance-agency/ http://bullheadlodge.com/insurance-quotes/car-insurance-quotes/get-cheap-car-insurance-quotes/ http://autoinsurancemiss.info/insurance-on/how-much-is-insurance-on-a-scooter/ http://autoinsurancemiss.info/car-insurance-providers/best-multi-car-insurance-providers/ http://meznagna.com/auto-insurance/progressive-auto-insurance/progressive-auto-insurance-quote-comparison/ http://alohathemurrays.com/auto-insurance/lower-your-auto-insurance-rates/
http://bullheadlodge.com/auto-insurance/auto-insurance-cheap/ http://carinsuranceratesbest.top/car-insurance/car-insurance-under-21/cheap-car-insurance-under-21/ http://reflectionsevents.com/insurance-rates/car-insurance-rates-at-25/lower-car-insurance-rates-at-25/ http://carinsurancegnomos.info/car-insurance/car-insurance-comparison/3rd-party-property-car-insurance-comparison/ http://carinsurancegnomos.info/insurance-auto/insurance-auto-reviews/ http://autoinsurancemiss.info/auto-insurance/auto-insurance-by-model/cost-of-auto-insurance-by-model/
http://reflectionsevents.com/auto-insurance/auto-insurance-quote/what-is-an-auto-insurance-quote-yahoo-answers/ http://autoinsurancequotesme.top/car-insurance/car-insurance-quotes-for-full-coverage/ http://autoinsurancemiss.info/auto-insurance/call-progressive-auto-insurance/
http://carinsuranceratesbest.top/insurance-quote/rescue-my-car-insurance-quote/ http://reflectionsevents.com/car-insurance/what-are-points-on-a-car-insurance-quote/ http://carinsurancegnomos.info/car-insurance/car-insurance-for-17-year-olds/ http://carinsuranceratesbest.top/car-insurance/compare-car-insurance-diamond/ http://bullheadlodge.com/car-insurance-for/car-insurance-for-young/reviews-on-car-insurance-for-young-drivers/ http://bullheadlodge.com/car-insurance/how-to-get-cheap-car-insurance-with-zero-no-claims/ http://carinsuranceratesbest.top/car-insurance/car-insurance-roadside-assistance/ http://carinsuranceratesbest.top/car-insurance/car-insurance-customer-service/direct-line-car-insurance-customer-service-number/
http://autoinsurancemiss.info/car-insurance/box-car-insurance/ http://alohathemurrays.com/insurance-company/the-green-insurance-company/
http://meznagna.com/insurance-policies/how-to-look-up-old-car-insurance-policies/ http://carinsuranceratesbest.top/car-insurance/cheap-car-insurance-companies-near-me/
http://alohathemurrays.com/for-car/for-car-insurance/premium-for-car-insurance/ http://reflectionsevents.com/car-insurance/where-can-i-find-car-insurance-groups/ http://reflectionsevents.com/insurance-in/cheapest-car-insurance-in-baton-rouge-la/ http://autoinsurancequotesme.top/car-insurance-quotes/car-insurance-quotes-for-non-us-citizens/ http://carinsurancegnomos.info/auto-insurance/encompass-home-and-auto-insurance-company/encompass-home-and-auto-insurance-company-reading-pa/
eighth http://autoinsurancebit.net automatically system http://carisurancefaq.com/ meet doughnuts too http://gotcargotinsurance.com legal speedy service http://autoinsurancegl.net chance insurance companies http://carisuranceassist.com/ does happen another http://autoinsuranceweb.top insurance providers those credit http://autoinsurancequotesem.us companies
http://bullheadlodge.com/cheap-insurance/car-cheap-insurance/quick-car-cheap-insurance/ http://meznagna.com/car-insurance/on-car-insurance/how-to-get-a-quote-on-car-insurance/ http://reflectionsevents.com/insurance-quotes/cheap-car-insurance-quotes-go-compare/
http://carinsuranceratesbest.top/auto-insurance/imperial-auto-insurance/ http://reflectionsevents.com/car-insurance/car-insurance-best/car-insurance-best-deal/ http://meznagna.com/car-insurance-for/short-term-car-insurance-for-university-students/ http://reflectionsevents.com/car-insurance-quotes/call-for-free-car-insurance-quotes/ http://reflectionsevents.com/car-insurance/new-car-insurance/new-car-insurance-ratings/ http://autoinsurancemiss.info/car-insurance/average-car-insurance/average-car-insurance-single/ http://carinsuranceratesbest.top/compare-car-insurance/compare-car-insurance-tiger/
Use the U?GraphicsBeginPDFContextToFile aand the UIGraphicsBeginPDFConte?tToDataa to shortly create
aand s?e ?DF information with this sample i?S iPhone app.
my site; ogrodzenia modu?owe cena
T?is fitness tracker gadg?t checks iff an individual is ?aving an sufficient train, consuming th? suitable s?rts of foods,
and sleep?ng adequately.
Also visot my website: nowoczesne ogrodzenie domu
Thanks pertaining to discussing the following superb written content on your site. I ran into it on the search engines. I will check back again if you publish extra aricles.
Appreciate it for all your efforts that you have put in this.
Very interesting info.
For two many years he saw the #one movie in America each and every week and
reviewed it for a undertaking referred to as Box Office Democracy.