跳转到主要内容

一个简单的脚本,可以在OS X上创建和管理虚拟ZFS镜像,无需重新分区。

项目描述

简介

Test Status Code Health Requirements Status

一个简单的脚本,可以在OS X上创建和管理虚拟ZFS镜像,无需重新分区。

安装

要安装,只需运行 pip install zfs-utils-osx

示例用法

要创建一个池(使用 -n 标志进行dry-run)

zfs.py zpool -n <pool_name>

用法

usage: zfs.py [-h] {zpool} ...

optional arguments:
  -h, --help  show this help message and exit

Subcommands:
  Please specify one of the following subcommands

  {zpool,load}
    zpool     zpool creation
    load        load (import) the zpools

Zpool创建用法

usage: zfs.py zpool [-h] [-c COUNT] [-s SIZE]
                    [-t {raidz1,raidz2,raidz3,mirror,raidz}] [-n]
                    [-m MOUNTPOINT] [-o] [-p PATTERN]
                    pool_name

positional arguments:
  pool_name             The name of the pool to create

optional arguments:
  -h, --help            show this help message and exit
  -c COUNT, --count COUNT
                        The amount of images to use (default: 3)
  -s SIZE, --size SIZE  The usable size of the zpool in GiB (default: 10GiB)
  -t {raidz1,raidz2,raidz3,mirror,raidz}, --type {raidz1,raidz2,raidz3,mirror,raidz}
                        The zpool type to use (default: raidz)
  -n, --no-op, --dry-run
                        Show what will be done but dont execute
  -m MOUNTPOINT, --mountpoint MOUNTPOINT
                        Where should the disk be mounted (default:
                        ~/%(pool_name)s
  -o, --overwrite       Overwrite old images if they exist
  -p PATTERN, --pattern PATTERN
                        File name pattern to store the images (default:
                        %(pool_name)s_%(i)02d)

Zpool导入用法

usage: zfs.py load [-h] [-d IMAGE_DIRECTORY] [-p PREFIX] [--postfix POSTFIX]
                   [-n]
                   pool_names [pool_names ...]

positional arguments:
  pool_names            The name of the pool to import

optional arguments:
  -h, --help            show this help message and exit
  -d IMAGE_DIRECTORY, --image-directory IMAGE_DIRECTORY
                        File name pattern to store the images (default:
                        ~/zfs/)
  -p PREFIX, --prefix PREFIX
                        File name prefix for the images (default:
                        %(pool_name)s_)
  --postfix POSTFIX     File name postfix for the images (default: )
  -n, --no-op, --dry-run
                        Show what will be done but dont execute

项目详情


下载文件

下载适合您平台的文件。如果您不确定要选择哪个,请了解有关 安装包 的更多信息。

源分布

zfs-utils-osx-1.1.0.tar.gz (4.7 kB 查看哈希值)

上传时间:

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面