मैं DMG फ़ाइलों को क्यों नहीं खोल सकता, जो केवल पढ़ने के लिए NFS फाइल सिस्टम पर रहती हैं?


15

मुझे एक अजीब समस्या का पता चला है ... अगर मेरे पास डिस्क छवि फाइलें (डीएमजी) हैं जो केवल पढ़ने के लिए एनएफएस शेयर पर रहती हैं, तो मैं इन्हें मैक ओएस एक्स 10.7.5 में नहीं खोल सकता। AFP पर पहुँचने पर वही फ़ाइलें ठीक खुलती हैं। हालाँकि, hdiutil attachजब वे NFS के शेयर परिणाम में शामिल होते हैं, तो उन्हें खोलने की कोशिश करते हैं, "अटैचमेंट विफल - केवल-पढ़ने के लिए फ़ाइल सिस्टम":

bash-3.2# /usr/bin/hdiutil attach /Volumes/nfs_share/Some.dmg
hdiutil: attach failed - Read-only file system

यहां तक ​​कि अगर एएफपी शेयर केवल-पढ़ने के लिए है, तो मैं उन्हीं छवियों को संलग्न कर सकता हूं। लेकिन किसी कारण से, केवल पढ़ने के लिए NFS शेयर काम नहीं करता है।

अंततः मैं जो करना चाहता हूं वह छाया फाइल के साथ छवियों को संलग्न करना है , केवल पढ़ने-लिखने के लिए छवियों को माउंट करने के लिए। लेकिन यह भी उसी तरह विफल होता है:

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

फिर, यह पूरी तरह से काम करता है अगर छवि को एएफपी के माध्यम से परोसा जाता है। एनएफएस शेयर पढ़ने-लिखने के दौरान भी यह ठीक काम करता है, लेकिन सुरक्षा कारणों से मैं ऐसा नहीं कर सकता।

मैं DMG फ़ाइलों को कैसे माउंट कर सकता हूं जो केवल पढ़ने के लिए NFS शेयर पर रहती हैं?


अतिरिक्त जानकारी:

/etc/exportsFreeNAS (FreeBSD 8.2-RELEASE-p7) सर्वर पर संबंधित पंक्ति :

/mnt/raid/netboot -alldirs -ro -mapall=netboot:netboot -network 10.100.0.0/16

के उत्पादन /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

rpcinfo -pएनएफएस सर्वर पर आउटपुट :

   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

mountमैक ओएस एक्स 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)

और अंत में, का उत्पादन /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# 

1
मेरे पास परीक्षण करने के लिए एक एनएफएस हिस्सा नहीं है, लेकिन मैं एक शांत प्रणाली रखने की कोशिश करूंगा और fs_usageयह देखने के लिए दौड़ूंगा कि क्या मैं एक फाइल कॉल करने वाले फाइल सिस्टम को पकड़ सकता हूं - संभवतः ऐप्पल के साथ बग दर्ज करना। ऐसा लगता है कि आप पढ़ने में सक्षम होना चाहिए एक रीड-ओनली डीएमजी - लेकिन शायद कुछ गहरी तकनीकी कारण है कि वह असफल रहा है और ओएस के लिए एक बेहतर त्रुटि संदेश की जरूरत है हमें सूचित करने के लिए क्यों नहीं है ...
bmike

अच्छा विचार @bmike! इसके अलावा, मैं स्विच के hdiutilसाथ भाग गया -debug, मैं उन लॉग को यहां पोस्ट कर सकता हूं
जोश

वास्तव में - जो कुछ भी आप पाते हैं उसके साथ एक उत्तर दें और हम टीम बना सकते हैं - एक बग की रिपोर्ट करें या उत्तर को संपादित करें क्योंकि हम "क्यों" को अलग करते हैं।
bmike

NFS सर्वर पर कौन सा OS चलता है? rpcinfo -pसर्वर पर आउटपुट क्या है ? mountआपके मैक पर आउटपुट क्या है ? क्या आप /etc/exportsसवाल पर NFS सर्वर की संबंधित लाइन भी जोड़ सकते हैं ?
jaume

1
मैंने एक NFS सर्वर (Ubuntu 12.04) को केवल-पढ़ने के लिए निर्यात के साथ सेट किया है, जिसे मैंने अपने Mac (OS X 10.8.2) पर माउंट किया है और मैं आपकी समस्या को पुन: उत्पन्न नहीं कर सका (मैंने सभी dmg स्वरूपों का परीक्षण किया: आसानी से, संपीड़ित, एन्क्रिप्टेड, आदि) ... क्या आप hdiutil -debugअपने प्रश्न के लिए और मेरे द्वारा मांगी गई जानकारी का आउटपुट जोड़ सकते हैं ?
21

