在OSX上创建和管理虚拟ZFS映像的简单脚本,无需重新分区

zfs-utils-osx的Python项目详细描述


简介

Test StatusCode HealthRequirements Status

在OSX上创建和管理虚拟ZFS映像的简单脚本 需要重新分区

安装

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

示例用法

创建池(使用-n标志进行干运行):

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

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java获取范围内的素数和总素数   JAVAlang.IllegalArgumentException:找不到无效的URL或资源。JavaFX图像   java我可以在vaadin中直接流式处理ZipFile吗?   apache poi java poi HSSFsheet如何添加包含图片的页眉和页脚?   java如何在swing中使用GridLayout使列大小不同?   java为什么JPasswordField中的getText()被弃用?   java整数对象是如何创建的?   java在JAAS的策略文件中授予URL权限   linux Openssl(shell脚本)相当于java解密代码   java是无服务器的,结合事件源是可能的吗?   java JPA双向Uknown列   javajavax。加密。IllegalBlockSizeException:解密加密的AES字符串时最后一个块未完成   java如何知道我的ProcessBuilder start()是否成功执行了这些命令   本地特定错误消息中的java插值   java控件SFX通知异常   java文本输入if语句JavaFX   swing java未连接到水平组   java泛型,迭代器>无法访问内部类函数   java如何跳过当前页并写入下一页?   java一次导入许多静态字符串