ZFS Hopelessly lost with ZFS

I know everyone goes on and on about how wonderful ZFS is, but I've never got my head around it.

However, I'm trying to take baby steps with it in the hope that somethng might sink in.

I have installed FreeBSD 15.0-RELEASE on a brand new 4TB SSD with hope of migrating my existing system onto it, but am struggling to mount the new disk on my original system. I gather I can't just mount -t zfs /dev/da0p3 /mnt but need to import some pools.

[root@X1 /]# zpool status
pool: tank
state: SUSPENDED
status: One or more devices are faulted in response to IO failures.
action: Make sure the affected devices are connected, then run 'zpool clear'.
see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-HC
config:

NAME STATE READ WRITE CKSUM
tank UNAVAIL 0 0 0 insufficient replicas
da0p1 REMOVED 0 0 0

errors: 4 data errors, use '-v' for a list
[root@X1 /]#


Not sure what this is telling me or what I should do.

I created this zpool on another computer and simply want to mount the zfs partition on this computer.
 
Read the error message.

If you created this pool with only one disk, and that disk is connected to your current computer and accessible without IO errors, then zpool clear should fix the problem. If the disk is not connected, or not functioning correctly, fix that first.

If you need help finding the disk, using zpool status -v will give you details about the most recent IO errors.

If that pool has multiple disks, you need to make sure all (or at least a large fraction) are connected and functioning. That's more complex and harder to explain.
 
ZFS don't think partitions, think pools and datasets.
ZFS stuff created on a different system, you need to do zpool import on the current system. You need to be careful as to where original datasets were mounted. Why? Lets say the zpool you want to import has a dataset with a mountpoint of /usr. If you blindly zpool import you wind up doing a "union mount" over your existing /usr which can be bad.
 
Even though it's dated, this is still useful. Michael Lucas who is great at explaining things so that even dummies like me can get it has some zfs books that are relatively inexpensive.
 
Read the error message.

If you created this pool with only one disk, and that disk is connected to your current computer and accessible without IO errors, then zpool clear should fix the problem. If the disk is not connected, or not functioning correctly, fix that first.

If you need help finding the disk, using zpool status -v will give you details about the most recent IO errors.

If that pool has multiple disks, you need to make sure all (or at least a large fraction) are connected and functioning. That's more complex and harder to explain.

'-v' doesn't seem to make any difference.

root@X1:~ $ zpool status
pool: tank
state: SUSPENDED
status: One or more devices are faulted in response to IO failures.
action: Make sure the affected devices are connected, then run 'zpool clear'.
see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-HC
config:

NAME STATE READ WRITE CKSUM
tank UNAVAIL 0 0 0 insufficient replicas
da0p1 REMOVED 0 0 0

errors: 4 data errors, use '-v' for a list
root@X1:~ $ zpool status -v
pool: tank
state: SUSPENDED
status: One or more devices are faulted in response to IO failures.
action: Make sure the affected devices are connected, then run 'zpool clear'.
see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-HC
config:

NAME STATE READ WRITE CKSUM
tank UNAVAIL 0 0 0 insufficient replicas
da0p1 REMOVED 0 0 0

errors: List of errors unavailable: pool I/O is currently suspended
root@X1:~ $


It's only a single disk, with FreeBSD installed on it.

root@X1:~ $ gpart show da0
=> 40 7814037088 da0 GPT (3.6T)
40 1024 1 freebsd-boot (512K)
1064 984 - free - (492K)
2048 4194304 2 freebsd-swap (2.0G)
4196352 7809839104 3 freebsd-zfs (3.6T)
7814035456 1672 - free - (836K)
 
I don't get it.

You say that you have only one disk in the machine? Could you please explain in more detail your setup? How many drives are installed in the current system for example.

What drive contains your "original system" and what drive is the new one?
 
I don't get it.

You say that you have only one disk in the machine? Could you please explain in more detail your setup? How many drives are installed in the current system for example.

What drive contains your "original system" and what drive is the new one?
My new ZFS disk is in a USB enclosure attached to my ThinkPad X1 Carbon which I have used for many years and can't remember what garbage has accumulated on it.

root@X1:~ $ g
=> 63 468862065 ada0 MBR (224G)
63 1985 - free - (993K)
2048 1124352 1 ntfs (549M)
1126400 261750496 2 ntfs (125G)
262876896 288 - free - (144K)
262877184 1179648 3 !39 (576M)
264056832 2048 - free - (1.0M)
264058880 204803248 4 freebsd [active] (98G)

=> 0 204803248 ada0s4 BSD (98G)
0 197132288 1 freebsd-ufs (94G)
197132288 7670960 2 freebsd-swap (3.7G)

=> 40 7814037088 da0 GPT (3.6T)
40 1024 1 freebsd-boot (512K)
1064 984 - free - (492K)
2048 4194304 2 freebsd-swap (2.0G)
4196352 7809839104 3 freebsd-zfs (3.6T)
7814035456 1672 - free - (836K)

=> 40 7814037088 diskid/DISK-002291 GPT (3.6T)
40 1024 1 freebsd-boot (512K)
1064 984 - free - (492K)
2048 4194304 2 freebsd-swap (2.0G)
4196352 7809839104 3 freebsd-zfs (3.6T)
7814035456 1672 - free - (836K)
/dev/da0 is my new disk and I am booting from /dev/ada0s4a which currently has Freebsd 15.0-RELEASE installed. It was partioned like this many years ago.
 
it's looking for the tank on da0p1 but that's a boot partition on your current drive. how, exactly, did you arrive at this current situation?
I said I was hopelessly lost and don't know the first thing about ZFS.

Suffice it to say I want to copy most of my current installation onto this disk and then use the ZFS disk as my main disk.
 
