dkirkby / bossdata

Tools for accessing SDSS BOSS data
MIT License
1 stars 3 forks source link

Can't create sql db on systems where with no user write permission in data directory #115

Open dmargala opened 8 years ago

dmargala commented 8 years ago

I encountered this problem trying to use bossdata on riemann. The data is there so I want to avoid having to unnecessarily download anything.

The configuration is a little tricky because, on riemann, the redux and data directories are stored on separate directory paths. I used symlinks to work around this:

mkdir -p /data/dmargala/sas/dr12/boss/spectro
ln -s /clusterfs/riemann/raid006/bosswork/boss/spectro/data /data/dmargala/sas/dr12/boss/spectro/
ln -s /clusterfs/riemann/raid006/bosswork/boss/spectro/redux /data/dmargala/sas/dr12/boss/spectro/

And then configured my environment using:

export BOSS_LOCAL_ROOT=/data/dmargala
export BOSS_SAS_PATH=/sas/dr12/boss
export BOSS_REDUX_VERSION=v5_7_0

The speclog product is also available on riemann:

setup speclog
export BOSS_SPECLOG=$SPECLOG_DIR

My initial idea is to add another env var that specifies a directory for bossdata to write to. The directory would sit between BOSS_LOCAL_ROOT and BOSS_SAS_PATH so that the structure would still mirror the sas directory layout.

export BOSS_META_DIR=bossmeta
mkdir -p /data/dmargala/bossmeta/sas/dr12/boss/spectro/redux/v5_7_0
dkirkby commented 8 years ago

Have you looked at issue #109 and PR #110 yet ? :-)

dmargala commented 8 years ago

Cool! I did not see those yet. I did wonder if you encountered this issue while working on utah. My fix is more like a bandaid. I wanted to get something that worked asap.