जवाबों:


11

मैं नवंबर 2012 से इस सवाल में दिलचस्पी ले रहा हूं और यहां तक ​​कि इस मुद्दे को पुन: पेश करने के लिए एक FreeNAS VM भी स्थापित किया है।

मैंने आखिरकार हार मान ली लेकिन जब से इस सवाल को फिर से शुरू किया गया है तब मैं वही साझा करूंगा जो मुझे फिर से पता चला और आखिरी घंटों में (सौभाग्य से मैंने वीएम को नहीं हटाया) और मुझे लगता है कि इस मुद्दे का कारण क्या है। मुझे वर्कअराउंड भी मिला है।

मेरा सेटअप

सबसे पहले, यह मेरा परीक्षण सेटअप है:

  • OS X 10.8.2 (क्षमा करें, कोई 10.7.5 आसपास)।

  • FreeNAS (FreeBSD 8.2-RELEASE-p1)

    यहाँ छवि विवरण दर्ज करें

    (ओपी का संस्करण FreeBSD 8.2-RELEASE-p7 है - मुझे एक ही संस्करण नहीं मिला।)

  • एक NAS फाइल सिस्टम /mnt/raid:

    यहाँ छवि विवरण दर्ज करें

  • एक उपयोगकर्ता नाम netboot:

    यहाँ छवि विवरण दर्ज करें

  • एक एएफपी फाइल सिस्टम ( /mnt/raid/netboot) निम्नानुसार निर्यात किया जाता है netboot:

    यहाँ छवि विवरण दर्ज करें

    (ध्यान दें कि यह केवल पढ़ने के लिए कॉन्फ़िगर किया गया है)।

  • एनएफएस फाइलसिस्टम (ओपी के विन्यास से मेल खाने के लिए एएफपी फाइलसिस्टम के समान पथ:) /mnt/raid/netboot:

    यहाँ छवि विवरण दर्ज करें

एएफपी काम करता है, एनएफएस नहीं करता है

मैंने netbootखोजक का उपयोग करते हुए उपयोगकर्ता के रूप में एएफपी रीड-ओनली फाइलसिस्टम आरोहित किया K:

यहाँ छवि विवरण दर्ज करें

और बिना किसी समस्या के DMG छवि फ़ाइल को माउंट किया:

$ sudo rm /private/var/netboot/Library-Shadow
$ sudo /usr/bin/hdiutil attach /Volumes/netboot/p7zip-9.04-0.i386.dmg -notremovable -shadow /private/var/netboot/Library-Shadow -owners on -noverify -noautofsck -nobrowse
Password:
/dev/disk3              Apple_partition_scheme          
/dev/disk3s1            Apple_partition_map             
/dev/disk3s2            Apple_HFS                       /Volumes/p7zip.pkg

तब मैंने इसे अनमाउंट कर दिया और केवल-पढ़ने वाली NFS फाइलसिस्टम (मैंने भी इस्तेमाल किया K) को माउंट किया और DMG इमेज फाइल को माउंट नहीं कर सका।

मुझे लगता है कि समस्या यहाँ लॉग इन है:

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

त्रुटि 30 का अर्थ है (देखें man 2 intro):

30 EROFS रीड-ओनली फाइल सिस्टम। एक फ़ाइल को संशोधित करने का प्रयास किया गया था या उस फ़ाइल सिस्टम पर निर्देशिका बनाई गई थी जो उस समय केवल पढ़ने के लिए थी।

यहां कोई आश्चर्य की बात नहीं है, यह वास्तव में एक केवल-पढ़ने योग्य फाइल सिस्टम है, लेकिन ... जब एएफपी पर चढ़कर काम करता है, तो क्यों?

क्योंकि Apple के NFS कार्यान्वयन में लॉकिंग के साथ कुछ समस्याएं हैं। जैसा कि gluster.org पर इस पोस्ट में कहा गया है :

OS X फ़ाइल लॉकिंग की एक फिनोमिनल राशि (कुछ कहेंगे, अनावश्यक रूप से ऐसा करता है) और हमेशा एनएफएस सर्वर पर लॉकिंग के कॉन्फ़िगरेशन के लिए वास्तव में संवेदनशील रहा है। इतना है कि यदि आप एक बड़े उद्यम में बेतरतीब ढंग से एनएफएस सर्वर चुनते हैं, तो सच्ची सफलता की संभावना बहुत कम है।

मेरे सेटअप में, NFS सर्वर (अर्थात, FreeNAS VM) अचानक गैर जिम्मेदार था (मेरे मैक से /var/log/system.log):

