Re: [cifs-discuss] idmap fails to start with SMF - error creating database /var/idmap/idmap.db
If you set the start method of the idmap service to this: dtrace -w -n 'proc:::start/execname == idmapd/{stop(); system(truss -o /tmp/idmapd-truss -v all -t all -fp %d, pid);}' -c /usr/lib/idmapd You'll get a truss without interfering with the workings of SMF in the least. Send that to Jordan, unless the issue becomes obvious, in which case just let all of us know what the issue was (I'm curious!). Nico -- ___ cifs-discuss mailing list cifs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/cifs-discuss
Re: [cifs-discuss] idmap fails to start with SMF - error creating database /var/idmap/idmap.db
You'll get a truss without interfering with the workings of SMF in the least. Send that to Jordan, unless the issue becomes obvious, in which case just let all of us know what the issue was (I'm curious!). Yes, I will do that. I think I test it out tomorrow, today I have to grow a tunnel, that my users can work laid-back and let the admin satisfied. I will report. Thanks and regards, .marc ___ cifs-discuss mailing list cifs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/cifs-discuss
Re: [cifs-discuss] idmap fails to start with SMF - error creating database /var/idmap/idmap.db
On Mon, Mar 28, 2011 at 2:38 PM, Marc Steinlein m...@contact.de wrote: I wasn't referring to permissions, but to /var being mounted read-only. You're using 151a, so /var shouldn't be mounted read-only (you must be using ZFS root, and ZFS starts with / and /var mounted read-write). Do you have a separate /var from /? Are there customizations on your system that might cause a separate /var to be mounted read-only for a while at boot time? No, sorry, there are (AFAIK) no settings in my system, which seperate /var from /, or mount /var read-only at boot-time. root@tom:/test2# df /var Filesystem 1K-blocks Used Available Use% Mounted on rpool/ROOT/solaris-1 253256991 2905580 250351411 2% / I have no idea, which setting can enforce /var to mount read-only at system boot. There's no reason that I can think of for why this is failing for you at boot time -- yes, a read-only / or /var would do it, but that can't be happening here. Hopefully someone from Oracle can look into this. If you're a paying customer then you know what to do :) and if not, well, we'll see. Nico -- ___ cifs-discuss mailing list cifs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/cifs-discuss
Re: [cifs-discuss] idmap fails to start with SMF - error creating database /var/idmap/idmap.db
Speaking as the Oracle person that Nico is obliquely referring to... :-) I've never seen such a symptom. (Well, I saw something similar when our test suite damaged the databases, but that's presumably not happening here.) Does it fail only on boot, or also on svcadm restart idmap? (Or, if it's already failed and is in maintenance state, svcadm clear idmap?) Like Nico said, if you're a paying customer please open a support case. Other than that, what I would do is to try to collect a truss of idmapd running. Unfortunately, it's not convenient to get a truss of a service from its start. If it fails on restart (and not just on boot), what I'd probably try is to move idmapd out of the way, replace it with a shell script that sleeps before starting idmapd, and then truss -f it. I would also collect the state of the relevant files. Something like: # mv /usr/lib/idmapd /usr/lib/idmapd.real # cat /usr/lib/idmapd #! /bin/sh ls -ld /var/idmap /var/idmap/idmap.db /var/tmp/idmapd.ls 21 sleep 60 exec /usr/lib/idmapd.real $@ ^D # chmod 755 /usr/lib/idmapd and then # svcadm restart idmap # ps -ef | grep idmapd [ find the shell script (not the sleep) and remember its pid ] # truss -f -o /var/tmp/idmapd.truss -p $shellscriptpid and send me the resulting /var/tmp/idmapd.truss and /var/tmp/idmapd.ls. Notes: as written above, you have only a minute to track down the pid and start the truss. Of course I don't really mean for you to type $shellscriptpid; I want you to type the pid you found. ___ cifs-discuss mailing list cifs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/cifs-discuss
Re: [cifs-discuss] idmap fails to start with SMF - error creating database /var/idmap/idmap.db
On Tue, Mar 29, 2011 at 12:10 PM, Jordan Brown jordan.br...@oracle.com wrote: Speaking as the Oracle person that Nico is obliquely referring to... :-) :) Other than that, what I would do is to try to collect a truss of idmapd running. Unfortunately, it's not convenient to get a truss of a service from its start. If it fails on restart (and not just on boot), what I'd probably try is to move idmapd out of the way, replace it with a shell script that sleeps before starting idmapd, and then truss -f it. I would also collect the state of the relevant files. Something like: Much simpler: just change the start method of the service! # svccfg -s idmap svc:/system/idmap listprop start start method start/exec astring /usr/lib/idmapd start/timeout_seconds count60 start/type astring method svc:/system/idmap setprop start/exec = truss -o /tmp/t -v all -t all -f /usr/lib/idmapd svc:/system/idmap ^D # svcadm refresh idmap reboot (Remember, this only happens on reboot, according to Marc). Nico -- ___ cifs-discuss mailing list cifs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/cifs-discuss
Re: [cifs-discuss] idmap fails to start with SMF - error creating database /var/idmap/idmap.db
On 03/29/11 10:33, Nico Williams wrote: start/type astring method svc:/system/idmap setprop start/exec = truss -o /tmp/t -v all -t all -f /usr/lib/idmapd In this particular case, maybe. In general, no. Remember that SMF expects the start method to exit when the service is ready, and that truss -f won't exit until the last child exits. I thought about mentioning that approach and its problems, but decided to keep it simpler... ___ cifs-discuss mailing list cifs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/cifs-discuss
Re: [cifs-discuss] idmap fails to start with SMF - error creating database /var/idmap/idmap.db
True that. Nico -- ___ cifs-discuss mailing list cifs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/cifs-discuss
Re: [cifs-discuss] idmap fails to start with SMF - error creating database /var/idmap/idmap.db
Speaking as the Oracle person that Nico is obliquely referring to... :-) Hehe, we called the miracle loud and insistent, and the miracle answered Well, here I speaking as the oracle person Nice! ;-) Other than that, what I would do is to try to collect a truss of idmapd running. Unfortunately, it's not convenient to get a truss of a service from its start. If it fails on restart (and not just on boot), what I'd probably try is to move idmapd out of the way, replace it with a shell script that sleeps before starting idmapd, and then truss -f it. I would also collect the state of the relevant files. Something like: Thanks for your detailed analysis of my problem. I will try to realise your ideas. Much simpler: just change the start method of the service! # svccfg -s idmap svc:/system/idmap listprop start start method start/exec astring /usr/lib/idmapd start/timeout_seconds count60 start/type astring method svc:/system/idmap setprop start/exec = truss -o /tmp/t -v all -t all -f /usr/lib/idmapd svc:/system/idmap ^D # svcadm refresh idmap reboot (Remember, this only happens on reboot, according to Marc). As I can say, the service will always change to maintenance mode, on system boot, and when I restart and clear the service at the running system. It falls everytime to this state, only when I run the service manually with /usr/lib/idmap -d than it runs as espected. To gain more time, I have installed a second system for my users to serve smb, cifs and nfs/nis functionalities, so I can examine the problem without the loaded revolver back of my head. I will play with your ideas tomorrow, at this point i will say thank you for your time and your insertion with my problems. Regards, .marc ___ cifs-discuss mailing list cifs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/cifs-discuss
Re: [cifs-discuss] idmap fails to start with SMF - error creating database /var/idmap/idmap.db
On Sun, Mar 27, 2011 at 4:28 AM, Marc Steinlein m...@contact.de wrote: The log says, that the daemon can't create the database /var/idmap/idmap.db. Well, when i search for this error, i found older threads from 2008 about this behavior, and they commend to disable the service, remove /var/idmap/idmap.db and /var/run/idmap/idmap.db and restart the idmap service. Do not confuse /var/idmap/... with /var/run/idmap/... The first is on persistent storage, the other is on tmpfs. In this case you say the log mentions /var/idmap/idmap.db -- removing /var/run/idmap/idmap.db isn't going to help. See below. But, that change nothing on my system. Right. When I run the idmapd manually with '/usr/lib/idmapd -d', the service runs perfectly. Only when I try to start the service with SMF, then it fails. That's clue number two, and a very good clue. This is the output from /var/svc/log/system-idmap\:default.log: [ Mar 26 15:40:54 Enabled. ] [ Mar 26 15:40:54 Executing start method (/usr/lib/idmapd). ] [...] Error creating database /var/idmap/idmap.db (malformed database schema - unable to open a temporary database file for storing temporary tables) This is clue number three. This error comes from SQLite2, and it indicates that the library was unable to create a temporary file in that same directory (IIUC). Note that the real problem is the inability to create a file, not anything to do with the database itself being corrupted -- the error seems a bit misleading. Was /var/idmap read-only at the time that the idmap service started? What build of Solaris are you running? Nico -- ___ cifs-discuss mailing list cifs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/cifs-discuss
Re: [cifs-discuss] idmap fails to start with SMF - error creating database /var/idmap/idmap.db
Hello Nico, thanks for your effort. Do not confuse /var/idmap/... with /var/run/idmap/... The first is on persistent storage, the other is on tmpfs. In this case you say the log mentions /var/idmap/idmap.db -- removing /var/run/idmap/idmap.db isn't going to help. See below. Okay. This is clue number three. This error comes from SQLite2, and it indicates that the library was unable to create a temporary file in that same directory (IIUC). Note that the real problem is the inability to create a file, not anything to do with the database itself being corrupted -- the error seems a bit misleading. Was /var/idmap read-only at the time that the idmap service started? Thanks. I don't realize, that the problems comes from SQLite, and not from the idmap daemon. I don't know if the idmap service was unable to write to /var/idmap because of an read-only directory. As I can see, when I try to start the daemon, the directory ist writeable. I have temporarily changed the permissions to 777, but this change nothing. What build of Solaris are you running? -bash-4.0$ uname -a SunOS tom 5.11 snv_151a i86pc i386 i86pc Regards, Marc ___ cifs-discuss mailing list cifs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/cifs-discuss