J'ai découvert un problème étrange ... si j'ai des fichiers d'image disque (DMG) qui résident sur un partage NFS en lecture seule, je ne peux pas les ouvrir dans Mac OS X 10.7.5. Les mêmes fichiers s'ouvrent correctement lorsqu'ils sont accessibles via AFP. Cependant, en essayant de les ouvrir en utilisant hdiutil attach
lorsqu'ils se trouvent sur le partage NFS, "Échec de la connexion - Système de fichiers en lecture seule":
bash-3.2# /usr/bin/hdiutil attach /Volumes/nfs_share/Some.dmg
hdiutil: attach failed - Read-only file system
Même si le partage AFP est en lecture seule, je peux joindre ces mêmes images. Mais pour une raison quelconque, un partage NFS en lecture seule ne fonctionne pas.
En fin de compte, ce que je veux faire, c'est attacher les images avec un fichier shadow , pour monter les images en lecture seule en lecture-écriture. Mais cela échoue également de la même manière:
bash-3.2# /usr/bin/hdiutil attach /Volumes/nfs_share/Some.dmg -mountpoint /Somewhere -shadow /path/to/Some-Shadow
hdiutil: attach failed - Read-only file system
Encore une fois, cela fonctionne parfaitement si l'image est servie via AFP. Cela fonctionne également très bien si le partage NFS est en lecture-écriture, mais pour des raisons de sécurité, je ne peux pas le faire.
Comment puis-je monter des fichiers DMG qui résident sur un partage NFS en lecture seule?
Information additionnelle:
La ligne appropriée /etc/exports
sur le serveur FreeNAS (FreeBSD 8.2-RELEASE-p7):
/mnt/raid/netboot -alldirs -ro -mapall=netboot:netboot -network 10.100.0.0/16
La sortie de /usr/bin/hdiutil attach -verbose /Volumes/netboot/Lion.nbi/Library.dmg -notremovable -shadow /private/var/netboot/Library-Shadow -owners on -noverify -noautofsck -nobrowse
:
Initializing…
DIBackingStoreInstantiatorProbe: interface 0, score 100, CBSDBackingStore
DIBackingStoreInstantiatorProbe: interface 1, score -1000, CBundleBackingStore
DIBackingStoreInstantiatorProbe: interface 2, score -1000, CRAMBackingStore
DIBackingStoreInstantiatorProbe: interface 3, score 100, CCarbonBackingStore
DIBackingStoreInstantiatorProbe: interface 4, score -1000, CDevBackingStore
DIBackingStoreInstantiatorProbe: interface 5, score -1000, CCURLBackingStore
DIBackingStoreInstantiatorProbe: interface 6, score -1000, CVectoredBackingStore
CBSDBackingStore::newProbe stat() failed. No such file or directory.
DIBackingStoreInstantiatorProbe: interface 0, score 1, CBSDBackingStore
DIBackingStoreInstantiatorProbe: interface 1, score -1000, CBundleBackingStore
DIBackingStoreInstantiatorProbe: interface 2, score -1000, CRAMBackingStore
DIBackingStoreInstantiatorProbe: interface 3, score -1000, CCarbonBackingStore
DIBackingStoreInstantiatorProbe: interface 4, score -1000, CDevBackingStore
DIBackingStoreInstantiatorProbe: interface 5, score -1000, CCURLBackingStore
DIBackingStoreInstantiatorProbe: interface 6, score -1000, CVectoredBackingStore
DIBackingStoreInstantiatorProbe: interface 0, score 100, CBSDBackingStore
DIBackingStoreInstantiatorProbe: interface 1, score -1000, CBundleBackingStore
DIBackingStoreInstantiatorProbe: interface 2, score -1000, CRAMBackingStore
DIBackingStoreInstantiatorProbe: interface 3, score 100, CCarbonBackingStore
DIBackingStoreInstantiatorProbe: interface 4, score -1000, CDevBackingStore
DIBackingStoreInstantiatorProbe: interface 5, score -1000, CCURLBackingStore
DIBackingStoreInstantiatorProbe: interface 6, score -1000, CVectoredBackingStore
Attaching…
Error 30 (Read-only file system).
Finishing…
DIHLDiskImageAttach() returned 30
hdiutil: attach failed - Read-only file system
Sortie de rpcinfo -p
sur le serveur NFS:
program vers proto port service
100000 4 tcp 111 rpcbind
100000 3 tcp 111 rpcbind
100000 2 tcp 111 rpcbind
100000 4 udp 111 rpcbind
100000 3 udp 111 rpcbind
100000 2 udp 111 rpcbind
100000 4 local 111 rpcbind
100000 3 local 111 rpcbind
100000 2 local 111 rpcbind
100005 1 udp 967 mountd
100005 3 udp 967 mountd
100005 1 tcp 967 mountd
100005 3 tcp 967 mountd
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100024 1 udp 689 status
100024 1 tcp 689 status
100021 0 udp 616 nlockmgr
100021 0 tcp 927 nlockmgr
100021 1 udp 616 nlockmgr
100021 1 tcp 927 nlockmgr
100021 3 udp 616 nlockmgr
100021 3 tcp 927 nlockmgr
100021 4 udp 616 nlockmgr
100021 4 tcp 927 nlockmgr
Sortie de mount
sur le client Mac OS X 10.7.5:
/dev/disk1s2 on / (hfs, local)
devfs on /dev (devfs, local, nobrowse)
afp_0egBhf12TAP01SptRt47XSdj-3.2c000002 on /private/var/netboot (afpfs, nobrowse)
afp_0egBhf12TAP01SptRt47XSdj-4.2c000004 on /Network/Applications (afpfs, read-only)
map -hosts on /net (autofs, nosuid, automounted, nobrowse)
map auto_home on /home (autofs, automounted, nobrowse)
afp_0egBhf12TAP01SptRt47XSdj-4.2c000008 on /Network/Servers/chef.farcry.sitepalette.com/Users (afpfs, nodev, nosuid, automounted, nobrowse, mounted by jnet)
afp_0egBhf12TAP01SptRt47XSdj-4.2c000009 on /Volumes/Users (afpfs, nodev, nosuid, mounted by jnet)
10.100.1.2:/mnt/raid/netboot on /Volumes/netboot (nfs)
Et enfin, la sortie de /usr/bin/hdiutil attach -debug /Volumes/netboot/Lion.nbi/Library.dmg -notremovable -shadow /private/var/netboot/Library-Shadow -owners on -noverify -noautofsck -nobrowse
:
calling DIHLDiskImageAttach with
skip-verify: true
auto-fsck: false
drive-options:
quiet: false
shadow-url: file://localhost/private/var/netboot/Library-Shadow
mount-nobrowse: true
enable-owners: true
verbose: false
debug: true
agent: hdiutil
fixed-disk: true
image-options:
main-url: file://localhost/Volumes/netboot/Lion.nbi/Library.dmg
2012-11-27 12:02:23.053 hdiutil[23401:707] DIHLDiskImageAttach: input dictionary {
agent = hdiutil;
"auto-fsck" = 0;
debug = 1;
"drive-options" = {
};
"enable-owners" = 1;
"fixed-disk" = 1;
"image-options" = {
};
"main-url" = "file://localhost/Volumes/netboot/Lion.nbi/Library.dmg";
"mount-nobrowse" = 1;
quiet = 0;
"shadow-url" = "file://localhost/private/var/netboot/Library-Shadow";
"skip-verify" = 1;
verbose = 0;
}
2012-11-27 12:02:23.054 hdiutil[23401:707] DIHLDiskImageAttach: disabling legacy image format attach
2012-11-27 12:02:23.055 hdiutil[23401:707] DIHLDiskImageAttach: newImagekeys = {
"legacy-disabled" = 1;
}
2012-11-27 12:02:23.055 hdiutil[23401:707] DIHLDiskImageAttach: creating DIHelperProxy
2012-11-27 12:02:23.056 hdiutil[23401:707] with dictionary: {
agent = hdiutil;
"auto-fsck" = 0;
debug = 1;
"drive-options" = <62706c69 73743030 d0080000 00000000 01010000 00000000 00010000 00000000 00000000 00000000 0009>;
"enable-owners" = 1;
"fixed-disk" = 1;
"image-options" = <62706c69 73743030 d101025f 100f6c65 67616379 2d646973 61626c65 6409080b 1d000000 00000001 01000000 00000000 03000000 00000000 00000000 00000000 1e>;
"main-url" = "file://localhost/Volumes/netboot/Lion.nbi/Library.dmg";
"mount-nobrowse" = 1;
operation = DIHelperAttach;
quiet = 0;
"shadow-url" = "file://localhost/private/var/netboot/Library-Shadow";
"skip-verify" = 1;
verbose = 0;
}
2012-11-27 12:02:23.056 hdiutil[23401:707] [DIHelperProxy alloc]
2012-11-27 12:02:23.056 hdiutil[23401:707] [DIHelperProxy alloc] returning self 0x7fa39b00d690, retainCount 1
2012-11-27 12:02:23.057 hdiutil[23401:707] DIHLDiskImageAttach: running DIHelperProxy
2012-11-27 12:02:23.057 hdiutil[23401:707] [DIHelperProxy performOperationReturning] entry
2012-11-27 12:02:23.057 hdiutil[23401:707] [DIHelperProxy performOperationReturning] detaching thread
2012-11-27 12:02:23.058 hdiutil[23401:2803] [DIHelperProxy workerThread] entry
2012-11-27 12:02:23.058 hdiutil[23401:2803] [DIHelperProxy workerThread] setting up server
2012-11-27 12:02:23.059 hdiutil[23401:2803] [DIHelperProxy threadSetupServer] entry
2012-11-27 12:02:23.059 hdiutil[23401:2803] [DIHelperProxy threadSetupServer] setting up _headerConnection
2012-11-27 12:02:23.060 hdiutil[23401:2803] [DIHelperProxy threadSetupServer] setting up _headerConnection rootObject
2012-11-27 12:02:23.060 hdiutil[23401:2803] [DIHelperProxy threadSetupServer] adding NSConnectionDidInitializeNotification notification
2012-11-27 12:02:23.061 hdiutil[23401:2803] [DIHelperProxy threadSetupServer] exiting
2012-11-27 12:02:23.061 hdiutil[23401:2803] [DIHelperProxy workerThread] launching
2012-11-27 12:02:23.061 hdiutil[23401:2803] [DIHelperProxy threadLaunchToolAuthenticated] entry
2012-11-27 12:02:23.063 hdiutil[23401:2803] launching helper tool at "/System/Library/PrivateFrameworks/DiskImages.framework/Resources/diskimages-helper".
2012-11-27 12:02:23.063 hdiutil[23401:2803] [DIHelperProxy threadLaunchToolAuthenticated] adding NSTaskDidTerminateNotification notification
2012-11-27 12:02:23.063 hdiutil[23401:2803] [DIHelperProxy thread LaunchToolAuthenticated] launching
2012-11-27 12:02:23.065 hdiutil[23401:2803] [DIHelperProxy threadLaunchToolAuthenticated] exiting
2012-11-27 12:02:23.065 hdiutil[23401:2803] [DIHelperProxy workerThread] running runloop
2012-11-27 12:02:23.081 hdiutil[23401:2803] [DIHelperProxy helperConnectionInitialized] entry
2012-11-27 12:02:23.081 hdiutil[23401:2803] [DIHelperProxy helperConnectionInitialized] adding new NSConnectionDidDieNotification notification
2012-11-27 12:02:23.081 hdiutil[23401:2803] [DIHelperProxy helperConnectionInitialized] removing old NSConnectionDidDieNotification notification
2012-11-27 12:02:23.082 hdiutil[23401:2803] [DIHelperProxy helperConnectionInitialized] removing old connection rootObject
2012-11-27 12:02:23.082 hdiutil[23401:2803] [DIHelperProxy helperConnectionInitialized] invalidating old connection
2012-11-27 12:02:23.083 hdiutil[23401:2803] [DIHelperProxy helperConnectionInitialized] releasing old connection
2012-11-27 12:02:23.083 hdiutil[23401:2803] [DIHelperProxy helperConnectionInitialized] and replacing with new connection
2012-11-27 12:02:23.083 hdiutil[23401:2803] [DIHelperProxy helperConnectionInitialized] exit
2012-11-27 12:02:23.085 hdiutil[23401:2803] [DIHelperProxy connectToFramework] entry, helper 0x7fa39b016940
2012-11-27 12:02:23.085 hdiutil[23401:2803] [DIHelperProxy connectToFramework] exit
2012-11-27 12:02:23.186 hdiutil[23401:2803] [DIHelperProxy sendOperationToHelper] entry
2012-11-27 12:02:23.187 hdiutil[23401:2803] [DIHelperProxy sendOperationToHelper] starting operation with helper
2012-11-27 12:02:23.190 hdiutil[23401:2803] [DIHelperProxy sendOperationToHelper] exit
2012-11-27 12:02:23.194 hdiutil[23401:2803] [DIHelperProxy frameworkCallbackWithDictionary] entry
status proc called: initialize
Initializing…
myStatusProc: returning 0
2012-11-27 12:02:23.199 hdiutil[23401:2803] [DIHelperProxy frameworkCallbackWithDictionary] exit
2012-11-27 12:02:23.201 diskimages-helper[23407:2503] updateImageAndDriveDictionaries: before update _imageOptions: {
"enable-keychain" = 1;
writeable = 0;
}
2012-11-27 12:02:23.201 diskimages-helper[23407:2503] updateImageAndDriveDictionaries: _imageOptions: {
"enable-keychain" = 1;
"legacy-disabled" = 1;
writeable = 0;
}
2012-11-27 12:02:23.202 diskimages-helper[23407:2503] _driveOptions: {
"auto-fsck" = 0;
autodiskmount = 1;
removable = 0;
"unmount-timeout" = 0;
}
2012-11-27 12:02:23.202 diskimages-helper[23407:2503] DIHelperAttach: performOperation: initializing framework
2012-11-27 12:02:23.202 diskimages-helper[23407:2503] {
agent = hdiutil;
"auto-fsck" = 0;
"auto-fsck-failure-override-type" = callback;
"auto-open-ro-root" = 0;
"auto-open-rw-root" = 0;
"auto-stretch" = 0;
"bundlebs-checkpointing" = 0;
"bundlebs-localcloseonflush" = 0;
"bundlebs-localcloseonidle" = 0;
"bundlebs-localcloseonsleep" = 0;
"bundlebs-localfdcount" = 6;
"bundlebs-remotecloseonflush" = 0;
"bundlebs-remotecloseonidle" = 0;
"bundlebs-remotecloseonsleep" = 0;
"bundlebs-remotefdcount" = 3;
"burn-apple-supported-devices-only" = 0;
"burn-no-underrun-protection" = 0;
"burn-synthesize-content" = 1;
"bzip2-level" = 0;
"callback-with-sla" = 1;
debug = 1;
"disable-encrypted-images" = 0;
"disable-kernel-mounting" = 1;
"disable-owners" = 0;
"drive-options" = <62706c69 73743030 d0080000 00000000 01010000 00000000 00010000 00000000 00000000 00000000 0009>;
"enable-owners" = 1;
"filevault-default-case-sensitive-file-system" = "Case-sensitive Journaled HFS+";
"filevault-default-encryption-type" = "AES-128";
"filevault-default-file-system" = "Journaled HFS+";
"filevault-default-image-type" = SPARSEBUNDLE;
"filevault-default-partition-type" = SPUD;
"filevault-default-volume-name" = FileVault;
"fixed-disk" = 1;
"force-idme" = 0;
"hfsplus-stretch-parameters" = {
"hfsplus-stretch-allocation-block-size" = 4096;
"hfsplus-stretch-allocation-file-size" = 8388608;
"hfsplus-stretch-threshold" = 524288;
};
"idle-timeout" = 15;
"ifd-format" = UDZO;
"ifd-ignore-io-errors" = 1;
"ifd-segment-size" = 0;
"iff-format" = UDZO;
"iff-fs" = "HFS+";
"iff-layout" = SPUD;
"iff-source-owners" = auto;
"iff-spotlight-indexing" = 0;
"iff-temp-sparse-band-size" = 20480;
"iff-temp-use-rw-if-possible" = 1;
"iff-usehelper" = 1;
"ignore-bad-checksums" = 0;
"image-options" = <62706c69 73743030 d101025f 100f6c65 67616379 2d646973 61626c65 6409080b 1d000000 00000001 01000000 00000000 03000000 00000000 00000000 00000000 1e>;
"main-url" = "file://localhost/Volumes/netboot/Lion.nbi/Library.dmg";
"mount-attempted" = 1;
"mount-nobrowse" = 1;
"mount-point" = "/Volumes/";
"mount-private" = 0;
"mount-required" = 1;
"mount-type" = in;
"nbi-spotlight-indexing" = 0;
operation = DIHelperAttach;
"progress-delay" = 5;
"pthread-reader-cap" = 4;
quiet = 0;
"reauthenticate-upon-wake" = 1;
"shadow-url" = "file://localhost/private/var/netboot/Library-Shadow";
"skip-auto-fsck-for-system-images" = 1;
"skip-idme" = 1;
"skip-idme-reveal" = 0;
"skip-idme-trash" = 0;
"skip-previously-verified" = 1;
"skip-sla" = 0;
"skip-verify" = 1;
"skip-verify-locked" = 0;
"skip-verify-remote" = 1;
"sparsebundle-compactonidle" = 0;
"suppress-uiagent" = 1;
"unmount-timeout" = 0;
"use-compressed-xml" = 0;
"use-keychain" = 1;
verbose = 0;
"zlib-level" = 1;
}
DILoadDriver: checking for disk image driver
DILoadDriver: DI_kextExists() returned 0x00000000 (0)
DIIsInitialized: returning NO
2012-11-27 12:02:23.206 diskimages-helper[23407:2503] -checkForPreviouslyAttachedImage: entry
2012-11-27 12:02:23.206 diskimages-helper[23407:2503] imageURL file://localhost/Volumes/netboot/Lion.nbi/Library.dmg
2012-11-27 12:02:23.206 diskimages-helper[23407:2503] shadowURL file://localhost/private/var/netboot/Library-Shadow
2012-11-27 12:02:23.207 diskimages-helper[23407:2503] sectionStart (null) sectionLength (null)
2012-11-27 12:02:23.207 diskimages-helper[23407:2503] checkForPreviouslyAttachedImage: setting legacy-disabled to 1
DIIsInitialized: returning YES
DIBackingStoreNewWithCFURL: entry with
file://localhost/Volumes/netboot/Lion.nbi/Library.dmg
skip-permissions-check: true
legacy-disabled: true
DIBackingStoreInstantiatorProbe: entry
file://localhost/Volumes/netboot/Lion.nbi/Library.dmg
skip-permissions-check: true
legacy-disabled: true
DIBackingStoreInstantiatorProbe: probing interface 0 CBSDBackingStore
CBSDBackingStore::newProbe score 100 for file://localhost/Volumes/netboot/Lion.nbi/Library.dmg
DIBackingStoreInstantiatorProbe: probing interface 1 CBundleBackingStore
CBundleBackingStore::newProbe score -1000 for file://localhost/Volumes/netboot/Lion.nbi/Library.dmg
DIBackingStoreInstantiatorProbe: probing interface 2 CRAMBackingStore
CRAMBackingStore::probe: scheme "file": not ram: or ramdisk: scheme.
CRAMBackingStore::probe: score -1000 for file://localhost/Volumes/netboot/Lion.nbi/Library.dmg
DIBackingStoreInstantiatorProbe: probing interface 3 CCarbonBackingStore
CCarbonBackingStore::newProbe: setting initial rval to +100
CCarbonBackingStore::newProbe score 100 for file://localhost/Volumes/netboot/Lion.nbi/Library.dmg
DIBackingStoreInstantiatorProbe: probing interface 4 CDevBackingStore
CDevBackingStore::newProbe: not /dev/disk or /dev/rdisk (/Volumes/netboot/Lion.nbi/Library.dmg).CDevBackingStore::newProbe score -1000 for
DIBackingStoreInstantiatorProbe: probing interface 5 CCURLBackingStore
CCURLBackingStore::probe: scheme is: file
CCURLBackingStore::probe: not recognized URL scheme.
CCURLBackingStore::probe: score -1000 for file://localhost/Volumes/netboot/Lion.nbi/Library.dmg
DIBackingStoreInstantiatorProbe: probing interface 6 CVectoredBackingStore
CVectoredBackingStore::newProbe not "vectored" scheme.
CVectoredBackingStore::newProbe score -1000 for file://localhost/Volumes/netboot/Lion.nbi/Library.dmg
DIBackingStoreInstantiatorProbe: selecting CBSDBackingStore
DIBackingStoreNewWithCFURL: CBSDBackingStore
CBSDBackingStore::setNoFollow: setting _noFollow to 0
DIBackingStoreNewWithCFURL: instantiator returned 0
DIBackingStoreNewWithCFURL: returning 0
2012-11-27 12:02:23.208 diskimages-helper[23407:2503] -checkForPreviouslyAttachedImage: resolving file://localhost/Volumes/netboot/Lion.nbi/Library.dmg returned 0
DIIsInitialized: returning YES
DIBackingStoreNewWithCFURL: entry with
file://localhost/private/var/netboot/Library-Shadow
skip-permissions-check: true
DIBackingStoreInstantiatorProbe: entry
file://localhost/private/var/netboot/Library-Shadow
skip-permissions-check: true
DIBackingStoreInstantiatorProbe: probing interface 0 CBSDBackingStore
CBSDBackingStore::newProbe score 1 for file://localhost/private/var/netboot/Library-Shadow
DIBackingStoreInstantiatorProbe: probing interface 1 CBundleBackingStore
CBundleBackingStore::newProbe score -1000 for file://localhost/private/var/netboot/Library-Shadow
DIBackingStoreInstantiatorProbe: probing interface 2 CRAMBackingStore
CRAMBackingStore::probe: scheme "file": not ram: or ramdisk: scheme.
CRAMBackingStore::probe: score -1000 for file://localhost/private/var/netboot/Library-Shadow
DIBackingStoreInstantiatorProbe: probing interface 3 CCarbonBackingStore
CCarbonBackingStore::newProbe stat() failed. No such file or directory.
CCarbonBackingStore::newProbe score -1000 for file://localhost/private/var/netboot/Library-Shadow
DIBackingStoreInstantiatorProbe: probing interface 4 CDevBackingStore
CDevBackingStore::newProbe: not /dev/disk or /dev/rdisk (/private/var/netboot/Library-Shadow).CDevBackingStore::newProbe score -1000 for
DIBackingStoreInstantiatorProbe: probing interface 5 CCURLBackingStore
CCURLBackingStore::probe: scheme is: file
CCURLBackingStore::probe: not recognized URL scheme.
CCURLBackingStore::probe: score -1000 for file://localhost/private/var/netboot/Library-Shadow
DIBackingStoreInstantiatorProbe: probing interface 6 CVectoredBackingStore
CVectoredBackingStore::newProbe not "vectored" scheme.
CVectoredBackingStore::newProbe score -1000 for file://localhost/private/var/netboot/Library-Shadow
DIBackingStoreInstantiatorProbe: selecting CBSDBackingStore
DIBackingStoreNewWithCFURL: CBSDBackingStore
DIBackingStoreNewWithCFURL: instantiator returned 2
DIBackingStoreNewWithCFURL: returning 2
DIResolveURLToBackingStore: unable to resolve to any backing store class. 2.
2012-11-27 12:02:23.208 diskimages-helper[23407:2503] -checkForPreviouslyAttachedImage: resolving shadow file://localhost/private/var/netboot/Library-Shadow returned 2
2012-11-27 12:02:23.208 diskimages-helper[23407:2503] DIHelperAttach: performOperation: resolving disk image
DIIsInitialized: returning YES
DIIsInitialized: returning YES
DIBackingStoreNewWithCFURL: entry with
file://localhost/Volumes/netboot/Lion.nbi/Library.dmg
legacy-disabled: true
writeable: false
enable-keychain: true
image-path: /Volumes/netboot/Lion.nbi/Library.dmg
DIBackingStoreInstantiatorProbe: entry
file://localhost/Volumes/netboot/Lion.nbi/Library.dmg
legacy-disabled: true
writeable: false
enable-keychain: true
image-path: /Volumes/netboot/Lion.nbi/Library.dmg
DIBackingStoreInstantiatorProbe: probing interface 0 CBSDBackingStore
CBSDBackingStore::newProbe score 100 for file://localhost/Volumes/netboot/Lion.nbi/Library.dmg
DIBackingStoreInstantiatorProbe: probing interface 1 CBundleBackingStore
CBundleBackingStore::newProbe score -1000 for file://localhost/Volumes/netboot/Lion.nbi/Library.dmg
DIBackingStoreInstantiatorProbe: probing interface 2 CRAMBackingStore
CRAMBackingStore::probe: scheme "file": not ram: or ramdisk: scheme.
CRAMBackingStore::probe: score -1000 for file://localhost/Volumes/netboot/Lion.nbi/Library.dmg
DIBackingStoreInstantiatorProbe: probing interface 3 CCarbonBackingStore
CCarbonBackingStore::newProbe: setting initial rval to +100
CCarbonBackingStore::newProbe score 100 for file://localhost/Volumes/netboot/Lion.nbi/Library.dmg
DIBackingStoreInstantiatorProbe: probing interface 4 CDevBackingStore
CDevBackingStore::newProbe: not /dev/disk or /dev/rdisk (/Volumes/netboot/Lion.nbi/Library.dmg).CDevBackingStore::newProbe score -1000 for
DIBackingStoreInstantiatorProbe: probing interface 5 CCURLBackingStore
CCURLBackingStore::probe: scheme is: file
CCURLBackingStore::probe: not recognized URL scheme.
CCURLBackingStore::probe: score -1000 for file://localhost/Volumes/netboot/Lion.nbi/Library.dmg
DIBackingStoreInstantiatorProbe: probing interface 6 CVectoredBackingStore
CVectoredBackingStore::newProbe not "vectored" scheme.
CVectoredBackingStore::newProbe score -1000 for file://localhost/Volumes/netboot/Lion.nbi/Library.dmg
DIBackingStoreInstantiatorProbe: selecting CBSDBackingStore
DIBackingStoreNewWithCFURL: CBSDBackingStore
CBSDBackingStore::setPermission: opening /Volumes/netboot/Lion.nbi/Library.dmg
CBSDBackingStore::OpenLockFriendly: mapping flags 0x00000000 -> 0x00000014 (locks are MANDATORY)
CBSDBackingStore:OpenLockFriendly: could not open with lock 30
DIBackingStoreNewWithCFURL: instantiator returned 30
DIBackingStoreNewWithCFURL: returning 30
DIResolveURLToBackingStore: unable to resolve to any backing store class. 30.
DIResolveURLToDiskImage: resolving backing store/file encoding failed. 30.
2012-11-27 12:02:23.211 hdiutil[23401:2803] [DIHelperProxy frameworkCallbackWithDictionary] entry
status proc called: attach
Attaching…
Error 30 (Read-only file system).
myStatusProc: returning 0
2012-11-27 12:02:23.227 hdiutil[23401:2803] [DIHelperProxy frameworkCallbackWithDictionary] exit
2012-11-27 12:02:23.228 hdiutil[23401:2803] [DIHelperProxy frameworkCallbackWithDictionary] entry
status proc called: cleanup
Finishing…
myStatusProc: returning 0
2012-11-27 12:02:23.228 hdiutil[23401:2803] [DIHelperProxy frameworkCallbackWithDictionary] exit
2012-11-27 12:02:23.229 diskimages-helper[23407:2503] DIHelperAttach performOperation: returning 30
2012-11-27 12:02:23.229 diskimages-helper[23407:2503] -decrementBackgroundThreadCount: _backgroundThreadCount is now 0.
2012-11-27 12:02:23.229 diskimages-helper[23407:303] DIHelper _report_results: reporting {
payload = {
};
"result-code" = 30;
}
2012-11-27 12:02:23.230 hdiutil[23401:2803] reportResultsToFramework: proxy has finished operation
2012-11-27 12:02:23.230 hdiutil[23401:2803] reportResultsToFramework: results are: {
payload = {
};
"result-code" = 30;
}
2012-11-27 12:02:23.230 hdiutil[23401:2803] reportResultsToFramework: _threadResultsError is 30
2012-11-27 12:02:23.231 hdiutil[23401:2803] reportResultsToFramework: disconnecting from helper.
2012-11-27 12:02:23.231 diskimages-helper[23407:303] -setCanTerminate: main thread can exit
2012-11-27 12:02:23.332 hdiutil[23401:2803] [DIHelperProxy disconnectFromHelper] entry
2012-11-27 12:02:23.333 hdiutil[23401:2803] disconnectFromHelper: removing observers
2012-11-27 12:02:23.333 hdiutil[23401:2803] disconnectFromHelper: terminating proxy
2012-11-27 12:02:23.334 diskimages-helper[23407:303] DIHelper: terminateHelper: entry.
2012-11-27 12:02:23.334 hdiutil[23401:2803] disconnectFromHelper: terminated proxy
2012-11-27 12:02:23.335 hdiutil[23401:2803] [DIHelperProxy disconnectFromHelper] releasing helper
2012-11-27 12:02:23.335 hdiutil[23401:2803] [DIHelperProxy disconnectFromHelper] exit
2012-11-27 12:02:23.435 diskimages-helper[23407:303] [DIHelper frameworkConnectionDied] entry
2012-11-27 12:02:23.435 diskimages-helper[23407:303] [DIHelper frameworkConnectionDied] releasing connection
2012-11-27 12:02:23.435 diskimages-helper[23407:303] [DIHelper frameworkConnectionDied] releasing frameworkProxy
2012-11-27 12:02:23.435 diskimages-helper[23407:303] -DIHelperAgentMaster terminateUIAgentConnection.
2012-11-27 12:02:23.435 diskimages-helper[23407:303] [DIHelper frameworkConnectionDied] marking _frameworkDisconnected
2012-11-27 12:02:23.435 diskimages-helper[23407:303] [DIHelper frameworkConnectionDied] exiting
2012-11-27 12:02:24.232 hdiutil[23401:2803] [DIHelperProxy workerThread] removing NSConnectionDidDieNotification observers
2012-11-27 12:02:24.233 hdiutil[23401:2803] [DIHelperProxy workerThread] removing NSConnectionDidInitializeNotification observers
2012-11-27 12:02:24.234 hdiutil[23401:2803] [DIHelperProxy workerThread] removing NSTaskDidTerminateNotification observers
2012-11-27 12:02:24.234 hdiutil[23401:2803] [DIHelperProxy threadRunRunLoop] invalidating connection
2012-11-27 12:02:24.235 diskimages-helper[23407:303] DIHelper dealloc.
2012-11-27 12:02:24.234 hdiutil[23401:2803] [DIHelperProxy threadRunRunLoop] releasing connection
2012-11-27 12:02:24.235 diskimages-helper[23407:303] -DIHelperAgentMaster terminateUIAgentConnection.
2012-11-27 12:02:24.235 hdiutil[23401:2803] [DIHelperProxy workerThread] after running runloop
2012-11-27 12:02:24.235 diskimages-helper[23407:303] helper: child_after_exec returning 0
2012-11-27 12:02:24.235 hdiutil[23401:2803] [DIHelperProxy workerThread] waiting for task to terminate to avoid zombies
2012-11-27 12:02:24.236 hdiutil[23401:2803] [DIHelperProxy workerThread] releasing task
2012-11-27 12:02:24.236 hdiutil[23401:2803] [DIHelperProxy workerThread] exiting
2012-11-27 12:02:24.236 hdiutil[23401:707] [DIHelperProxy performOperationReturning] returning 30
2012-11-27 12:02:24.237 hdiutil[23401:707] DIHLDiskImageAttach: DIHelperProxy returned 30
2012-11-27 12:02:24.237 hdiutil[23401:707] [DIHelperProxy dealloc]
DIHLDiskImageAttach() returned 30
hdiutil: attach failed - Read-only file system
kyle:~ root#
fs_usage
je courrais pour voir si je peux attraper le système de fichiers en train d'écrire - éventuellement en signalant un bogue avec Apple. Il semble que vous devriez pouvoir lire un DMG en lecture seule - mais il y a peut-être une raison technique plus profonde pour laquelle il échoue et le système d'exploitation a besoin d'un meilleur message d'erreur pour nous expliquer pourquoi ...hdiutil
avec le-debug
commutateur, je peux poster ces journaux icirpcinfo -p
sur le serveur? Quelle est la sortie demount
sur votre Mac? Pouvez-vous également ajouter la ligne appropriée de/etc/exports
sur le serveur NFS à la question?hdiutil -debug
et les informations que j'ai demandées à votre question?Réponses:
Je m'intéresse à cette question depuis novembre 2012 et j'ai même mis en place une machine virtuelle FreeNAS pour reproduire le problème.
J'ai finalement abandonné mais comme la question a été ressuscitée, je vais partager ce que j'ai découvert à l'époque et dans les dernières heures (heureusement, je n'ai pas supprimé la machine virtuelle) et ce que je pense que la cause de ce problème est. J'ai également trouvé une solution de contournement.
Ma configuration
Tout d'abord, voici ma configuration de test:
OS X 10.8.2 (désolé, pas de 10.7.5 autour).
FreeNAS (FreeBSD 8.2-RELEASE-p1)
(La version de l'OP est FreeBSD 8.2-RELEASE-p7 - Je n'ai pas pu trouver la même version.)
Un système de fichiers NAS dans
/mnt/raid
:Un utilisateur nommé
netboot
:Un système de fichiers AFP (
/mnt/raid/netboot
) exporté en tant quenetboot
:(Notez qu'il est configuré en lecture seule).
Un système de fichiers NFS (même chemin d'accès que le système de fichiers AFP, pour correspondre à la configuration de l'OP:)
/mnt/raid/netboot
:AFP fonctionne, NFS ne fonctionne pas
J'ai monté le système de fichiers AFP en lecture seule en tant qu'utilisateur
netboot
à l'aide du Finder avec ⌘K:et monté un fichier image DMG sans aucun problème:
Ensuite, je l'ai démonté et monté le système de fichiers NFS en lecture seule (j'ai également utilisé ⌘K) et je n'ai pas pu monter le fichier image DMG.
Je pense que le problème est enregistré ici:
L'erreur 30 signifie (voir
man 2 intro
):Pas de surprise ici, c'est en effet un système de fichiers en lecture seule, mais ... lorsqu'il est monté sur AFP ça marche, pourquoi?
Parce que l'implémentation NFS d'Apple a quelques problèmes de verrouillage. Comme indiqué dans cet article sur gluster.org:
Dans ma configuration, le serveur NFS (c'est-à-dire la machine virtuelle FreeNAS) était soudainement irresponsable (de la part de mon Mac
/var/log/system.log
):Le résultat de
sudo /usr/bin/hdiutil attach -debug /Volumes/netboot/p7zip-9.04-0.i386.dmg -notremovable -shadow /private/var/netboot/Library-Shadow -owners on -noverify -noautofsck -nobrowse
était:L'erreur 5 signifie (à nouveau de
man 2 intro
):ce qui n'est pas surprenant du tout, le système de fichiers NFS était parti.
solution de contournement
Une solution de contournement (testée sur OS X 10.8) consiste à monter NFS avec des options
nolocks,locallocks
. Comme expliqué dans le post sur gluster.org déjà mentionné:J'ai monté manuellement
172.16.54.186:/mnt/raid/netboot
et cela a fonctionné parfaitement:J'ai également édité
/etc/auto_master
comme ceci:arrêté et démarré
automountd
etautofsd
:et a fonctionné comme un charme:
la source
nolocks,locallocks
contribue aux performances NFS d'autres partages NFS en lecture seule avec des fichiers DMG, alors merci!/Library
baie RAID de notre image NetBoot. Nous n'en avons plus besoin car nous avons acheté un nouveau serveur Mac Pro)hdiutil attach -readonly…
Pour une image stockée sur un système de fichiers en lecture seule, je pense qu'elle
-readonly
devrait être utilisée au moment de la pièce jointe.(Le cas de l'AFP peut être exceptionnel.)
Compte tenu du vote négatif et du commentaire de @Josh: j'ai mal compris la
-shadow
partie de la page de manuel pourhdiutil
:- J'imaginais que cela
-shadow
pourrait passer outre-readonly
.la source
-readonly
et-shadow
lirait à partir d'un fichier caché mais monteriez l'image en lecture seule. Ainsi, par exemple, cela vous permettrait de lire les modifications apportées à un fichier miroir sans mettre à jour ce fichier miroir. Le problème était les verrous NFS comme Jaume l'a découvert.