Some questions re collection on Network Share

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Some questions re collection on Network Share

Chris Green
I keep my Digikam images on my desktop machine in /home/chris/pictures.

I have exported /home/chris/pictures as an NFS share so that I can see
the pictures on my laptop too.  If I run Digikam on my laptop and
specify the NFS /home/chris/pictures directory (wherever it's mounted
on the laptop) as a "Collection on a Network Share" will the laptop's
Digikam use the same database as the desktop one?

At present the laptop seems to be re-scanning all the pictures in
/home/chris/pictures and that's not what I want really, it will take a
*very* long time and it's pointless anyway as the work has already
been done by my desktop and put into the Digikam database.  Can't I
tell the laptop to se the already existing database file?

--
Chris Green
·

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Some questions re collection on Network Share

Andrew Goodbody
Three things.

1) You should not attempt to use a sqlite database over a network.
2) Mysql support is experimental although bugs are being fixed and there
are people using it without issue, AFAIK, so it may work for you, YMMV.
3) The path of the root of the collection and possibly UUID of the HDD
in question are stored in the database. This can make digikam treat
images as different when accessed from different machines. There is a
workaround for this if you don't mind a bit of manual manipulation of
the database entry in question.

Andrew

On 08/02/15 11:43, [hidden email] wrote:

> I keep my Digikam images on my desktop machine in /home/chris/pictures.
>
> I have exported /home/chris/pictures as an NFS share so that I can see
> the pictures on my laptop too.  If I run Digikam on my laptop and
> specify the NFS /home/chris/pictures directory (wherever it's mounted
> on the laptop) as a "Collection on a Network Share" will the laptop's
> Digikam use the same database as the desktop one?
>
> At present the laptop seems to be re-scanning all the pictures in
> /home/chris/pictures and that's not what I want really, it will take a
> *very* long time and it's pointless anyway as the work has already
> been done by my desktop and put into the Digikam database.  Can't I
> tell the laptop to se the already existing database file?
>
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Some questions re collection on Network Share

Chris Green
Andrew Goodbody <[hidden email]> wrote:

> On 08/02/15 11:43, [hidden email] wrote:
> > I keep my Digikam images on my desktop machine in /home/chris/pictures.
> >
> > I have exported /home/chris/pictures as an NFS share so that I can see
> > the pictures on my laptop too.  If I run Digikam on my laptop and
> > specify the NFS /home/chris/pictures directory (wherever it's mounted
> > on the laptop) as a "Collection on a Network Share" will the laptop's
> > Digikam use the same database as the desktop one?
> >
> > At present the laptop seems to be re-scanning all the pictures in
> > /home/chris/pictures and that's not what I want really, it will take a
> > *very* long time and it's pointless anyway as the work has already
> > been done by my desktop and put into the Digikam database.  Can't I
> > tell the laptop to se the already existing database file?
> >
> Three things.
>
> 1) You should not attempt to use a sqlite database over a network.

Well that's not what the documentation says now.  It just says you
*can* do it.

Plus, I'm the only user and I'm not going to use digikam from two
places at the same time so it should actually be OK.


> 2) Mysql support is experimental although bugs are being fixed and there
> are people using it without issue, AFAIK, so it may work for you, YMMV.

I could run a mysql database but it seems a little OTT for what I
actually want to do.


> 3) The path of the root of the collection and possibly UUID of the HDD
> in question are stored in the database. This can make digikam treat
> images as different when accessed from different machines. There is a
> workaround for this if you don't mind a bit of manual manipulation of
> the database entry in question.
>
They should be the same, same disk drive, same directory structure.

Surely it's not an unusual requirement, allow manipulation of the same
hierarchy of pictures from more than one place.

--
Chris Green
·

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Some questions re collection on Network Share

Simon Cropper-3
In reply to this post by Chris Green
On 08/02/15 22:43, [hidden email] wrote:

> I keep my Digikam images on my desktop machine in /home/chris/pictures.
>
> I have exported /home/chris/pictures as an NFS share so that I can see
> the pictures on my laptop too.  If I run Digikam on my laptop and
> specify the NFS /home/chris/pictures directory (wherever it's mounted
> on the laptop) as a "Collection on a Network Share" will the laptop's
> Digikam use the same database as the desktop one?
>
> At present the laptop seems to be re-scanning all the pictures in
> /home/chris/pictures and that's not what I want really, it will take a
> *very* long time and it's pointless anyway as the work has already
> been done by my desktop and put into the Digikam database.  Can't I
> tell the laptop to se the already existing database file?
>

