02-09-2009
# mkfile 1g file1
# mkfile 1g file2
# zpool create zphouston mirror /tmp/file1 /tmp/file2
# df -h /zphouston
Filesystem size used avail capacity Mounted on
zphouston 984M 24K 984M 1% /zphouston
# mkfile 20m /zphouston/20megfile
# sum /zphouston/20megfile |tee /zphouston/sum
0 40960 /zphouston/20megfile
# zpool offline zphouston /tmp/file2
Bringing device /tmp/file2 offline
# zpool status zphouston
pool: zphouston
state: DEGRADED
status: One or more devices has been taken offline by the administrator.
Sufficient replicas exist for the pool to continue functioning in a
degraded state.
action: Online the device using 'zpool online' or replace the device with
'zpool replace'.
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
zphouston DEGRADED 0 0 0
mirror DEGRADED 0 0 0
/tmp/file1 ONLINE 0 0 0
/tmp/file2 OFFLINE 0 0 0
errors: No known data errors
# rm file2
# mkfile 2g file2
# zpool replace zphouston /tmp/file2 /tmp/file2
# zpool status
pool: zphouston
state: DEGRADED
scrub: resilver completed with 0 errors on Mon Feb 9 14:01:22 2009
config:
NAME STATE READ WRITE CKSUM
zphouston DEGRADED 0 0 0
mirror DEGRADED 0 0 0
/tmp/file1 ONLINE 0 0 0
replacing DEGRADED 0 0 0
/tmp/file2/old UNAVAIL 0 0 0 cannot open
/tmp/file2 ONLINE 0 0 0
errors: No known data errors
# (after couple of minutes)
# zpool status zphouston
pool: zphouston
state: ONLINE
scrub: resilver completed with 0 errors on Mon Feb 9 14:01:22 2009
config:
NAME STATE READ WRITE CKSUM
zphouston ONLINE 0 0 0
mirror ONLINE 0 0 0
/tmp/file1 ONLINE 0 0 0
/tmp/file2 ONLINE 0 0 0
errors: No known data errors
# df -h /zphouston
Filesystem size used avail capacity Mounted on
zphouston 984M 20M 964M 3% /zphouston
# zpool detach zphouston /tmp/file1
# df -h /zphouston
Filesystem size used avail capacity Mounted on
zphouston 2.0G 20M 1.9G 1% /zphouston
# zpool status zphouston
pool: zphouston
state: ONLINE
scrub: resilver completed with 0 errors on Mon Feb 9 14:01:22 2009
config:
NAME STATE READ WRITE CKSUM
zphouston ONLINE 0 0 0
/tmp/file2 ONLINE 0 0 0
errors: No known data errors
# df -h /zphouston
Filesystem size used avail capacity Mounted on
zphouston 2.0G 20M 1.9G 1% /zphouston
# rm file1
# mkfile 2g file1
# zpool attach zphouston /tmp/file2 /tmp/file1
# zpool status zphouston
pool: zphouston
state: ONLINE
scrub: resilver completed with 0 errors on Mon Feb 9 14:12:38 2009
config:
NAME STATE READ WRITE CKSUM
zphouston ONLINE 0 0 0
mirror ONLINE 0 0 0
/tmp/file2 ONLINE 0 0 0
/tmp/file1 ONLINE 0 0 0
errors: No known data errors
# df -h /zphouston
Filesystem size used avail capacity Mounted on
zphouston 2.0G 20M 1.9G 1% /zphouston
# sum /zphouston/20megfile
0 40960 /zphouston/20megfile
# cat /zphouston/sum
0 40960 /zphouston/20megfile
#
10 More Discussions You Might Find Interesting
1. Solaris
Hi all
I plan to install Solaris 10U6 on some SPARC server using ZFS as root pool, whereas I would like to keep the current setup done by VxVM:
- 2 internal disks: c0t0d0 and c0t1d0
- bootable root-volume (mirrored, both disks)
- 1 non-mirrored swap slice
- 1 non-mirrored slices for Live... (1 Reply)
Discussion started by: blicki
1 Replies
2. Infrastructure Monitoring
Here are the details.
cnjr-opennms>root$ zfs list
NAME USED AVAIL REFER MOUNTPOINT
openpool 20.6G 46.3G 35.5K /openpool
openpool/ROOT 15.4G 46.3G 18K legacy
openpool/ROOT/rds 15.4G 46.3G 15.3G /
openpool/ROOT/rds/var 102M ... (3 Replies)
Discussion started by: pupp
3 Replies
3. Solaris
I created a pool the other day. I created a 10 gig files just for a test, then deleted it.
I proceeded to create a few files systems. But for some reason the pool shows 10% full, but the files systems are both at 1%? Both files systems share the same pool.
When I ls -al the pool I just... (6 Replies)
Discussion started by: mrlayance
6 Replies
4. Solaris
I need to migrate an existing raidz pool to a new raidz pool with larger disks. I need the mount points and attributes to migrate as well. What is the best procedure to accomplish this. The current pool is 6x36GB disks 202GB capacity and I am migrating to 5x 72GB disks 340GB capacity. (2 Replies)
Discussion started by: jac
2 Replies
5. Solaris
Hi All!
I have been tasked with creating a clustered file system for two systems running Sol 10 u8. These systems have 3 zones each and the global zone has ZFS on the boot disk. We currently have one system sharing an NFS mount to both of these systems.
The root zfs pool status (on the... (2 Replies)
Discussion started by: bluescreen
2 Replies
6. Solaris
Other than export/import, is there a cleaner way to rename a pool without unmounting de FS?
Something like, say "zpool rename a b"?
Thanks. (2 Replies)
Discussion started by: verdepollo
2 Replies
7. Solaris
installed Solaris 11 Express on my server machine a while ago. I created a Z2 RAID over five HDDs and created a few ZFS filesystems on it.
Once I (unintentionally) managed to fill the pool completely with data and (to my surprise) the filesystems stopped working - I could not read/delete any... (3 Replies)
Discussion started by: RychnD
3 Replies
8. Solaris
I messed up my pool by doing zfs send...recive So I got the following :
zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
rpool 928G 17.3G 911G 1% 1.00x ONLINE -
tank1 928G 35.8G 892G 3% 1.00x ONLINE -
So I have "tank1" pool.
zfs get all... (8 Replies)
Discussion started by: eladgrs
8 Replies
9. Solaris
I have a branded zone txdjintra that utilizes a pool named Pool_djintra that is no longer required. There is a 150 Gig Lun assigned to the pool that I need to reassign to another branded zone txpsrsrv07 with a pool named Pool_txpsrsrv07 on the same sun blade. What is the process to do this?
... (0 Replies)
Discussion started by: jeffsr
0 Replies
10. Solaris
I accidently added a disk in different zpool instead of pool, where I want.
root@prtdrd21:/# zpool status cvfdb2_app_pool
pool: cvfdb2_app_pool
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
cvfdb2_app_pool ONLINE 0 0 0... (1 Reply)
Discussion started by: solaris_1977
1 Replies
ZDIFF(1) BSD General Commands Manual ZDIFF(1)
NAME
zcmp, zdiff -- compare compressed files
SYNOPSIS
zcmp [options] file [file2]
zdiff [options] file [file2]
DESCRIPTION
zcmp and zdiff are filters that invoke cmp(1) or diff(1) respectively to compare compressed files. Any options that are specified are passed
to cmp(1) or diff(1).
If only file1 is specified, it is compared against a file with the same name, but with the extension removed. When both file1 or file2 are
specified, either file may be compressed.
Extensions handled by gzip(1):
o z, Z,
o gz,
o taz,
o tgz.
Extensions handled by bzip2(1):
o bz,
o bz2,
o tbz,
o tbz2.
Extensions handled by xz(1):
o lzma,
o xz,
o tlz,
o txz.
ENVIRONMENT
TMPDIR Directory in which to place temporary files. If unset, /tmp is used.
FILES
/tmp/zcmp.XXXXXXXXXX Temporary file for zcmp.
/tmp/zdiff.XXXXXXXXXX Temporary file for zdiff.
SEE ALSO
bzip2(1), cmp(1), diff(1), gzip(1), xz(1)
CAVEATS
zcmp and zdiff rely solely on the file extension to determine what is, or is not, a compressed file. Consequently, the following are not
supported as arguments:
- directories
- device special files
- filenames indicating the standard input (``-'')
BSD
May 23, 2011 BSD