Mar 15 15:35:04 avallone.local rpc.lockd[8119]: Lockd got unexpected signal 20
Mar 15 15:35:04 avallone com.apple.launchd[1] (com.apple.lockd[8119]): Exited with code: 1
Mar 15 15:35:04 avallone com.apple.launchd[1] (com.apple.lockd): Throttling respawn: Will start in 10 seconds
(...)
Mar 15 15:35:07 avallone com.apple.launchd[1] (com.apple.statd[8121]): Exited with code: 1
Mar 15 15:35:07 avallone com.apple.launchd[1] (com.apple.statd): Throttling respawn: Will start in 10 seconds
Mar 15 15:35:13 avallone kernel[0]: nfs server 172.16.54.186:/mnt/raid/netboot: lockd not responding
Mar 15 15:35:13 avallone.local KernelEventAgent[72]: tid 00000000 received event(s) VQ_NOTRESP (1)
Mar 15 15:35:13 avallone.local KernelEventAgent[72]: tid 00000000 type 'nfs', mounted on '/Volumes/netboot', from '172.16.54.186:/mnt/raid/netboot', not responding
(...)
Mar 15 15:35:34 avallone.local KernelEventAgent[72]: tid 00000000 unmounting 1 filesystems

का उत्पादन 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था:

CBSDBackingStore::setPermission: opening /Volumes/netboot/p7zip-9.04-0.i386.dmg
CBSDBackingStore::OpenLockFriendly: mapping flags 0x00000000 -> 0x00000014 (locks are MANDATORY)
CBSDBackingStore:OpenLockFriendly: could not open with lock 5

त्रुटि 5 का अर्थ है (फिर से man 2 intro):

5 ईआईओ इनपुट / आउटपुट त्रुटि। कुछ भौतिक इनपुट या आउटपुट त्रुटि हुई। यह त्रुटि तब तक दर्ज नहीं की जाएगी जब तक कि एक ही फाइल डिस्क्रिप्टर पर एक बाद के ऑपरेशन और किसी भी बाद की त्रुटियों से (लिखित रूप से) खो न जाए।

जो सब पर आश्चर्य नहीं कर रहा है, NFS फाइल सिस्टम चला गया था।

वर्कअराउंड

एक वैकल्पिक हल (OS X 10.8 पर परीक्षण किया गया) विकल्प के साथ NFS को माउंट करना है nolocks,locallocks। जैसा कि gluster.org पर पोस्ट में पहले ही बताया गया है:

सौभाग्य से, एक फिक्स है: बस नेटवर्क लॉकिंग बंद करें। आप डिस्क उपयोगिता एनएफएस बढ़ते यूआई के उन्नत विकल्प क्षेत्र में "नोलॉक्स, लोकलॉक" विकल्प जोड़कर कर सकते हैं, लेकिन यह दर्दनाक है यदि आप उनमें से बहुत कुछ करते हैं, और नेट / नेट के साथ बिल्कुल भी मदद नहीं करते हैं। आप इन विकल्पों को / net प्रविष्टि में जोड़ने के लिए / etc / auto_master को संपादित कर सकते हैं, लेकिन यह अन्य आरोहियों को प्रभावित नहीं करता है - हालाँकि मैं ऑटो_मास्टर में Hidefromfinder विकल्प को हटाने की सलाह देता हूँ। यदि आप हर ऑटोमाउंट को ठीक करना चाहते हैं, तो /etc/autofs.conf को संपादित करें और उस लाइन को खोजें जो AUTOMOUNTD_MNTOPTS = से शुरू होती है। ये विकल्प हर माउंट पर लागू होते हैं। रिबॉक के बाद नोलॉक, लोकलॉक और आपकी दुनिया तेजी से और खुशहाल होगी।

मैंने मैन्युअल रूप से घुड़सवार किया 172.16.54.186:/mnt/raid/netbootऔर यह त्रुटिपूर्ण काम किया:

$ sudo rm /private/var/netboot/Library-Shadow
$ sudo mount -o nolocks,locallocks,ro 172.16.54.186:/mnt/raid/netboot /tmp/mnt
$ sudo /usr/bin/hdiutil attach /tmp/mnt/p7zip-9.04-0.i386.dmg -notremovable -shadow /private/var/netboot/Library-Shadow -owners on -noverify -noautofsck -nobrowse
/dev/disk6              Apple_partition_scheme          
/dev/disk6s1            Apple_partition_map             
/dev/disk6s2            Apple_HFS                       /Volumes/p7zip.pkg

मैंने भी /etc/auto_masterइस तरह संपादित किया :

+auto_master # Use directory service
#/net             -hosts    -nobrowse,hidefromfinder,nosuid
/net              -hosts    -nosuid,nolocks,locallocks
/home             auto_home -nobrowse,hidefromfinder
/Network/Servers  -fstab
/-                -static