What operating system are you using? It is hard to provide hints at a
solution unless you have all the information.

ASSUMING all systems are linux you can solve the problem by mounting the
NFS share in an identical directory structure so Digikam does not detect
the images have been moved and starts rescanning. I can't remember if
the computer where the images resides is also stored in the sqlite
database. If you find this does not work move the database to a distinct
storage medium with a unique name and mount this to your desktop and
laptop: this is the equivalent of having them on a NAS or MemoryStick.

--
Cheers Simon

    Simon Cropper - Open Content Creator

    Free and Open Source Software Workflow Guides
    ------------------------------------------------------------
    Introduction               http://www.fossworkflowguides.com
    GIS Packages           http://www.fossworkflowguides.com/gis
    bash / Python    http://www.fossworkflowguides.com/scripting
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Some questions re collection on Network Share

Chris Green
Simon Cropper <[hidden email]> wrote:

> On 08/02/15 22:43, [hidden email] wrote:
> > I keep my Digikam images on my desktop machine in /home/chris/pictures.
> >
> > I have exported /home/chris/pictures as an NFS share so that I can see
> > the pictures on my laptop too.  If I run Digikam on my laptop and
> > specify the NFS /home/chris/pictures directory (wherever it's mounted
> > on the laptop) as a "Collection on a Network Share" will the laptop's
> > Digikam use the same database as the desktop one?
> >
> > At present the laptop seems to be re-scanning all the pictures in
> > /home/chris/pictures and that's not what I want really, it will take a
> > *very* long time and it's pointless anyway as the work has already
> > been done by my desktop and put into the Digikam database.  Can't I
> > tell the laptop to se the already existing database file?
> >
>
> What operating system are you using? It is hard to provide hints at a
> solution unless you have all the information.
>
Sorry, yes, I tend to forget that Digikam is multi-platform.

I'm running xubuntu on all my systems.


> ASSUMING all systems are linux you can solve the problem by mounting the
> NFS share in an identical directory structure so Digikam does not detect
> the images have been moved and starts rescanning.

That's what I tried but it didn't work.  I have my images in
/home/chris/pictures on my desktop machine.  I exported
/home/chris/pictures using NFS and mounted it on my laptop as
/home/chris/pictures.  When I started digikam on the laptop it sat and
tried to rescan everything which wasn't going to complete this year if
I left it to it.

On the laptop I specifically told Digikam the images were on an NFS
share, was this the right thing to do?



>                                                   I can't remember if
> the computer where the images resides is also stored in the sqlite
> database. If you find this does not work move the database to a distinct
> storage medium with a unique name and mount this to your desktop and
> laptop: this is the equivalent of having them on a NAS or MemoryStick.
>
It's now re-scanning the whole lot on my desktop!  The partial rescan
on the laptop has made it do this, so for the moment I can't really do
anything, I'll come and ask some more if I get stuck.

Thanks for the help, I didn't think I had misunderstood the
documentation, this should be possible.

--
Chris Green
·

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Some questions re collection on Network Share

Marcel Wiesweg
In reply to this post by Chris Green

As Andrew pointed out, using SQLite via a network file system is not
guaranteed to be safe as the situation regarding file locks may be somewhat
undefined. Nonetheless, if you dont put the shared file under concurrent use,
things should work.

If you have the collection as a local collection on one machine, and as a
remote collection on the other, digikam cannot know it's the same.

For a quick solution how to use simply the mount path as collection
identifier, provided there's the same mount path on all machines, see the
(undocumented, unofficial, but inofficially supported) procedure described
somewhere here:
https://bugs.kde.org/show_bug.cgi?id=175923


> I keep my Digikam images on my desktop machine in /home/chris/pictures.
>
> I have exported /home/chris/pictures as an NFS share so that I can see
> the pictures on my laptop too.  If I run Digikam on my laptop and
> specify the NFS /home/chris/pictures directory (wherever it's mounted
> on the laptop) as a "Collection on a Network Share" will the laptop's
> Digikam use the same database as the desktop one?
>
> At present the laptop seems to be re-scanning all the pictures in
> /home/chris/pictures and that's not what I want really, it will take a
> *very* long time and it's pointless anyway as the work has already
> been done by my desktop and put into the Digikam database.  Can't I
> tell the laptop to se the already existing database file?

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Some questions re collection on Network Share

Simon Cropper-3
On 10/02/15 05:05, Marcel Wiesweg wrote:

