photos.app – How to fix Photos error while trying to open iPhoto library from external hard drive “Photos was unable to open the library” error 4302

Running Catalina 10.15.7 (19H524)

The iPhoto Library has been stored on an external hard drive. Tried opening it various times. Restarted the computer. Remounted the hard drive.

Any idea how to get it to open?

Found this thread googling – https://discussions.apple.com/thread/250721038 – but don’t understand the proposed solution.

enter image description here

photos – Can i store and access iphotos library on external hard drive (and still have it backup to my cloud network)?

Apologies for my technical ineptness. What i aim to do i store my large iphoto library on an external HDD and access it from that so it does not us my laptops more limited SSD storage. Is it possible i can set this hard drive to backup via my computer to the same local network attacked storage that my computer backs up to. If so how would this been set up?

Cheers, Ben.

hard drive – Relatively new WD Red Pro yielding ATA status: 41 (DRDY ERR), error: 40 (UNC ) on FreeBSD 12.2

I am running a TrueNAS server based on FreeBSD 12.2. I migrated the storage to 10 TB WD Red Pro. They’re running for 42 days now.

Out of the sudden, during a ZFS scrub, one of the disks yielded 5 errors. All of them more or less read:

(ada2:ahcich14:0:0:0): READ_FPDMA_QUEUED. ACB: 60 b8 08 3a 0f 40 f8 01 00 07 00 00
(ada2:ahcich14:0:0:0): CAM status: ATA Status Error
(ada2:ahcich14:0:0:0): ATA status: 41 (DRDY ERR), error: 40 (UNC )
(ada2:ahcich14:0:0:0): RES: 41 40 90 3b 0f 40 f8 01 00 30 06
(ada2:ahcich14:0:0:0): Retrying command, 3 more tries remain

I ran an extended SMART test after the incident, but it yielded no errors (except those that were recorded), especially no relocated sectors or such:

smartctl 7.1 2019-12-30 r5022 (FreeBSD 12.2-RELEASE-p2 amd64) (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     WDC WD102KFBX-68M95N0
Serial Number:    (deleted)
LU WWN Device Id: 5 000cca 0b0cd3041
Firmware Version: 83.00A83
User Capacity:    10,000,831,348,736 bytes (10.0 TB)
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        Not in smartctl database (for details use: -P showall)
ATA Version is:   ACS-2, ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    (deleted)
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x82) Offline data collection activity
                    was completed without error.
                    Auto Offline Data Collection: Enabled.
Self-test execution status:      (   0) The previous self-test routine completed
                    without error or no self-test has ever 
                    been run.
Total time to complete Offline 
data collection:        (   87) seconds.
Offline data collection
capabilities:            (0x5b) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    Offline surface scan supported.
                    Self-test supported.
                    No Conveyance Self-test supported.
                    Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                    power-saving mode.
                    Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                    General Purpose Logging supported.
Short self-test routine 
recommended polling time:    (   2) minutes.
Extended self-test routine
recommended polling time:    (1108) minutes.
SCT capabilities:          (0x003d) SCT Status supported.
                    SCT Error Recovery Control supported.
                    SCT Feature Control supported.
                    SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000b   100   100   016    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0004   132   132   054    Old_age   Offline      -       96
  3 Spin_Up_Time            0x0007   100   100   024    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0012   100   100   000    Old_age   Always       -       3
  5 Reallocated_Sector_Ct   0x0033   100   100   005    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000a   100   100   067    Old_age   Always       -       0
  8 Seek_Time_Performance   0x0004   128   128   020    Old_age   Offline      -       18
  9 Power_On_Hours          0x0012   100   100   000    Old_age   Always       -       1077
 10 Spin_Retry_Count        0x0012   100   100   060    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       3
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       215
193 Load_Cycle_Count        0x0012   100   100   000    Old_age   Always       -       215
194 Temperature_Celsius     0x0002   142   142   000    Old_age   Always       -       42 (Min/Max 25/67)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0022   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0008   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x000a   200   200   000    Old_age   Always       -       0