बंद कर दिया और शुरू कर दिया automountdऔर autofsd:

$ sudo launchctl unload /System/Library/LaunchDaemons/com.apple.automountd.plist 
$ sudo launchctl unload /System/Library/LaunchDaemons/com.apple.autofsd.plist 
$ sudo launchctl load /System/Library/LaunchDaemons/com.apple.autofsd.plist 
$ sudo launchctl load /System/Library/LaunchDaemons/com.apple.automountd.plist 

और एक आकर्षण की तरह काम किया:

$ cd /net/172.16.54.186/mnt/raid/netboot
$ ls 
Network Trash Folder  Temporary Items  p7zip-9.04-0.i386.dmg
$ sudo rm /private/var/netboot/Library-Shadow
$ sudo /usr/bin/hdiutil attach p7zip-9.04-0.i386.dmg -notremovable -shadow /private/var/netboot/Library-Shadow -owners on -noverify -noautofsck -nobrowse
/dev/disk7              Apple_partition_scheme          
/dev/disk7s1            Apple_partition_map             
/dev/disk7s2            Apple_HFS                       /Volumes/p7zip.pkg

बहुत बढ़िया, क्या अच्छा पढ़ा।
गॉसमंड

वाह यह शानदार है, धन्यवाद! मैं सप्ताहांत में इसका परीक्षण करूंगा, यह मेरे मुद्दे को हल कर सकता है!
जोश

धन्यवाद jaume, यह एक आकर्षण की तरह काम किया! दुर्भाग्य से मुझे पहले से ही एक विकल्प मिल गया है और अब इसे उसी डीएमजी को छाया फाइल के साथ माउंट करने की आवश्यकता नहीं है, लेकिन nolocks,locallocksडीएमजी फाइलों के साथ अन्य रीड-ओनली एनएफएस शेयरों के एनएफएस प्रदर्शन में मदद कर रहा है, इसलिए धन्यवाद!
जोश

आपकी प्रतिक्रिया के लिए धन्यवाद, मुझे खुशी है कि आपके वातावरण में काम किया गया समाधान। हालाँकि आपको इसकी कोई आवश्यकता नहीं है, लेकिन यह जानना अच्छा है कि कुछ काम क्यों नहीं करता है, है ना?
jaume

बिल्कुल, और अब मुझे पता है कि मुझे क्या बदलने की ज़रूरत है मुझे भविष्य में फिर से इसकी आवश्यकता होनी चाहिए! (लक्ष्य पहले /Libraryसे हमारी नेटबूट इमेज के लिए नहीं था। आरओ सरणी। हमें अब इसकी जरूरत नहीं है क्योंकि हमने एक नया मैक प्रो सर्वर खरीदा है)
जोश

-1

हडूतिल संलग्न

एक छवि के लिए जो केवल-पढ़ने के लिए फ़ाइल सिस्टम पर संग्रहीत है, मुझे लगता है कि -readonlyअनुलग्नक के समय उपयोग किया जाना चाहिए।

(एएफपी मामला असाधारण हो सकता है।)


नीचे दिए गए वोट और @ जोश से टिप्पणी को ध्यान में रखते हुए: मैंने इसके -shadowलिए मैन पेज का हिस्सा गलत समझा hdiutil:

… पठन-पाठन के लिए केवल पठन-पाठन की अनुमति देता है…

- मैंने कल्पना की कि -shadowओवरराइड कर सकता हूं -readonly


नहीं, तुम गलत समझ रहे हो। मैं छाया-चित्र फ़ाइल के साथ पढ़ने-लिखने के वॉल्यूम के रूप में केवल-पढ़ने के लिए छवि संलग्न करना चाहता था।
जोश

1
अपने संपादन के बारे में, नहीं, दोनों का उपयोग करके -readonlyऔर -shadowएक छाया फ़ाइल से पढ़ा जाएगा लेकिन छवि को केवल पढ़ने के लिए माउंट करें। इसलिए उदाहरण के लिए यह आपको उस शैडो फाइल को अपडेट किए बिना एक शैडो फाइल में किए गए बदलावों को पढ़ने की अनुमति देगा। इस मुद्दे को NFS लॉक था जैसा कि jaume ने खोजा
जोश

@ जोश से एक बहुत ही साफ-सुथरा स्पष्टीकरण - धन्यवाद! मैं इस जवाब को छोड़ दूंगा ताकि अन्य पाठक मेरे जैसी गलती न करें।
ग्राहम पेरिन
हमारी साइट का प्रयोग करके, आप स्वीकार करते हैं कि आपने हमारी Cookie Policy और निजता नीति को पढ़ और समझा लिया है।
Licensed under cc by-sa 3.0 with attribution required.