>
> As Andrew pointed out, using SQLite via a network file system is not
> guaranteed to be safe as the situation regarding file locks may be somewhat
> undefined. Nonetheless, if you dont put the shared file under concurrent use,
> things should work.
>
> If you have the collection as a local collection on one machine, and as a
> remote collection on the other, digikam cannot know it's the same.
>
> For a quick solution how to use simply the mount path as collection
> identifier, provided there's the same mount path on all machines, see the
> (undocumented, unofficial, but inofficially supported) procedure described
> somewhere here:
> https://bugs.kde.org/show_bug.cgi?id=175923
>
>
>> I keep my Digikam images on my desktop machine in /home/chris/pictures.
>>
>> I have exported /home/chris/pictures as an NFS share so that I can see
>> the pictures on my laptop too.  If I run Digikam on my laptop and
>> specify the NFS /home/chris/pictures directory (wherever it's mounted
>> on the laptop) as a "Collection on a Network Share" will the laptop's
>> Digikam use the same database as the desktop one?
>>
>> At present the laptop seems to be re-scanning all the pictures in
>> /home/chris/pictures and that's not what I want really, it will take a
>> *very* long time and it's pointless anyway as the work has already
>> been done by my desktop and put into the Digikam database.  Can't I
>> tell the laptop to se the already existing database file?
>
> _______________________________________________
> Digikam-users mailing list
> [hidden email]
> https://mail.kde.org/mailman/listinfo/digikam-users
>

I agree with Marcel. The idea is to have both machines appear like the
NFS share is actually on the same machine. Both desktop and laptop
should appear as a local repository despite one or both actually being a
network based share. The point with NFS is that the end product is an
integrated directory that software is unable *and have no need* to
distinguish from the native filesystem (except when the directory is not
mounted).

I use Ubuntu and seamlessly mount several linux (NFS exports) and
windows (CIFS/Samba Shares) machines to my local filesystem and use
rsync to sync my 'local' directories. This is a lot simpler than setting
up rsync to do this task.

--
Cheers Simon

    Simon Cropper - Open Content Creator

    Free and Open Source Software Workflow Guides
    ------------------------------------------------------------
    Introduction               http://www.fossworkflowguides.com
    GIS Packages           http://www.fossworkflowguides.com/gis
    bash / Python    http://www.fossworkflowguides.com/scripting
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Some questions re collection on Network Share

Chris Green
Simon Cropper <[hidden email]> wrote:
>
> I agree with Marcel. The idea is to have both machines appear like the
> NFS share is actually on the same machine. Both desktop and laptop
> should appear as a local repository despite one or both actually being a
> network based share. The point with NFS is that the end product is an
> integrated directory that software is unable *and have no need* to
> distinguish from the native filesystem (except when the directory is not
> mounted).
>
So are you saying I should tell Digikam in both places that the
pictures are in a local directory even if they're not (as in once case
they will be an NFS mount)?

I think the Digikam set-up for selecting where images are should be
explained better - i.e. what difference does it make when you select
NFS as opposed to local?


> I use Ubuntu and seamlessly mount several linux (NFS exports) and
> windows (CIFS/Samba Shares) machines to my local filesystem and use
> rsync to sync my 'local' directories. This is a lot simpler than setting
> up rsync to do this task.
>
Is it?   Surely using rsync the difference is just:-

    rsync -a directory1 directory2

    rsync -a machine:directory1 directory2

--
Chris Green
·

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Some questions re collection on Network Share

Simon Cropper-3
On 10/02/15 22:42, [hidden email] wrote:

> Simon Cropper <[hidden email]> wrote:
>>
>> I agree with Marcel. The idea is to have both machines appear like the
>> NFS share is actually on the same machine. Both desktop and laptop
>> should appear as a local repository despite one or both actually being a
>> network based share. The point with NFS is that the end product is an
>> integrated directory that software is unable *and have no need* to
>> distinguish from the native filesystem (except when the directory is not
>> mounted).
>>
> So are you saying I should tell Digikam in both places that the
> pictures are in a local directory even if they're not (as in once case
> they will be an NFS mount)?

Yes

> I think the Digikam set-up for selecting where images are should be
> explained better - i.e. what difference does it make when you select
> NFS as opposed to local?

That's for the development team. I am just telling you how my NFS setup
works.

