Open ralexx opened 8 years ago
It's clear that there's nothing to do with sleepwatcher. Sleepwatcher only involves two of my scripts to unmount or mount the external disks.
From your disklist list, it's very clear that your external disks have wrong type. It's very likely that you have wrong config for PCIe USB card. It should be external
instead of internal
. That's why fixUSB.sh cannot unmount your devices.
Since I haven't had PCIe USB card, if you want me to help you to solve this issue, you'd better to provide as much information including diskutil info /dev/disk8, system information, ioreg, PCIe and something like that.
syscl
Thank you 周总. That's already very helpful and I'm pretty sure you have more important things to do than help me troubleshoot hardware issues. I appreciate your thoughtfulness.
I don't think you should close this issue since solving this issue do help others who suffer similar issues.
syscl
@syscl, I closed the issue because that particular external drive housing has other issues I am working on with the manufacturer. My second external drive housing correctly shows the same disk as external, and anyway the the CPU has stopped sleeping while the external drive is mounted in the second housing.
At your suggestion I will leave this open and update as appropriate. Meanwhile, since you asked, here are sysinfo Storage and USB tabs, diskutil info
and ioreg
. File names with 'dock' in them refer to the second external drive housing referred to above.
sysinfo-usb-storage-dock.txt diskutil-info-dock.txt ioreg.txt sysinfo-usb-storage-housing.txt diskutil-info-housing.txt ioreg_short.txt
@ralexx thanks for your details, I found a new way to fix your issue, will soon let you know.
Again, I'm very appreciate your detail report.
Thanks, syscl
I have changed to code to try to fix this issue, but I have to go outside now, will upload tonight;)
syscl
@ralexx try the latest update I made.
Wait for your feedback, good luck! syscl
@syscl,
Now running macOS 10.12.4. Applied your updated script and sleep. Drives on PCIe USB card still show "Disk Not Ejected" error.
Is this log message meaningful?
com.apple.xpc.launchd[1] (com.syscl.externalfix.sleepwatcher[54279]): Could not find and/or execute program specified by service: 13: Permission denied: /usr/local/sbin/sleepwatcher
Really appreciate your information, I will look into it these days.
syscl
Hi there, I am not sure if you are still working on this awesome script but I also have a PCIe USB card where I get the Disk Not Ejected Properly error. Sometimes your script works flawlessly but other times it doesn't. I am on Sierra 10.12.6 so perhaps something has changed to make the script incompatible? Any way I can help, please let me know. Thanks!
Hi @enjay314
Could you please provide at least your diskutil list
and the log from your current PCIe USB, say for example the IDENTIFIER
of your PCIe USB is disk3
then type indiskutil info disk3
and diskutil info disk3s[0-9]
as well.
Thank you, syscl
Sure! Thank you! I just included the additional info for disk1 and disk2, let me know if you need the other disks.
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *120.0 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_HFS Neumega HD 119.2 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
/dev/disk1 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *2.0 TB disk1
1: EFI EFI 209.7 MB disk1s1
2: Apple_HFS 4 2.0 TB disk1s2
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *2.0 TB disk2
1: EFI EFI 209.7 MB disk2s1
2: Apple_HFS 5 2.0 TB disk2s2
/dev/disk3 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *2.0 TB disk3
1: EFI EFI 209.7 MB disk3s1
2: Apple_HFS 3 2.0 TB disk3s2
/dev/disk4 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *4.0 TB disk4
1: EFI EFI 209.7 MB disk4s1
2: Apple_HFS 1 4.0 TB disk4s2
/dev/disk5 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *6.0 TB disk5
1: EFI EFI 209.7 MB disk5s1
2: Apple_HFS 2 6.0 TB disk5s2
Device Identifier: disk1
Device Node: /dev/disk1
Whole: Yes
Part of Whole: disk1
Device / Media Name: Master DAS
Volume Name: Not applicable (no file system)
Mounted: Not applicable (no file system)
File System: None
Content (IOContent): GUID_partition_scheme
OS Can Be Installed: No
Media Type: Generic
Protocol: USB
SMART Status: Not Supported
Disk Size: 2.0 TB (2000398934016 Bytes) (exactly 3907029168 512-Byte-Units)
Device Block Size: 512 Bytes
Read-Only Media: No
Read-Only Volume: Not applicable (no file system)
Device Location: External
Removable Media: Fixed
Virtual: No
OS 9 Drivers: No
Low Level Format: Not supported
Device Identifier: disk1s1
Device Node: /dev/disk1s1
Whole: No
Part of Whole: disk1
Volume Name: EFI
Mounted: No
Partition Type: EFI
File System Personality: MS-DOS FAT32
Type (Bundle): msdos
Name (User Visible): MS-DOS (FAT32)
OS Can Be Installed: No
Media Type: Generic
Protocol: USB
SMART Status: Not Supported
Volume UUID: 0E239BC6-F960-3107-89CF-1C97F78BB46B
Disk / Partition UUID: 28A6286B-32A0-442D-B97D-17BF0B3AA008
Disk Size: 209.7 MB (209715200 Bytes) (exactly 409600 512-Byte-Units)
Device Block Size: 512 Bytes
Volume Total Space: 0 B (0 Bytes) (exactly 0 512-Byte-Units)
Volume Available Space: 0 B (0 Bytes) (exactly 0 512-Byte-Units)
Read-Only Media: No
Read-Only Volume: Not applicable (not mounted)
Device Location: External
Removable Media: Fixed
Device Identifier: disk1s2
Device Node: /dev/disk1s2
Whole: No
Part of Whole: disk1
Volume Name: 4
Mounted: Yes
Mount Point: /Volumes/4
Partition Type: Apple_HFS
File System Personality: Journaled HFS+
Type (Bundle): hfs
Name (User Visible): Mac OS Extended (Journaled)
Journal: Journal size 155648 KB at offset 0x3a38000
Owners: Disabled
OS Can Be Installed: Yes
Media Type: Generic
Protocol: USB
SMART Status: Not Supported
Volume UUID: 7925296B-AD1D-3984-A8DB-492E7DBCF501
Disk / Partition UUID: 9BCE5643-C956-41D4-997E-4767487E383F
Disk Size: 2.0 TB (2000054960128 Bytes) (exactly 3906357344 512-Byte-Units)
Device Block Size: 512 Bytes
Volume Total Space: 2.0 TB (2000054960128 Bytes) (exactly 3906357344 512-Byte-Units)
Volume Used Space: 1.9 TB (1884683186176 Bytes) (exactly 3681021848 512-Byte-Units) (94.2%)
Volume Available Space: 115.4 GB (115371773952 Bytes) (exactly 225335496 512-Byte-Units) (5.8%)
Allocation Block Size: 4096 Bytes
Read-Only Media: No
Read-Only Volume: No
Device Location: External
Removable Media: Fixed
Device Identifier: disk2
Device Node: /dev/disk2
Whole: Yes
Part of Whole: disk2
Device / Media Name: Master DAS
Volume Name: Not applicable (no file system)
Mounted: Not applicable (no file system)
File System: None
Content (IOContent): GUID_partition_scheme
OS Can Be Installed: No
Media Type: Generic
Protocol: USB
SMART Status: Not Supported
Disk Size: 2.0 TB (2000398934016 Bytes) (exactly 3907029168 512-Byte-Units)
Device Block Size: 512 Bytes
Read-Only Media: No
Read-Only Volume: Not applicable (no file system)
Device Location: External
Removable Media: Fixed
Virtual: No
OS 9 Drivers: No
Low Level Format: Not supported
Device Identifier: disk2s1
Device Node: /dev/disk2s1
Whole: No
Part of Whole: disk2
Volume Name: EFI
Mounted: No
Partition Type: EFI
File System Personality: MS-DOS FAT32
Type (Bundle): msdos
Name (User Visible): MS-DOS (FAT32)
OS Can Be Installed: No
Media Type: Generic
Protocol: USB
SMART Status: Not Supported
Volume UUID: 3A659C61-576D-35F9-8A4C-3BDD6E36337C
Disk / Partition UUID: 4C2A310F-F44E-4AA2-B366-726ACB25DD9E
Disk Size: 209.7 MB (209715200 Bytes) (exactly 409600 512-Byte-Units)
Device Block Size: 512 Bytes
Volume Total Space: 0 B (0 Bytes) (exactly 0 512-Byte-Units)
Volume Available Space: 0 B (0 Bytes) (exactly 0 512-Byte-Units)
Read-Only Media: No
Read-Only Volume: Not applicable (not mounted)
Device Location: External
Removable Media: Fixed
Device Identifier: disk2s2
Device Node: /dev/disk2s2
Whole: No
Part of Whole: disk2
Volume Name: 5
Mounted: Yes
Mount Point: /Volumes/5
Partition Type: Apple_HFS
File System Personality: HFS+
Type (Bundle): hfs
Name (User Visible): Mac OS Extended
Owners: Disabled
OS Can Be Installed: No
Media Type: Generic
Protocol: USB
SMART Status: Not Supported
Volume UUID: 508ABAC4-D162-39A7-895D-A3B3FEDBAF45
Disk / Partition UUID: B2868ED9-5114-46DF-8DDE-61AB48FFBA34
Disk Size: 2.0 TB (2000054960128 Bytes) (exactly 3906357344 512-Byte-Units)
Device Block Size: 512 Bytes
Volume Total Space: 2.0 TB (2000054960128 Bytes) (exactly 3906357344 512-Byte-Units)
Volume Used Space: 1.6 TB (1559200817152 Bytes) (exactly 3045314096 512-Byte-Units) (78.0%)
Volume Available Space: 440.9 GB (440854142976 Bytes) (exactly 861043248 512-Byte-Units) (22.0%)
Allocation Block Size: 4096 Bytes
Read-Only Media: No
Read-Only Volume: No
Device Location: External
Removable Media: Fixed
Got it thank you so much!
First, thank you for working on this.
I use two different drive enclosures connected to USB 3.0 host adapters installed in the PCIe 2.0 x4 slots (3 and 4) in my 5,1 Mac Pro running 10.11.6. Below is the Console log from a wake/sleep cycle that generated "Disk Not Ejected" error messages earlier today after I had installed your script successfully.
It seems that the OS is trying to write to the journal on the logical drive
disk8s2
and cannot find it. Could this be the source of the error message? I'm not familiar with howsleepwatch
handles such an event.