sul-dlss / purl-fetcher

An HTTP API for querying and updating PURLs
0 stars 1 forks source link

Hardlinks not being written in new versioned layout #922

Closed andrewjbtw closed 2 months ago

andrewjbtw commented 2 months ago

The new versioned layout for shelving was deployed this morning. Files are supposed to be written to both the old layout (the Stacks approach up until now) and the new layout, with hardlinks between the content files in both layouts.

It looks like files are only being written to the new layout, with no hardlinks to the content files in order to main compatibility with the earlier Stacks layout. The result is that items in the new layout cannot be viewed.

Example: https://argo.stanford.edu/view/druid:tz668mh0034

On Stacks:

.
└── tz668mh0034
    ├── content
    │   ├── 8a6b24a2250c7e56b324d423a9bfb01f
    │   ├── b4aa682b7f454a7e87cc9b8c9fb6b0b4
    │   └── bb5f9549c33a527f72aef025793daa85
    └── versions
        ├── cocina.1.json
        ├── cocina.json
        ├── meta.json
        ├── public.1.xml
        ├── public.xml
        └── versions.json

The count of links using ls indicate there are no hardlinks from the content files:

/stacks/tz/668/mh/0034$ ls -lRh
.:
total 0
drwxrwxr-x 1 stacks stacks 0 Aug 27 13:58 tz668mh0034

./tz668mh0034:
total 0
drwxrwxr-x 1 stacks stacks 0 Aug 27 13:58 content
drwxrwxr-x 1 stacks stacks 0 Aug 27 13:58 versions

./tz668mh0034/content:
total 51M
-rw-rw-r-- 1 stacks stacks  45M Aug 27 13:58 8a6b24a2250c7e56b324d423a9bfb01f
-rw-r--r-- 1 stacks stacks 3.8M Aug 27 13:58 b4aa682b7f454a7e87cc9b8c9fb6b0b4
-rw-r--r-- 1 stacks stacks 2.8M Aug 27 13:58 bb5f9549c33a527f72aef025793daa85

./tz668mh0034/versions:
total 32K
-rw-rw-r-- 2 stacks stacks 4.0K Aug 27 13:58 cocina.1.json
-rw-rw-r-- 2 stacks stacks 4.0K Aug 27 13:58 cocina.json
-rw-rw-r-- 1 stacks stacks   74 Aug 27 13:58 meta.json
-rw-rw-r-- 2 stacks stacks 5.1K Aug 27 13:58 public.1.xml
-rw-rw-r-- 2 stacks stacks 5.1K Aug 27 13:58 public.xml
-rw-rw-r-- 1 stacks stacks  103 Aug 27 13:58 versions.json
andrewjbtw commented 2 months ago

Looks like some items are being written as expected:

[username]@sul-stacks-prod-a:/stacks/ry/403/xx/7323$ ls -lRh
.:
total 30M
drwxrwxr-x 1 stacks stacks   0 Aug 27 10:50  ry403xx7323
-rw-rw-r-- 2 stacks stacks 30M Aug 27 10:50 'Xue Yang thesis-augmented.pdf'

./ry403xx7323:
total 0
drwxrwxr-x 1 stacks stacks 0 Aug 27 10:50 content
drwxrwxr-x 1 stacks stacks 0 Aug 27 10:50 versions

./ry403xx7323/content:
total 30M
-rw-rw-r-- 2 stacks stacks 30M Aug 27 10:50 2ce7c9e1404dab58a967e77c8c7ff5fb

./ry403xx7323/versions:
total 72K
-rw-rw-r-- 2 stacks stacks 15K Aug 27 10:50 cocina.1.json
-rw-rw-r-- 2 stacks stacks 15K Aug 27 10:50 cocina.json
-rw-rw-r-- 1 stacks stacks  73 Aug 27 10:50 meta.json
-rw-rw-r-- 2 stacks stacks 14K Aug 27 10:50 public.1.xml
-rw-rw-r-- 2 stacks stacks 14K Aug 27 10:50 public.xml
-rw-rw-r-- 1 stacks stacks 103 Aug 27 10:50 versions.json