>> I use Ubuntu and seamlessly mount several linux (NFS exports) and
>> windows (CIFS/Samba Shares) machines to my local filesystem and use
>> rsync to sync my 'local' directories. This is a lot simpler than setting
>> up rsync to do this task.
>>
> Is it?   Surely using rsync the difference is just:-
>
>      rsync -a directory1 directory2
>
>      rsync -a machine:directory1 directory2
>

I suppose it is all relative. Let's say I found it easier to separate
the functions.

I found using rsync with password files problematic; my backups are not
monitored so I do not want to type in my password repetatively. Mounting
remote directories when booting with fstab or on the fly with
mount+credential_files was more reliable and easier to debug *for me*.

--
Cheers Simon

    Simon Cropper - Open Content Creator

    Free and Open Source Software Workflow Guides
    ------------------------------------------------------------
    Introduction               http://www.fossworkflowguides.com
    GIS Packages           http://www.fossworkflowguides.com/gis
    bash / Python    http://www.fossworkflowguides.com/scripting
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Some questions re collection on Network Share

Chris Green
Simon Cropper <[hidden email]> wrote:
> On 10/02/15 22:42, [hidden email] wrote:
> > So are you saying I should tell Digikam in both places that the
> > pictures are in a local directory even if they're not (as in once case
> > they will be an NFS mount)?
>
> Yes
>
OK, thanks.


>
> I found using rsync with password files problematic; my backups are not
> monitored so I do not want to type in my password repetatively. Mounting
> remote directories when booting with fstab or on the fly with
> mount+credential_files was more reliable and easier to debug *for me*.
>
Yes, OK, though setting up passwordless ssh/rsync access is pretty easy.

--
Chris Green
·

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Some questions re collection on Network Share

Chris Green
In reply to this post by Simon Cropper-3
Simon Cropper <[hidden email]> wrote:

> On 10/02/15 22:42, [hidden email] wrote:
> > Simon Cropper <[hidden email]> wrote:
> >>
> >> I agree with Marcel. The idea is to have both machines appear like the
> >> NFS share is actually on the same machine. Both desktop and laptop
> >> should appear as a local repository despite one or both actually being a
> >> network based share. The point with NFS is that the end product is an
> >> integrated directory that software is unable *and have no need* to
> >> distinguish from the native filesystem (except when the directory is not
> >> mounted).
> >>
> > So are you saying I should tell Digikam in both places that the
> > pictures are in a local directory even if they're not (as in once case
> > they will be an NFS mount)?
>
> Yes
>
This doesn't work.  Digikam uses the disk's UID to identify the disk
drive when it's a local drive.  If you tell it to use a drive that's
NFS mounted it simply doesn't see the UID and regards it as a
different drive.

This brings me back to my earlier question/comment, can anyone explain
what effect the three different settings in "Collections Settings" have?
That's:-
    Local Collections
    Collections on Removable Media
    Collections on Network Shares

I.e. what does Digikam do differently if you tell it that a collection
is on, say, Removable Media as opposed to Local Collections.

--
Chris Green
·

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Some questions re collection on Network Share

Marcel Wiesweg


>
> This brings me back to my earlier question/comment, can anyone explain
> what effect the three different settings in "Collections Settings" have?
> That's:-
>     Local Collections
>     Collections on Removable Media
>     Collections on Network Shares
>
> I.e. what does Digikam do differently if you tell it that a collection
> is on, say, Removable Media as opposed to Local Collections.

There is currently no difference between removable or local media, both work
via UUID.
For network storage, digikam does not attempt to retrieve a UUID or anything
similar. The logic is simple: Directory is empty => collection not available
Directory is not empty = collection available.

Marcel
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Some questions re collection on Network Share

Chris Green
Marcel Wiesweg <[hidden email]> wrote:

>
>
> >
> > This brings me back to my earlier question/comment, can anyone explain
> > what effect the three different settings in "Collections Settings" have?
> > That's:-
> >     Local Collections
> >     Collections on Removable Media
> >     Collections on Network Shares
> >
> > I.e. what does Digikam do differently if you tell it that a collection
> > is on, say, Removable Media as opposed to Local Collections.
>
> There is currently no difference between removable or local media, both work
> via UUID.
> For network storage, digikam does not attempt to retrieve a UUID or anything
> similar. The logic is simple: Directory is empty => collection not available
> Directory is not empty = collection available.
>
So if I set my Digikam directory to 'Collections on Network Shares' on
both my laptop (where it really is a network share) and my desktop
(where it's actually a local drive) then they should both be able to
use the same images without any problem.

I may well make the databases separate on the two systems, then it can
be a really local file on the laptop.

--
Chris Green
·

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users