https://itsjustbytes.wordpress.com/2020/05/10/zfs-command-line-reference-cheat-sheet/
Pool Related Commands # zpool create datapool c0t0d0Create a basic pool named datapool# zpool create -f datapool c0t0d0Force the creation of a pool# zpool create -m /data datapool c0t0d0Create a pool with a different mount point than the default.# zpool create datapool raidz c3t0d0 c3t1d0 c3t2d0Create RAID-Z vdev pool# zpool add datapool raidz c4t0d0 c4t1d0…
Skip to content{.skip-link .screen-reader-text}
It's Just Bytes...{rel="home"}
Somethings are useful, others not so much.
Menu
roadglide03{rel="author"} Computer{rel="category tag"}, Linux{rel="category tag"}, OEL{rel="category tag"}, Solaris{rel="category tag"}, Storage{rel="category tag"}, ZFS{rel="category tag"} May 10, 2020May 8, 2020 3 Minutes
# zpool create datapool c0t0d0 | Create a basic pool named datapool |
# zpool create -f datapool c0t0d0 | Force the creation of a pool |
# zpool create -m /data datapool c0t0d0 | Create a pool with a different mount point than the default. |
# zpool create datapool raidz c3t0d0 c3t1d0 c3t2d0 | Create RAID-Z vdev pool |
# zpool add datapool raidz c4t0d0 c4t1d0 c4t2d0 | Add RAID-Z vdev to pool datapool |
# zpool create datapool raidz1 c0t0d0 c0t1d0 c0t2d0 c0t3d0 c0t4d0 c0t5d0 | Create RAID-Z1 pool |
# zpool create datapool raidz2 c0t0d0 c0t1d0 c0t2d0 c0t3d0 c0t4d0 c0t5d0 | Create RAID-Z2 pool |
# zpool create datapool mirror c0t0d0 c0t5d0 | Mirror c0t0d0 to c0t5d0 |
# zpool create datapool mirror c0t0d0 c0t5d0 mirror c0t2d0 c0t4d0 | disk c0t0d0 is mirrored with c0t5d0 and disk c0t2d0 is mirrored withc0t4d0 |
# zpool add datapool mirror c3t0d0 c3t1d0 | Add new mirrored vdev to datapool |
# zpool add datapool spare c1t3d0 | Add spare device c1t3d0 to the datapool |
## zpool create -n geekpool c1t3d0 | Do a dry run on pool creation |
# zpool status -x | Show pool status |
# zpool status -v datapool | Show individual pool status in verbose mode |
# zpool list | Show all the pools |
# zpool list -o name,size | Show particular properties of all the pools (here, name and size) |
# zpool list -Ho name | Show all pools without headers and columns |
# zfs create datapool/fs1 | Create file-system fs1 under datapool |
# zfs create -V 1gb datapool/vol01 | Create 1 GB volume (Block device) in datapool |
# zfs destroy -r datapool | destroy datapool and all datasets under it. |
# zfs destroy -fr datapool/data | destroy file-system or volume (data) and all related snapshots |
# zfs set quota=1G datapool/fs1 | Set quota of 1 GB on filesystem fs1 |
# zfs set reservation=1G datapool/fs1 | Set Reservation of 1 GB on filesystem fs1 |
# zfs set mountpoint=legacy datapool/fs1 | Disable ZFS auto mounting and enable mounting through /etc/vfstab. |
# zfs set sharenfs=on datapool/fs1 | Share fs1 as NFS |
# zfs set compression=on datapool/fs1 | Enable compression on fs1 |
# zfs create datapool/fs1 | Create file-system fs1 under datapool |
# zfs create -V 1gb datapool/vol01 | Create 1 GB volume (Block device) in datapool |
# zfs destroy -r datapool | destroy datapool and all datasets under it. |
# zfs destroy -fr datapool/data | destroy file-system or volume (data) and all related snapshots |
# zfs list | List all ZFS file system |
# zfs get all datapool” | List all properties of a ZFS file system |
# zfs set mountpoint=/data datapool/fs1 | Set the mount-point of file system fs1 to /data |
# zfs mount datapool/fs1 | Mount fs1 file system |
# zfs umount datapool/fs1 | Umount ZFS file system fs1 |
# zfs mount -a | Mount all ZFS file systems |
# zfs umount -a | Umount all ZFS file systems |
# zpool iostat 2 | Display ZFS I/O Statistics every 2 seconds |
# zpool iostat -v 2 | Display detailed ZFS I/O statistics every 2 seconds |
# zpool scrub datapool | Run scrub on all file systems under data pool |
# zpool offline -t datapool c0t0d0 | Temporarily offline a disk (until next reboot) |
# zpool online | Online a disk to clear error count |
# zpool clear | Clear error count without a need to the disk |
# zpool import | List pools available for import |
# zpool import -a | Imports all pools found in the search directories |
# zpool import -d | To search for pools with block devices not located in /dev/dsk |
# zpool import -d /zfs datapool | Search for a pool with block devices created in /zfs |
# zpool import oldpool newpool | Import a pool originally named oldpool under new name newpool |
# zpool import 3987837483 | Import pool using pool ID |
# zpool export datapool | Deport a ZFS pool named mypool |
# zpool export -f datapool | Force the unmount and deport of a ZFS pool |
# zfs snapshot datapool/fs1@12jan2014 | Create a snapshot named 12jan2014 of the fs1 filesystem |
# zfs list -t snapshot | List snapshots |
# zfs rollback -r datapool/fs1@10jan2014 | Roll back to 10jan2014 (recursively destroy intermediate snapshots) |
# zfs rollback -rf datapool/fs1@10jan2014 | Roll back must and force unmount and remount |
# zfs destroy datapool/fs1@10jan2014 | Destroy snapshot created earlier |
# zfs send datapool/fs1@oct2013 > /geekpool/fs1/oct2013.bak | Take a backup of ZFS snapshot locally |
# zfs receive anotherpool/fs1 < /geekpool/fs1/oct2013.bak | Restore from the snapshot backup backup taken |
# zfs send datapool/fs1@oct2013 | zfs receive anotherpool/fs1 | Combine the send and receive operation |
# zfs send datapool/fs1@oct2013 | ssh node02 “zfs receive testpool/testfs” | Send the snapshot to a remote system node02 |
# zfs clone datapool/fs1@10jan2014 /clones/fs1 | Clone an existing snapshot |
# zfs destroy datapool/fs1@10jan2014 | Destroy clone |
- Facebook{.share-facebook .sd-button .share-icon rel="nofollow noopener noreferrer" shared="sharing-facebook-1029" target="_blank"}
- Reddit{.share-reddit .sd-button .share-icon rel="nofollow noopener noreferrer" shared="" target="_blank"}
- Pinterest{.share-pinterest .sd-button .share-icon rel="nofollow noopener noreferrer" shared="sharing-pinterest-1029" target="_blank"}
- LinkedIn{.share-linkedin .sd-button .share-icon rel="nofollow noopener noreferrer" shared="sharing-linkedin-1029" target="_blank"}
- More{.sharing-anchor .sd-button .share-more}
- Email{.share-email .sd-button .share-icon rel="nofollow noopener noreferrer" shared="" target="_blank" email-share-error-title="Do you have email set up?" email-share-error-text="If you're having problems sharing via email, you might not have email set up for your browser. You may need to create a new email yourself." email-share-nonce="33ec40dce2" email-share-track-url="https://itsjustbytes.wordpress.com/2020/05/10/zfs-command-line-reference-cheat-sheet/?share=email"}
- Print{.share-print .sd-button .share-icon rel="nofollow noopener noreferrer" shared="" target="_blank"}
- Twitter{.share-twitter .sd-button .share-icon rel="nofollow noopener noreferrer" shared="sharing-twitter-1029" target="_blank"}
- Tumblr{.share-tumblr .sd-button .share-icon rel="nofollow noopener noreferrer" shared="" target="_blank"}
- WhatsApp{.share-jetpack-whatsapp .sd-button .share-icon rel="nofollow noopener noreferrer" shared="" target="_blank"}
Like Loading...
[]{.sd-link-color}
- Tagged
- cheat sheet{rel="tag"}
- cli{rel="tag"}
- Linux{rel="tag"}
- Solaris{rel="tag"}
- ZFS{rel="tag"}
Published May 10, 2020May 8, 2020
Previous Post Initial ODA Setup -- Bare Metal (non-virtualized){rel="prev"}
Next Post Using nohup, "&" and disown in Linux{rel="next"}
Follow It's Just Bytes... on WordPress.com{.wordpress-follow-button blog="162186403" data-lang="en"}
- Facebook{.icon .icon-facebook}{target="_blank" rel="noopener noreferrer"}
- GitHub{.icon .icon-github}{target="_blank" rel="noopener noreferrer"}
- Reddit{.icon .icon-reddit}{target="_blank" rel="noopener noreferrer"}
Categories Select Category apple Übersicht Centos Computer Containers Cygwin Docker Grafana Hardware Just 4 Fun Kickstart Linux macOS Management Music Networking OEL Oracle Oracle VM Performance RedHat Repair Scripting Solaris Splunk Storage Synology Troubleshooting Ubuntu Uncategorized Virtual VMWare Windows ZFS
- It's Just Bytes...{.bump-view bump-view="bif"}
- Gardening & Permaculture Design{.bump-view bump-view="bif"}
- Project: Black & Blue{.bump-view bump-view="bif"}
- Der Flounder{.bump-view bump-view="bif"}
- Lehigh Valley Camaro Club{.bump-view bump-view="bif"}
- August 2024
- June 2024
- May 2024
- April 2024
- May 2023
- May 2022
- March 2022
- November 2021
- June 2021
- April 2021
- March 2021
- February 2021
- January 2021
- December 2020
- October 2020
- September 2020
- August 2020
- July 2020
- May 2020
- April 2020
- February 2020
- November 2012
- August 2012
- January 2009
- November 2008
It's Just Bytes...{.bump-view bump-view="bif"}
[Somethings are useful, others not so much.]{.small}
Gardening & Permaculture Design{.bump-view bump-view="bif"}
[projects, interests and travels by patrick hunt]{.small}
Project: Black & Blue{.bump-view bump-view="bif"}
[The phrase "Leave it Stock" never enters my mind...]{.small}
Der Flounder{.bump-view bump-view="bif"}
[Seldom updated, occasionally insightful.]{.small}
Lehigh Valley Camaro Club{.bump-view bump-view="bif"}
[Supporting the enjoyment, modification and preservation of the Chevrolet Camaro.]{.small}
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here:
Cookie Policy{rel="nofollow"}
{.gridicon .gridicons-reblog}Reblog{.actnbr-action .actnbr-actn-reblog}
{.gridicon} Subscribe{.actnbr-action .actnbr-actn-follow} {.gridicon} Subscribed{.actnbr-action .actnbr-actn-following .no-display}
Join 31 other subscribers
Sign me up
Already have a WordPress.com account? Log in now.
{.gridicon .gridicons-ellipsis}
- {.avatar .avatar-50 srcset="https://s0.wp.com/i/logo/wpcom-gray-white.png 1x" height="50" width="50"} It's Just Bytes...
- {.gridicon .gridicons-customize} Customize
- {.gridicon} Subscribe{.actnbr-action .actnbr-actn-follow} {.gridicon} Subscribed{.actnbr-action .actnbr-actn-following .no-display}
- Sign up
- Log in
- Copy shortlink
- Report this content{target="_blank" rel="noopener noreferrer"}
- View post in Reader
- Manage subscriptions
- Collapse this bar
::: iframe :::
%d
{style="height:1px;width:1px;overflow:hidden;position:absolute;bottom:1px;"}