[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: LMDB use of sparse or non-sparse data file




On 26/03/2015 7:20 AM, Quanah Gibson-Mount wrote:
> --On Wednesday, March 25, 2015 5:11 PM +1100 Geoff Swan
> <gswan3@bigpond.net.au> wrote:
>
>>> Question is irrelevant since both are sparse files.
>> Thanks for the clarification Howard.
>> The data file from the mdb_copy snapshot was transferred over the
>> network to the other server using scp, which I understand does not
>> recognise sparse files, so the copy is likely to be non-sparse. I guess
>> this would be considered a corruption and best to start with a fresh
>> copy?
>
> I've had no issue scp'ing files created from mdb_copy.
That is interesting.
It's good to know that there is no problem with that.
I'll try rebuilding the db file from slapcat/slapadd.
I don't know why an scp'd mdb_copy file did not work as intended.

>
> Original host:
>
> zimbra@zre-ldap002:~/data/ldap/mdb/db$ ls -l
> total 432
> -rw------- 1 zimbra zimbra 85899345920 Mar 25 14:53 data.mdb
> -rw------- 1 zimbra zimbra        8192 Mar 25 14:54 lock.mdb
> zimbra@zre-ldap002:~/data/ldap/mdb/db$ mkdir /tmp/mdb/
> zimbra@zre-ldap002:~/data/ldap/mdb/db$ mdb_copy . /tmp/mdb
> zimbra@zre-ldap002:~/data/ldap/mdb/db$ ls -l /tmp/mdb/
> total 428
> -rw-r--r-- 1 zimbra zimbra 438272 Mar 25 14:54 data.mdb
>
> Destination host:
>
> [build@zre-ldap003
> zcs-NETWORK-8.7.0_BETA1_1149.RHEL6_64.20150324181030]$ scp
> build@zre-ldap002:/tmp/mdb/data.mdb /tmp/mdb.002/
> data.mdb 100%  428KB 428.0KB/s   00:00
> [build@zre-ldap003
> zcs-NETWORK-8.7.0_BETA1_1149.RHEL6_64.20150324181030]$ su
> Password:
> [root@zre-ldap003
> zcs-NETWORK-8.7.0_BETA1_1149.RHEL6_64.20150324181030]# chmod a+rx
> /tmp/mdb.002
> [root@zre-ldap003
> zcs-NETWORK-8.7.0_BETA1_1149.RHEL6_64.20150324181030]# chmod a+r
> /tmp/mdb.002/data.mdb
> [root@zre-ldap003
> zcs-NETWORK-8.7.0_BETA1_1149.RHEL6_64.20150324181030]# su - zimbra
> [zimbra@zre-ldap003 ~]$ cd data/ldap/mdb
> [zimbra@zre-ldap003 mdb]$ ls
> db.orig
> [zimbra@zre-ldap003 mdb]$ mkdir db
> [zimbra@zre-ldap003 mdb]$ ls
> db  db.orig
> [zimbra@zre-ldap003 mdb]$ cd db
> [zimbra@zre-ldap003 db]$ cp /tmp/mdb.002/data.mdb .
> [zimbra@zre-ldap003 db]$ ls -l
> total 428
> -rw-r-----. 1 zimbra zimbra 438272 Mar 25 14:57 data.mdb
> [zimbra@zre-ldap003 db]$ ldap start
> Started slapd: pid 32518
> [zimbra@zre-ldap003 db]$ ls -l
> total 432
> -rw-r-----. 1 zimbra zimbra 85899345920 Mar 25 14:57 data.mdb
> -rw-------. 1 zimbra zimbra        8192 Mar 25 14:57 lock.mdb
>
>
>
> --Quanah
>
>
>
> -- 
>
> Quanah Gibson-Mount
> Platform Architect
> Zimbra, Inc.
> --------------------
> Zimbra ::  the leader in open source messaging and collaboration