Comments (4)
Noted with thanks:
State of osx.zfs on July 1st
https://groups.google.com/d/msg/maczfs-devel/nbwJLBRgric/huZcY_-yjp4J
… Spotlight unmount issue …
from zfs.
If you export the POOL twice it will unmount and export.
Interestingly, if you umount /POOL it will fail, but "diskutil unmount /POOL" will succeed.
The primary call that diskutil uses appears to be DADiskUnmount
.
I think the answer is to iokit the userland code as well, and do something similar to
main()
{
DADiskRef disk = NULL;
DASessionRef session = NULL;
session = DASessionCreate ( kCFAllocatorDefault );
if(session == NULL)
{
return false;
}
DASessionScheduleWithRunLoop(session, CFRunLoopGetCurrent(),
kCFRunLoopDefaultMode);
disk = DADiskCreateFromBSDName ( kCFAllocatorDefault, session, diskName);
if(disk == NULL)
return false;
DADiskUnmount(disk, kDADiskUnmountOptionWhole,
CPCSServerSocket::SafeRemovalCallback, NULL);
return true;
}
void CPCSServerSocket::SafeRemovalCallback( DADiskRef disk,
DADissenterRef dissenter, void * context )
{
printf("CPCSServerSocket::SafeRemovalCallback disk-%p
dissenter-%p\n", disk, dissenter);
}
Another option is to take the ZOL approach, and do system(diskutil unmount)
- the code is already there, just not called. (for umount
).
We can not use diskutil to mount the volume however, but we probably can use iokit. So currently I am favouring iokit in userland.
from zfs.
Thanks for the update and for the chat in IRC.
Indeed,
… Due to the complex and interwoven nature of Mac OS X, umount may fail often. …
As far as I recall, failures such as the one observed are not file system specific.
Noted: work in progress by lundman and the comments at lines 389 and 393 in today's https://github.com/zfs-osx/zfs/blob/d8a9613ab8fe707c61071d50eba53aea66f1214e/module/zfs/zfs_vnops_osx.c#L389
from zfs.
Following the advice in Apple's man-page, we now use diskutil to umount, and I must admit, it works rather well.
from zfs.
Related Issues (20)
- diskutil erase ZFS shows -69832: file system formatter failed HOT 1
- Error "no pools available to import" in Big Sur x86_64
- Unexpectedly low performance of VMs with openzfsonosx backing store HOT 2
- Xcode not happy with ZFS HOT 14
- Photos cannot import photos to library on zfs HOT 5
- _zfs_findernotify_callback panic HOT 1
- Kernel Panic - OpenZFS 2.1.0 on Apple Silicon HOT 11
- Kernel Panic (Time Out) - OpenZFS 2.1.0 on Apple Silicon HOT 20
- Kernal Panic - 2.1.x arm64 HOT 16
- Kernel Panic: Kernel Data Abort (OpenZFS 2.1.0, M1 Ultra) HOT 15
- how can i create block dev as on linux HOT 1
- 2.1.99: `zsysctl` sets tunable incorrectly HOT 2
- Launchd: no pools available to import HOT 3
- Kernel Panic: OpenZFS 2.1.0 Catalina HOT 1
- System freezes with command: zpool offline
- System restarts with command: zpool export
- System freezes or reboots importing a degraded mirror image HOT 52
- System freezes on import HOT 1
- Mac ZFS triggers duplicating finding programs to fail randomly HOT 9
- `cargo build` breaks with "resource temporarily unavailable (error 35)" (I'm assuming EAGAIN) on v2.2.0 and v2.2.2 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zfs.