Score:1

Copy file from ZFS to ext4

cn flag

I have some files in a ZFS pool.

zpool list
NAME   SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
ZFS   7.27T  4.03G  7.26T        -         -     0%     0%  1.00x    ONLINE  -


zfs list
NAME                USED  AVAIL     REFER  MOUNTPOINT
ZFS                66.0G  7.08T       96K  /ZFS
ZFS/file1          66.0G  7.14T     1.62G  -
ZFS/file2          66.0G  7.14T       22K  -

But /ZFS dir (mountpoint) is empty.

ls -la /ZFS
total 5
drwxr-xr-x  2 root root    2 Oct  8 12:02 .
drwxr-xr-x 19 root root 4096 Oct 13 12:40 ..

I want to copy these files to another disk (sdc1 on the same computer) with ext4.

How to do that?

Soren A avatar
mx flag
Are the dataset / filesystem ZFS mounted ? Check with `df`. Depending on if it is a ZFS mountpoint or a legacy one, you should be able to mount it with `zfs mount .a` (will mount all defined zfs datasets) or `mount -F zfs ZFS` (and maybe `mount -F zfs ZFS/file1` and `mount -F zfs ZFS/file2`) ... see https://docs.oracle.com/cd/E18752_01/html/819-5461/gaynd.html for more info.
Thomas Aichinger avatar
cn flag
Yes ZFS is mounted. df lists it wirh mountpoint /ZFS and zfs mount does the same.
Score:0
cn flag

file1 and file2 are ZVOL's. These are virtual disks. They can be mounted like real disk'.

They exist as dev in /dev/zvol/ZFS/

fdisk -l /dev/zvol/ZFS/file1
Disk /dev/zvol/ZFS/file1: 64 GiB, 68719476736 bytes, 134217728 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 8192 bytes
I/O size (minimum/optimal): 8192 bytes / 8192 bytes
Disklabel type: gpt
Disk identifier: 4258469C-739C-4D09-1784-A64B43E67596

One can mount them.

mount /dev/zvol/ZFS/file1 /mnt
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.