SMART Error Log Version: 1
ATA Error Count: 5
    CR = Command Register (HEX)
    FR = Features Register (HEX)
    SC = Sector Count Register (HEX)
    SN = Sector Number Register (HEX)
    CL = Cylinder Low Register (HEX)
    CH = Cylinder High Register (HEX)
    DH = Device/Head Register (HEX)
    DC = Device Command Register (HEX)
    ER = Error register (HEX)
    ST = Status register (HEX)
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.

Error 5 occurred at disk power-on lifetime: 1050 hours (43 days + 18 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 41 00 00 00 00 00  Error: UNC at LBA = 0x00000000 = 0

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 b8 10 08 3a 0f 40 08  15d+21:45:25.729  READ FPDMA QUEUED
  60 80 38 b8 60 0f 40 08  15d+21:45:18.777  READ FPDMA QUEUED
  60 b8 30 f8 58 0f 40 08  15d+21:45:18.775  READ FPDMA QUEUED
  60 b8 28 40 51 0f 40 08  15d+21:45:18.775  READ FPDMA QUEUED
  60 b8 20 80 49 0f 40 08  15d+21:45:15.608  READ FPDMA QUEUED

Error 4 occurred at disk power-on lifetime: 1050 hours (43 days + 18 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 41 00 00 00 00 00  Error: UNC at LBA = 0x00000000 = 0

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 b8 28 10 d8 0e 40 08  15d+21:45:10.298  READ FPDMA QUEUED
  60 80 40 48 ef 0e 40 08  15d+21:45:03.370  READ FPDMA QUEUED
  60 b8 38 88 e7 0e 40 08  15d+21:45:03.178  READ FPDMA QUEUED
  60 b8 30 d0 df 0e 40 08  15d+21:45:00.444  READ FPDMA QUEUED
  60 20 20 f0 d3 0e 40 08  15d+21:45:00.286  READ FPDMA QUEUED

Error 3 occurred at disk power-on lifetime: 1050 hours (43 days + 18 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 41 00 00 00 00 00  Error: UNC at LBA = 0x00000000 = 0

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 b8 00 90 81 23 40 08  15d+21:41:08.578  READ FPDMA QUEUED
  60 80 10 08 91 23 40 08  15d+21:41:08.336  READ FPDMA QUEUED
  60 b8 08 48 89 23 40 08  15d+21:41:01.627  READ FPDMA QUEUED
  60 b8 f8 d0 79 23 40 08  15d+21:40:57.546  READ FPDMA QUEUED
  60 b8 f0 18 72 23 40 08  15d+21:40:56.899  READ FPDMA QUEUED

Error 2 occurred at disk power-on lifetime: 1050 hours (43 days + 18 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 41 00 00 00 00 00  Error: UNC at LBA = 0x00000000 = 0

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 b8 18 f0 d5 17 40 08  15d+21:34:13.263  READ FPDMA QUEUED
  60 20 50 10 0c 18 40 08  15d+21:34:06.288  READ FPDMA QUEUED
  60 b8 48 58 04 18 40 08  15d+21:34:06.288  READ FPDMA QUEUED
  60 b8 40 98 fc 17 40 08  15d+21:34:06.288  READ FPDMA QUEUED
  60 b8 38 e0 f4 17 40 08  15d+21:34:06.288  READ FPDMA QUEUED

Error 1 occurred at disk power-on lifetime: 1050 hours (43 days + 18 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 41 00 00 00 00 00  Error: UNC at LBA = 0x00000000 = 0

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 b8 50 28 8b 17 40 08  15d+21:33:33.959  READ FPDMA QUEUED
  60 b8 48 70 83 17 40 08  15d+21:33:16.648  READ FPDMA QUEUED
  60 80 40 e8 82 17 40 08  15d+21:33:16.647  READ FPDMA QUEUED
  ea 00 00 00 00 00 40 08  15d+21:33:16.640  FLUSH CACHE EXT
  61 08 30 f0 fd 3f 40 08  15d+21:33:16.638  WRITE FPDMA QUEUED

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%      1072         -
# 2  Short offline       Completed without error       00%      1023         -
# 3  Extended offline    Completed without error       00%       946         -
# 4  Short offline       Completed without error       00%       855         -
# 5  Short offline       Completed without error       00%       687         -
# 6  Extended offline    Completed without error       00%       610         -
# 7  Short offline       Completed without error       00%       519         -
# 8  Short offline       Completed without error       00%       279         -
# 9  Extended offline    Completed without error       00%       202         -
#10  Short offline       Completed without error       00%       111         -
#11  Short offline       Completed without error       00%        11         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

In the first place I though I might have bought a defective disk. I would have expected SMART to fail assessment. However, this is not the case. I don’t think it’s a defective PSU, because it’s not even one year old. Also, it’s a 550 Watts PSU and the machine consumes about 100 Watts. I don’t think it’s a defective cable, either, because I was running other disks for almost a year without problems. Also, with these other discs I actually had a defective cable, which I replaced, and the observations were different.

I am considering to RMA the drive, although I am not sure if it qualifies for an RMA. What do you think? May that be a transient error? Any advice is appreciated.

How to find Windows environment variables from hard drive without booting?

How can I find what the PATH variable on Windows 10 was on a backup “image” of an old system hard drive?

I returned my computer to field support, they “backed it up”, restored it to a new system, sent me the new system and nuked the old system.

When I asked about getting missing stuff off the old system, they said the only option is to see if I can find what’s missing on the backup image which they keep for seven days.

I’m missing my PATH and environment variables.

Unfortunately, restoring the system (not sure what their process was – I know that they re-installed some apps, so it wasn’t a system mirror) didn’t restore my environment variables and PATH.

I know that simply having the old PATH (and other environement variables as well) won’t necessarily “fix” any problems on the new machine.

But, for example, I spent a lot of time setting up my Python environment, and I have no idea what the Python environment variables even were that I used, much less what they were set to (there are several Python instances on the “restored” hard drive).

I have access to the back up that field service made of my boot drive.

Back in the “old” days, I’d just copy the AUTOEXEC.BAT and CONFIG.SYS files. Those haven’t been around (AFAIK) for a long time.

How can I find what the PATH and other environment variables WERE in the backup of the old system that I can no longer boot or use (since it and its hard drive are gone)?

I welcome pointers to other posts. I know Google is my friend, but not today. 99.9% of everything I’ve found is “how do I set my PATH variable”, and so on.

Thank you!

Jim

(P.S. I just dumped all my environment variables to a file I named CONFIG.SYS so I never have to consult the answer to this question again)

hard drive – Mac Mini won’t restart after erased with Find My app

I recently had to erase my Mac Mini (bought in 2019) using the Find My app on my iPhone.

After I did, I switched the Mac Mini on and tried to install the OS on it. However, when prompted to choose a start-up disk, I had no disk available. There seemed to be no way out of it, so I turned the Mac off and back on and since then it displays nothing on the screen: no flashing folder with a question mark, no startup menu, nothing.

I have tried the following (from here) (with an Apple keyboard plugged in):

  • Leaving the Mac unplugged for 24h hours and trying again
  • Booting with Cmd R
  • Booting with Option
  • Booting with Option Cmd P R
  • Booting with Shift
  • Booting with D
  • Booting with Option D (Ethernet cable connected)

None of this showed anything in the monitor (it just goes to sleep mode after a while) except for Option-Cmd-P-R (resetting the NVRAM) which showed the Apple logo and then the flashing folder with the question mark.

This is driving me crazy since I just erased the Mac using Apple’s app and now Apple wants to charge me for a repair.

Can anyone suggest anything else I can try before sending it for repair?

Thank you

complexity theory – Does having a similar constraint while reducing a problem to similar problem to prove np hard means they are same?

I have been trying to find the computational complexity of my optimization problem and found that it is Np-Hard. To prove it to Np-Hard, I try reducing it Nurse Scheduling Problem. I am quite confused with the idea during the reduction. Does having a similar constraint in my problem and NSP means that both problems are the same and have a solution already?

My problem:
We have a set of classes, and each class has a set of timing associated with a penalty. We have hard and soft constraints where every soft constraint violation. We have to schedule classes to timing such that the sum of all penalties is reduced.

We just have a hard constraint stating: Two classes cannot be scheduled at the same time of day and week (overlap constraints).

Here is the link to the nurse scheduling problem: Nurse Scheduling problem and they have a constraint stating: Two nurses dislike each other and thus cannot work on the same shift because of that.

I have to question:

Does this make my problem the same as the NSP problem?

Does my approach of reduction to NP-HARD is wrong? If yes, where did I go wrong? Is there any similar problem that I can use for reduction?

Can someone please help me with this?

hard drive – Windows Disk Cluster for Hyper-V Failover Cluster

Looking for design assistance.

Typically, I use a 2 node SAN disk cluster running CentOS and DRBD for high availability. I will then connect the hypervisor(s) via iSCSI; sometimes KVM/QEMU, sometimes Hyper-V Failover Cluster.

I am trying to translate this to a fully Microsoft solution. In total I have 5 physical servers; 3 for the Failover Cluster, and 2 for the Disk Cluster. Each server has 4 NICs, but I don’t want to confuse the issue right now with NIC Teaming or anything like that.

At first, I started making a “Disk Cluster” using the 2 servers running Windows Server 2019 and Scale-Out File Services (SOFS). Each server has 2 local disks; one for the OS, and the other (I was thinking) to be made available as storage for the Failover Cluster. I have read a few articles, and watched a few videos, but I think I am missing something. I cannot add disks to the SOFS, because there are none to add.

I do not have the budget for Windows Server 2019 Datacenter, so I cannot use Storage Spaces Direct.

Does anyone have any advise or articles to share for this kind of build? I hope I am explaining myself properly.

Thanks for any assistance.

hard drive – Linux disk full, ncdu and du can’t find what’s using the space. What else can I try?

The output of df -h is

Filesystem      Size  Used Avail Use% Mounted on
/dev/root        30G   27G  1.1G  97% /
devtmpfs        1.8G     0  1.8G   0% /dev
tmpfs           1.9G  8.0K  1.9G   1% /dev/shm
tmpfs           1.9G  9.4M  1.9G   1% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/mmcblk0p1  253M   54M  199M  22% /boot
/dev/sda1       1.9T  1.7T  218G  89% /share
tmpfs           383M     0  383M   0% /run/user/1000

But if I use ncdu on / (also using --exclude /share), I get

ncdu 1.13 ~ Use the arrow keys to navigate, press ? for help
--- / ------------------------------------------------------------------------------------------------------------------
    1.7 GiB (##########) /var                                                                                               1.5 GiB (######### ) /usr
  419.8 MiB (##        ) /home
  353.8 MiB (##        ) /lib
  263.0 MiB (#         ) /opt
   53.8 MiB (          ) /boot
   52.5 MiB (          ) /root
    9.4 MiB (          ) /run
    9.3 MiB (          ) /bin
    8.7 MiB (          ) /sbin
    6.0 MiB (          ) /etc
   36.0 KiB (          ) /tmp
e  16.0 KiB (          ) /lost+found
    8.0 KiB (          ) /dev
e   4.0 KiB (          ) /srv
e   4.0 KiB (          ) /mnt
e   4.0 KiB (          ) /media
    0.0   B (          ) /sys
.   0.0   B (          ) /proc
<   0.0   B (          )  share

Using du -d 1 -h from / gives me this result. Not sure if there’s anything out of the ordinary here

1.7T    ./share
8.0K    ./dev
9.4M    ./bin
16K     ./lost+found
4.0K    ./media
264M    ./opt
354M    ./lib
6.0M    ./etc
4.0K    ./mnt
1.6G    ./usr
420M    ./home
4.0K    ./srv
9.4M    ./run
54M     ./boot
36K     ./tmp
53M     ./root
1.7G    ./var
8.8M    ./sbin
du: cannot access './proc/1693/task/1693/fd/3': No such file or directory
du: cannot access './proc/1693/task/1693/fdinfo/3': No such file or directory
du: cannot access './proc/1693/fd/4': No such file or directory
du: cannot access './proc/1693/fdinfo/4': No such file or directory
0       ./proc
0       ./sys
1.7T    .

and lsof | grep deleted returns nothing.
What further action can I take to find this missing space?

hard drive – When a PCB fails, why does the ROM chip have to be transferred to donor PCB?

In the context of a failed hard disk (HDD) printed-circuit board (PCB). It is commonly asserted that swapping a failed PCB with an identical replacement (or donor) PCB will not work. The common reason given is that ROM contains unique “adaptives” which have written to the drive during its lifetime.

However, and maybe I’m misunderstanding this, but how does adaptive data get written to the ROM chip if its “Read-Only Memory”?