In my mind ZFS is a tool for building a storage system. I know a lot of people seem to like putting ZFS on a laptop...

I still really like UFS for small systems. There is a good thread here that talks about the good stuff you can do with UFS.
 
I said I was hopelessly lost and don't know the first thing about ZFS.

Suffice it to say I want to copy most of my current installation onto this disk and then use the ZFS disk as my main disk.
by "how did you arrive at this situation" we meant "what sequence of steps did you take to get here" — how did you initialize the ZFS on that external drive, what commands did you run to make your system recognize the tank but not its components?
 
In my mind ZFS is a tool for building a storage system. I know a lot of people seem to like putting ZFS on a laptop...

I still really like UFS for small systems. There is a good thread here that talks about the good stuff you can do with UFS.
It looks like ZFS is a steep learning cliff so I may go back to using UFS if I can't sort this out.

It's just that I thought ZFS would provide some benefits, although I wasn't sure what.
 
by "how did you arrive at this situation" we meant "what sequence of steps did you take to get here" — how did you initialize the ZFS on that external drive, what commands did you run to make your system recognize the tank but not its components?
I just installed from a bootonly ISO and tried to follow the prompts.

Must have done something wrong, but it booted up OK to a command prompt.
 
so wait, you're booted to a running install and zpool status is telling you that the pool is unavailable?

maybe it would help for you to go over what you did step by step, and use fewer instances of "it" and "just" in your posts. Be specific, provide exact details.
 
It looks like ZFS is a steep learning cliff so I may go back to using UFS if I can't sort this out.

It's just that I thought ZFS would provide some benefits, although I wasn't sure what.
Usually people like being able to do snapshots with zfs. Then if an upgrade goes south, you can rollback. But as that thread I referenced points out, you can do snapshots with UFS too.

If you've only got one disk, you're not going to be doing mulit-volume RAID
 
so wait, you're booted to a running install and zpool status is telling you that the pool is unavailable?

maybe it would help for you to go over what you did step by step, and use fewer instances of "it" and "just" in your posts. Be specific, provide exact details.
I thought I made it clear that I installed FreeBSD 15.0-RELEASE from a bootonly ISO onto a brand new 4TB disk which booted up OK.

My intention is to replace the disk in another computer with this new one, but before I do that I want to copy over files from the old disk, which is why I want to mount the new disk on my usual computer. I am using different computers just to make that clear.

I did not right down the exact steps, just followed the prompts for a guided ZFS install, which must have worked since I have a bootable FreeBSD on a ZFS disk.

My problem is being able to mount it on another system.
 
yeah, for a single disk the benefits of ZFS are relatively limited, but the end-to-end checksumming is nice, so is the fine-grained dataset management when compared to UFS and partitions. For a laptop, you might well be okay with UFS. Save the learning curve for a more-complicated system, maybe.
 
by "how did you arrive at this situation" we meant "what sequence of steps did you take to get here" — how did you initialize the ZFS on that external drive, what commands did you run to make your system recognize the tank but not its components?
I initialised it as an 'internal' drive on a different computer.
 
thanks, that gives us a clearer picture!

your usual computer seems to have a stale idea of a zpool named tank. we would disconnect the SSD, and see what zpool status says.

If it's still grouchy, we'd move /etc/zfs/zpool.cache out of the way, connect the drive again, and do zpool import to see what it sees.
 
yeah, for a single disk the benefits of ZFS are relatively limited, but the end-to-end checksumming is nice, so is the fine-grained dataset management when compared to UFS and partitions. For a laptop, you might well be okay with UFS. Save the learning curve for a more-complicated system, maybe.
Well, I use ZFS for all my systems even the ones with just one drive. It helps me with snapshots, remote backups (using filesystems/zrepl), compression, bitrot, organisation of filesystems and a lot more. I've been using zfs since it first appeared in FreeBSD and I could never go back.
 
The best explanation of ZFS I heard was by Bryan Cantrill when he presented Solaris 10 at a dog & pony at one of the hotels here about 20 years ago. ZFS is a volume manager and a filesystem wrapped up in one. Think of it as a Linux LVM on steroids and a filesystem on steroids all in the same package.

People who say ZFS is limited on single disk systems don't see the whole picture. Data integrity is ZFS' strength, so yes, mirror and RAID are better then not. But when managing volumes, like Linux sysadmins (like me at $JOB) with LVM, LVM + EXT4/XFS is a PITA when compared with ZFS. Want to create a filesystem, zfs create vs lvcreate followed by mkfs.

Do you want to resize a logical volume on LVM? lvresize, then resize2fs. With ZFS it's dynamic.

If you go to https://docs.oracle.com/cd/E19253-01/819-5461/zfsover-2/, the last two paragraphs talk about simplified administration. That's ZFS' everyday strength. It's complex under the covers so you and I can manage storage more simply.
 
yeah, for a single disk the benefits of ZFS are relatively limited, but the end-to-end checksumming is nice, so is the fine-grained dataset management when compared to UFS and partitions. For a laptop, you might well be okay with UFS. Save the learning curve for a more-complicated system, maybe.
I do not agree with that. IMHO, the ZFS is perfect for all kind on storage. I am using ZFS on relatively small files for VM-s and there are benefits even there. Also in other configurations. It may have a learning curve, but the basic operation is simple. One must just know what she/he is doing. That is probably the most important thing to learn. In this case here, it is still a little bit unclear what was done and what is the intention. The best places to start are zpool(8) and zfs(8). Also, importing another pool with the same dataset names will shadow the original. Pools can be imported without mounting (-N) zpool-import(8).
 
  • Like
Reactions: mer
Back
Top