Re: [gentoo-user] DBI connect dbname=template1 failed Permission denied

2011-12-15 Thread Pandu Poluan
On Dec 15, 2011 12:52 PM, Joseph syscon...@gmail.com wrote:

 On 12/15/11 12:23, Pandu Poluan wrote:

  On Dec 15, 2011 10:55 AM, Joseph syscon...@gmail.com wrote:
  
   I have postgresql up and running but when I try to connect via apache
to
  postgresql I get an error:
  
   [error] [client 127.0.0.1] DBI
  connect('dbname=template1','sql-ledger',...) failed: could not connect
to
  server: Permission denied, referer: http://localhost/sql-ledger/admin.pl
  
   Anybody knows what to look for?
  
   --
   Joseph
  

  Check pg_hba.conf

  Rgds,


 I did, it is identical to my other working systems:
 local   all alltrust

 here are other details:

 # psql -p 5432 -U postgres
 psql (9.1.1)
 Type help for help.

 postgres=#
 Available PostgreSQL Slots
  9.1 *  server-9.1.1 base-9.1.1


Hmmm...

Have you GRANT the 'sql-ledger' user the CONNECT privilege to the database?

Rgds,


Re:Re: [gentoo-user] Who can tell me relationship among dri,glx,mesa,xorg?

2011-12-15 Thread Lavender
At 2011-12-15 03:24:20,Michael Schreckenbauer grim...@gmx.de wrote:
Am Mittwoch, 14. Dezember 2011, 14:22:47 schrieb Lavender:
 Now I'm totally confused, I can't find helpful information from Internet.
 I know mesa is a open source implementation of OpenGL, obviously
 mesa will afford OpenGL API. DRI is short for Direct Rendering
 Infrastructure, I have chosen options like:
 Device Drivers ---
   Graphics support ---
   *  Direct Rendering Manager ---

this is DRM. This one manages allocation of memory for video devices.

   *ATI Radeon
   [*]  Enable modesetting on radeon by default
 
 Does this mean that DRI libraries are built into kernel? 

No.

 If not, who
 contains DRI? Also who affords GLX libraries? Mesa or Xorg?

DRI is part of mesa. Mesa also provides the GLX libraries.

Best,
Michael

Thanks and  I wish you could help answer this question.Now I know Mesa provides 
DRI and GLX, when I installed xorg-server,there're also libraries named like 
libdri.so and libglx.so in /etc/X11/(somewhere).What I don't understand is, 
why Xorg-server still provides its own DRI and GLX while Mesahas done this 
already?

Re:Re: [gentoo-user] Who can tell me relationship among dri,glx,mesa,xorg?

2011-12-15 Thread Lavender
About Mesa:
http://www.mesa3d.org/intro.html



About DRI:

http://dri.freedesktop.org/wiki/





--
  Andrés Becerra Sandoval


Thanks, the web pages you provided I have already read before, these don't seem 
to provide helpful issues for my questions.

Re: [gentoo-user] Need help getting portage to email me emerge logs using ssmtp...

2011-12-15 Thread Tanstaafl

On 2011-12-14 5:09 PM, Neil Bothwick n...@digimed.co.uk wrote:

Try PORTAGE_ELOG_MAILURI=you@home /usr/sbin/sendmail


Bingo!

I guess I didn't/don't fully understand what needs to go here...

I received the message, but it comes 'from' 'portage@localhost'... 
how/where can I change this from address?


Thanks Neil!



Re: [gentoo-user] Need help getting portage to email me emerge logs using ssmtp...

2011-12-15 Thread Tanstaafl

On 2011-12-15 7:21 AM, Tanstaafl tansta...@libertytrek.org wrote:

I received the message, but it comes 'from' 'portage@localhost'...
how/where can I change this from address?


Never mind, found it:

PORTAGE_ELOG_MAILFROM=myaddress.example

Thanks again Neil!



Re: [gentoo-user] DBI connect dbname=template1 failed Permission denied

2011-12-15 Thread Joseph

On 12/15/11 16:11, Pandu Poluan wrote:

   here are other details:
  
   # psql -p 5432 -U postgres
   psql (9.1.1)
   Type help for help.
  
   postgres=#
   Available PostgreSQL Slots
   A 9.1 * A  A  A  A  A  A  A  A  A  A  A server-9.1.1 base-9.1.1
  

  Hmmm...

  Have you GRANT the 'sql-ledger' user the CONNECT privilege to the
  database?

  Rgds,


How do I check it?

--
Joseph



Re: [gentoo-user] DBI connect dbname=template1 failed Permission denied

2011-12-15 Thread Joseph

On 12/15/11 16:11, Pandu Poluan wrote:


  Hmmm...

  Have you GRANT the 'sql-ledger' user the CONNECT privilege to the
  database?

  Rgds,


After installing postgresql I run:
emerge --config =dev-db/postgresql-server-9.1.1

started postgresql-9.1
# su - postgres
postgres@syscon5 ~ $ createuser -d sql-ledger
   y
   y
exit

that was it.

# psql -U postgres -l
  List of databases
   Name|  Owner   | Encoding |   Collate   |Ctype|   Access privileges   
---+--+--+-+-+---
 postgres  | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | 
 template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres  +

   |  |  | | | 
postgres=CTc/postgres
 template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres  
+
   |  |  | | | 
postgres=CTc/postgres
--
Joseph



[gentoo-user] Error with sunrise overlay during eix-sync...

2011-12-15 Thread Tanstaafl

Anyone else getting this error?

 Reading category  41|156 ( 26%): dev-php5 .. * ERROR: 
dev-php5/pecl-oauth-1.1.0 failed (depend phase):

 *   Version of PHP required by packages in category dev-php5 unknown
 *
 * Call stack:
 * ebuild.sh, line 2051:  Called source 
'/var/lib/layman/sunrise/dev-php5/pecl-oauth/pecl-oauth-1.1.0.ebuild'

 *   pecl-oauth-1.1.0.ebuild, line   23:  Called need_php_by_category
 * depend.php.eclass, line  109:  Called die
 * The specific snippet of code:
 *  *) die Version of PHP required by packages in category 
${CATEGORY} unknown

 *
 * If you need support, post the output of 'emerge --info 
=dev-php5/pecl-oauth-1.1.0',
 * the complete build log and the output of 'emerge -pqv 
=dev-php5/pecl-oauth-1.1.0'.

 * This ebuild is from an overlay: '/var/lib/layman/sunrise/'
 * S: '/oauth-1.1.0'

Ebuild failed with status 1
 Reading category  41|156 ( 26%): dev-php5 ..

It started this morning...



Re: [gentoo-user] Error with sunrise overlay during eix-sync...

2011-12-15 Thread Matthew Finkel
On Thu, Dec 15, 2011 at 12:15 PM, Tanstaafl tansta...@libertytrek.orgwrote:

 Anyone else getting this error?

 It started this morning...


Same here. I would say it is due to a bad push, but the changelog doesn't
show any changes for months. I don't know ebuild syntax well enough to
figure out the problem at first glace, though.

-- 
Matthew Finkel


Re: [gentoo-user] Error with sunrise overlay during eix-sync...

2011-12-15 Thread Matthew Finkel
On Thu, Dec 15, 2011 at 12:48 PM, Matthew Finkel
matthew.fin...@gmail.comwrote:

 On Thu, Dec 15, 2011 at 12:15 PM, Tanstaafl tansta...@libertytrek.orgwrote:

 Anyone else getting this error?

 It started this morning...


 Same here. I would say it is due to a bad push, but the changelog doesn't
 show any changes for months. I don't know ebuild syntax well enough to
 figure out the problem at first glace, though.


Actually, I take back half of what I said. I know the error is being caused
by the last line of the ebuild, need_php_by_category, I just don't know
why it gives an error or how that line is supposed to work. Perhaps it's
the dev-php5 category that's confusing portage, but I really don't know.

- Matt


Re: [gentoo-user] Error with sunrise overlay during eix-sync...

2011-12-15 Thread Tanstaafl

On 2011-12-15 12:53 PM, Matthew Finkel matthew.fin...@gmail.com wrote:

On Thu, Dec 15, 2011 at 12:48 PM, Matthew Finkel
matthew.fin...@gmail.com mailto:matthew.fin...@gmail.com wrote:

On Thu, Dec 15, 2011 at 12:15 PM, Tanstaafl
tansta...@libertytrek.org mailto:tansta...@libertytrek.org wrote:

Anyone else getting this error?

It started this morning...


Same here. I would say it is due to a bad push, but the changelog
doesn't show any changes for months. I don't know ebuild syntax well
enough to figure out the problem at first glace, though.


Actually, I take back half of what I said. I know the error is being
caused by the last line of the ebuild, need_php_by_category, I just
don't know why it gives an error or how that line is supposed to work.
Perhaps it's the dev-php5 category that's confusing portage, but I
really don't know.


Ok, well, at least I know it isn't just me...

Hopefully will get fixed soon with a new sync...

Thanks Matthew



Re: [gentoo-user] Who can tell me relationship among dri,glx,mesa,xorg?

2011-12-15 Thread Michael Schreckenbauer
Am Donnerstag, 15. Dezember 2011, 18:29:14 schrieb Lavender:
 At 2011-12-15 03:24:20,Michael Schreckenbauer grim...@gmx.de wrote:
 Am Mittwoch, 14. Dezember 2011, 14:22:47 schrieb Lavender:
  Now I'm totally confused, I can't find helpful information from
  Internet. I know mesa is a open source implementation of OpenGL,
  obviously mesa will afford OpenGL API. DRI is short for Direct
  Rendering
  Infrastructure, I have chosen options like:
  Device Drivers ---
  
Graphics support ---
*  Direct Rendering Manager ---
 
 this is DRM. This one manages allocation of memory for video devices.
 
*ATI Radeon
[*]  Enable modesetting on radeon by default
  
  Does this mean that DRI libraries are built into kernel?
 
 No.
 
  If not, who
  contains DRI? Also who affords GLX libraries? Mesa or Xorg?
 
 DRI is part of mesa. Mesa also provides the GLX libraries.
 
 Best,
 Michael
 
 Thanks and  I wish you could help answer this question.Now I know Mesa
 provides DRI and GLX, when I installed xorg-server,there're also libraries
 named like libdri.so and libglx.so in /etc/X11/(somewhere).

Yeah, I was wrong :) libglx and libdri are part of xorg-server.

Best,
Michael




Re: [gentoo-user] Who can tell me relationship among dri,glx,mesa,xorg?

2011-12-15 Thread Adam Carter
 Yeah, I was wrong :) libglx and libdri are part of xorg-server.

libglx can also be provided by driver packages. You can select the
xorg one or others via eselect;

proxy adam # eselect opengl list
Available OpenGL implementations:
  [1]   ati *
  [2]   xorg-x11

Also, I imagine those kernel options supply an interface for the DRM/DRI driver.



Re: [gentoo-user] DBI connect dbname=template1 failed Permission denied

2011-12-15 Thread Pandu Poluan
On Dec 15, 2011 8:52 PM, Joseph syscon...@gmail.com wrote:

 On 12/15/11 16:11, Pandu Poluan wrote:


  Hmmm...

  Have you GRANT the 'sql-ledger' user the CONNECT privilege to the
  database?

  Rgds,


 After installing postgresql I run:
 emerge --config =dev-db/postgresql-server-9.1.1

 started postgresql-9.1
 # su - postgres
 postgres@syscon5 ~ $ createuser -d sql-ledger
   y
   y
 exit

 that was it.

 # psql -U postgres -l
  List of databases
   Name|  Owner   | Encoding |   Collate   |Ctype|   Access
privileges
---+--+--+-+-+---
  postgres  | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |  template0
| postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres  +
   |  |  | | |
postgres=CTc/postgres
  template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
=c/postgres  +
   |  |  | | |
postgres=CTc/postgres
 --
 Joseph


Okay, according to the documentation on GRANT, =c/postgres means the
public is granted CONNECT privilege, granted by the user postgres. So no
problem there.

Hmm... wonder what's wrong...

Rgds,


Re: [gentoo-user] DBI connect dbname=template1 failed Permission denied

2011-12-15 Thread Pandu Poluan
On Dec 16, 2011 5:46 AM, Pandu Poluan pa...@poluan.info wrote:


 On Dec 15, 2011 8:52 PM, Joseph syscon...@gmail.com wrote:
 
  On 12/15/11 16:11, Pandu Poluan wrote:
 
 
   Hmmm...
 
   Have you GRANT the 'sql-ledger' user the CONNECT privilege to the
   database?
 
   Rgds,
 
 
  After installing postgresql I run:
  emerge --config =dev-db/postgresql-server-9.1.1
 
  started postgresql-9.1
  # su - postgres
  postgres@syscon5 ~ $ createuser -d sql-ledger
y
y
  exit
 
  that was it.
 
  # psql -U postgres -l
   List of databases
Name|  Owner   | Encoding |   Collate   |Ctype|   Access
privileges
---+--+--+-+-+---
   postgres  | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
 template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
 +
|  |  | | |
postgres=CTc/postgres
   template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
=c/postgres  +
|  |  | | |
postgres=CTc/postgres
  --
  Joseph
 

 Okay, according to the documentation on GRANT, =c/postgres means the
public is granted CONNECT privilege, granted by the user postgres. So no
problem there.

 Hmm... wonder what's wrong...


Okay, I'm grasping at straws currently... how does the offending line in
admin.pl look like?

Rgds,


Re: [gentoo-user] DBI connect dbname=template1 failed Permission denied

2011-12-15 Thread Pandu Poluan
On Dec 16, 2011 5:49 AM, Pandu Poluan pa...@poluan.info wrote:


 On Dec 16, 2011 5:46 AM, Pandu Poluan pa...@poluan.info wrote:
 
 
  On Dec 15, 2011 8:52 PM, Joseph syscon...@gmail.com wrote:
  
   On 12/15/11 16:11, Pandu Poluan wrote:
  
  
Hmmm...
  
Have you GRANT the 'sql-ledger' user the CONNECT privilege to the
database?
  
Rgds,
  
  
   After installing postgresql I run:
   emerge --config =dev-db/postgresql-server-9.1.1
  
   started postgresql-9.1
   # su - postgres
   postgres@syscon5 ~ $ createuser -d sql-ledger
 y
 y
   exit
  
   that was it.
  
   # psql -U postgres -l
List of databases
 Name|  Owner   | Encoding |   Collate   |Ctype|
Access privileges
---+--+--+-+-+---
postgres  | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
 template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
 +
 |  |  | | |
postgres=CTc/postgres
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
=c/postgres  +
 |  |  | | |
postgres=CTc/postgres
   --
   Joseph
  
 
  Okay, according to the documentation on GRANT, =c/postgres means the
public is granted CONNECT privilege, granted by the user postgres. So no
problem there.
 
  Hmm... wonder what's wrong...
 

 Okay, I'm grasping at straws currently... how does the offending line in
admin.pl look like?

 Rgds,

Some thoughts : if the line is correct, the problem might be in how you
configured Apache. Here's a reference :

http://cpanforum.com/threads/1268

Rgds,


Re: [gentoo-user] Gentoo + HP + Quickmedia

2011-12-15 Thread Carlos Sura
On 4 December 2011 04:50, Mick michaelkintz...@gmail.com wrote:

 On Tuesday 29 Nov 2011 06:51:30 Carlos Sura wrote:
  Hello Mates,
 
  I have a new HP laptop i5, this came with Windows 7 pre-installed with HP
  quickweb (a tool that let me skype, check my email and navigate Interne,
  whitout loading WINDOWS).

 I believe that HP are using Splashtop OS to achieve 'Instant-on'
 functionality, which is running an embedded Linux kernel from ROM, with
 bootsplash, squashfs, and blackbox as the main binaries.  Asus, Acer and
 others also joined in the fun.


  I'm wondering if there any way to leave quickweb with gentoo, or windows
 +
  quickweb + gentoo would be fine...

 Unless I got this wrong, the PC is essentially dual booting between the ROM
 resident OS and the disk OS.  The latter can be any OS inc. Gentoo of
 course.


  Also if someone has suceffuly installed gentoo in HP DM4-1190la please
 let
  me know or a document of WHAT WORKS AND WHAT DO NOT WORKS would be fine.
 
  Regards

 --
 Regards,
 Mick



Well, Thank you for your answer Mick, but after numerous test also many
times I've tried, could't make this happen, because quick media is without
the HD (or at least I think) because I don't need to get to windows, is a
OS very light to use, email, navigation, skype and some others things.

Also, I have to delete RECOVERY partition, because it did not work (I tried
with extended partition, same results)

Now, I'm running Gentoo +  Windows 7 (Dual Boot) a little problems, but for
now, I can work in both systems very well.

Regards


-- 
Carlos Sura.-
www.carlossura.com


Re: [gentoo-user] Gentoo + HP + Quickmedia

2011-12-15 Thread Matthew Finkel
On Thu, Dec 15, 2011 at 7:24 PM, Carlos Sura carlos.su...@googlemail.comwrote:

 Well, Thank you for your answer Mick, but after numerous test also many
 times I've tried, could't make this happen, because quick media is without
 the HD (or at least I think) because I don't need to get to windows, is a
 OS very light to use, email, navigation, skype and some others things.


Correct, so it should be completely independent of Windows or Gentoo or
whichever OS you have installed on your hard drive.



 Also, I have to delete RECOVERY partition, because it did not work (I
 tried with extended partition, same results)


Those partitions are pretty useless anyway :)



 Now, I'm running Gentoo +  Windows 7 (Dual Boot) a little problems, but
 for now, I can work in both systems very well.


Awesome! Glad to hear you have Gentoo working! Just out of curiosity, what
types of problems are you still having?


 Regards
 --
 Carlos Sura.-
 www.carlossura.com


- Matt

-- 
Matthew Finkel


Re: [gentoo-user] Gentoo + HP + Quickmedia

2011-12-15 Thread Carlos Sura
On 15 December 2011 18:44, Matthew Finkel matthew.fin...@gmail.com wrote:

 On Thu, Dec 15, 2011 at 7:24 PM, Carlos Sura 
 carlos.su...@googlemail.comwrote:

 Well, Thank you for your answer Mick, but after numerous test also many
 times I've tried, could't make this happen, because quick media is without
 the HD (or at least I think) because I don't need to get to windows, is a
 OS very light to use, email, navigation, skype and some others things.


 Correct, so it should be completely independent of Windows or Gentoo or
 whichever OS you have installed on your hard drive.



 Also, I have to delete RECOVERY partition, because it did not work (I
 tried with extended partition, same results)


 Those partitions are pretty useless anyway :)



 Now, I'm running Gentoo +  Windows 7 (Dual Boot) a little problems, but
 for now, I can work in both systems very well.


 Awesome! Glad to hear you have Gentoo working! Just out of curiosity, what
 types of problems are you still having?


 Regards
 --
 Carlos Sura.-
 www.carlossura.com


 - Matt

 --
 Matthew Finkel


Well,

My laptop has 2 video cards INTEL (integrated video card) That's the only
one that works.

And Ati Mobility Radeon Premium Graphics:

lspci:
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a5)
01:00.0 VGA compatible controller: ATI Technologies Inc Manhattan [Mobility
Radeon HD 5400 Series]

I tried with switchero but it just only work with INTEL not for ATI, also
I've tried to use just ATI (ati-drivers) package, but when I try to:
X -configure

it says something like:
Screen found, but driver:
fxglrs (not found)

I tried following all gentoo wiki about ATI, but it just simply don't work.
I don't care to use both video cards, but I would like to use ATI insted
INTEL.

If there any way or someone who knows how to solve this, it would be great
for me!

Regards




-- 
Carlos Sura.-
www.carlossura.com


Re:Re: [gentoo-user] Who can tell me relationship among dri,glx,mesa,xorg?

2011-12-15 Thread Lavender
libglx can also be provided by driver packages. You can select the
xorg one or others via eselect;

proxy adam # eselect opengl list
Available OpenGL implementations:
  [1]   ati *
  [2]   xorg-x11

Also, I imagine those kernel options supply an interface for the DRM/DRI 
driver.

Thank you very much ! I think I worked it out :)

[gentoo-user] LVM: extending volume groups and logical volumes

2011-12-15 Thread Allan Gottlieb
I need to add space to /var (thank you, libreoffice), which is on lvm.
Since my one volume group vg is getting low, I thought this would be a
good time to extend it as well.

Alan (McKinnon) has posted very helpful lvm bits (reprinted below).
Following alan's bottom up creation mandate I believe the idea is

phy disk:   /dev/sda  my only drive
phy part:   fdisk   create another partition of type LVM (/dev/sda8)
phy vol:pvcreate /dev/sda8
vol grp:vgextend vg /dev/sda8
log vol:lvextend --size +10G /dev/vg/var
file sys:   resize2fs /dev/vg/var
files/dirs: not relevant

Questions

1.  Apparently 2.6 (hence 3.x) kernels can expand mounted file systems
(/var is mounted as ext3).

Since I can't unmount /var because it is in use, I guess that, if I
every need to shrink /var, I would need to boot off a CD.  Is that
correct?

Back in the day, we had single user mode for this, but I don't see
how to get the equivalent now.

Is it really safe to extend /var (i.e., /dev/vg/var) while mounted
as ext3?  It sounds frightening since daemons could start running
and access /var.

2.  Since currently /var is entirely from /dev/sda7 (my original lvm
partition) should I use the optional parameter to lvextend to
force the new space for /var to come from there as well?
lv extend --size +10G /dev/sda7

thanks in advance
allan


 from Alan McKinnon ==

Let's look first at the layers of stuff involved:


   files  directories

   file system

   logical volume (LV)

   volume group (VG)

   physical volume (PV)  

   physical partition(i.e. /dev/sda1 etc)

   physical disk (i.e. something Seagate etc made)

OK, there's a lot of stuff there. When you made the LV, you worked from
the bottom up

Nothing in that list can be bigger than the thing below it.



Re: [gentoo-user] Gentoo + HP + Quickmedia

2011-12-15 Thread Matthew Finkel
On Thu, Dec 15, 2011 at 8:56 PM, Carlos Sura carlos.su...@googlemail.comwrote:


 Well,

 My laptop has 2 video cards INTEL (integrated video card) That's the only
 one that works.

 And Ati Mobility Radeon Premium Graphics:

 lspci:
 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a5)
 01:00.0 VGA compatible controller: ATI Technologies Inc Manhattan
 [Mobility Radeon HD 5400 Series]

 I tried with switchero but it just only work with INTEL not for ATI, also
 I've tried to use just ATI (ati-drivers) package, but when I try to:
 X -configure

 it says something like:
 Screen found, but driver:
 fxglrs (not found)


If the Intel video card is working correctly, then you should only need to
adjust which driver X uses when it starts. This can be changed within
/etc/X11/xorg.conf. The ATI driver should be called fglrx which is
installed when you emerge ati-drivers. It's strange that it can not find
the driver, though. If it's possible, can you attach the error message? The
ati-drivers package also comes with a tool, aticonfig, which may help
auto-configure xorg.conf, as well.


 I tried following all gentoo wiki about ATI, but it just simply don't
 work. I don't care to use both video cards, but I would like to use ATI
 insted INTEL.

 If there any way or someone who knows how to solve this, it would be great
 for me!

 Regards
 --
 Carlos Sura.-
 www.carlossura.com



- Matt


-- 
Matthew Finkel


Re: [gentoo-user] LVM: extending volume groups and logical volumes

2011-12-15 Thread Dale

Allan Gottlieb wrote:

I need to add space to /var (thank you, libreoffice), which is on lvm.
Since my one volume group vg is getting low, I thought this would be a
good time to extend it as well.

Alan (McKinnon) has posted very helpful lvm bits (reprinted below).
Following alan's bottom up creation mandate I believe the idea is

phy disk:   /dev/sda  my only drive
phy part:   fdisk   create another partition of type LVM (/dev/sda8)
phy vol:pvcreate /dev/sda8
vol grp:vgextend vg /dev/sda8
log vol:lvextend --size +10G /dev/vg/var
file sys:   resize2fs /dev/vg/var
files/dirs: not relevant

Questions

1.  Apparently 2.6 (hence 3.x) kernels can expand mounted file systems
 (/var is mounted as ext3).

 Since I can't unmount /var because it is in use, I guess that, if I
 every need to shrink /var, I would need to boot off a CD.  Is that
 correct?

 Back in the day, we had single user mode for this, but I don't see
 how to get the equivalent now.

 Is it really safe to extend /var (i.e., /dev/vg/var) while mounted
 as ext3?  It sounds frightening since daemons could start running
 and access /var.

2.  Since currently /var is entirely from /dev/sda7 (my original lvm
 partition) should I use the optional parameter to lvextend to
 force the new space for /var to come from there as well?
 lv extend --size +10G /dev/sda7

thanks in advance
allan


When I need to do something like this, I do a:

rc single

That stops all the services, including loggers which need /var, and on 
my systems, umounts /var as well.  I'm assuming you have upgraded to 
baselayout2 and openrc.  That may not work on the old setups.  When you 
go to single user mode, it umounts everything except / itself.  May want 
to recall that if you have notes in your user directory which would not 
be mounted.  I always put things like that in /root.


As for being safe, I did one of my file systems recently while 
downloading a movie.  It was being actively written to while it was 
being expanded.  The movie played fine when it was all done so I guess 
it is safe if the file system can be expanded while mounted.  Keep in 
mind, some can't so check first.


I'd have to read on the rest as I am a bit new to this too.  Maybe 
someone who knows more will comment on the rest.


Dale

:-)  :-)

--
I am only responsible for what I said ... Not for what you understood or how 
you interpreted my words!

Miss the compile output?  Hint:
EMERGE_DEFAULT_OPTS=--quiet-build=n




[gentoo-user] Re: LVM: extending volume groups and logical volumes

2011-12-15 Thread Jens Müller

Am 16.12.2011 03:18, schrieb Allan Gottlieb:

Questions

1.  Apparently 2.6 (hence 3.x) kernels can expand mounted file systems
 (/var is mounted as ext3).

 Since I can't unmount /var because it is in use, I guess that, if I
 every need to shrink /var, I would need to boot off a CD.  Is that
 correct?

 Back in the day, we had single user mode for this, but I don't see
 how to get the equivalent now.

 Is it really safe to extend /var (i.e., /dev/vg/var) while mounted
 as ext3?  It sounds frightening since daemons could start running
 and access /var.


Well, online resizing works online, hence the name.

It is of course supposed to be working. You should have a backup 
nethertheless.


resize2fs also supports shrinking ext3 partitions, see 
http://linux.die.net/man/8/resize2fs


Regards,

Jens




Re: [gentoo-user] DBI connect dbname=template1 failed Permission denied

2011-12-15 Thread Joseph

On 12/16/11 05:49, Pandu Poluan wrote:

  
   Okay, according to the documentation on GRANT, =c/postgres means the
  public is granted CONNECT privilege, granted by the user postgres. So no
  problem there.
  
   Hmm... wonder what's wrong...
  

  Okay, I'm grasping at straws currently... how does the offending line in
  admin.pl look like?

  Rgds,


Hi Pandu,

Thanks for helping out on this. I'm pulling my hair trying to figure it out and 
I'm getting nowhere.

The SQL-Ledger developer was helping me out on this and he can not figure it 
out either.
I'm sure it is not SQL-ledger as it is working perfectly on my other computers. 
It could be apache configuration, but I don't see how?
I've compared file (using meld) setup with my working server and they are the same. 
So it could be something do to with permission.  As I copied apache configuration file using meld and meld program does not preserve ownership.


Here is amdin.pl script from SQL-Ledger

#!/usr/bin/perl -X
#
##
# SQL-Ledger ERP
# Copyright (C) 2006
#
#  Author: DWS Systems Inc.
# Web: http://www.sql-ledger.com
#
###
#
# this script sets up the terminal and runs the scripts
# in bin/$terminal directory
# admin.pl is linked to this script
#
###


# setup defaults, DO NOT CHANGE
$userspath = users;
$spool = spool;
$templates = templates;
$images = images;
$memberfile = users/members;
$sendmail = | /usr/sbin/sendmail -t;
%printer = ();
## end ###


$| = 1;

eval { require sql-ledger.conf; };


if ($ENV{CONTENT_LENGTH}) {
  read(STDIN, $_, $ENV{CONTENT_LENGTH});
}

if ($ENV{QUERY_STRING}) {
  $_ = $ENV{QUERY_STRING};
}

if ($ARGV[0]) {
  $_ = $ARGV[0];
}


%form = split /[=]/;

# fix for apache 2.0 bug
map { $form{$_} =~ s/\\$// } keys %form;

# name of this script
$0 =~ tr/\\/\//;
$pos = rindex $0, '/';
$script = substr($0, $pos + 1);

@scripts = qw(login.pl admin.pl custom_login.pl custom_admin.pl);

if (grep !/^\Q$form{script}\E/, @scripts) {
  print Content-Type: text/html\n\n if $ENV{HTTP_USER_AGENT};
  print \nAccess denied!\n;
  exit;
}

if (-f $userspath/nologin  $script ne 'admin.pl') {
  print Content-Type: text/html\n\n if $ENV{HTTP_USER_AGENT};
  if (-s $userspath/nologin) {
open(FH, $userspath/nologin);
$message = FH;
close(FH);
print \n$message\n;
  } else {
print \nLogin disabled!\n;
  }
  exit;
}


if ($form{path}) {
  $form{path} =~ s/%2f/\//gi;
  $form{path} =~ s/\.\.//g;

  if ($form{path} !~ /^bin\//) {
print Content-Type: text/html\n\n if $ENV{HTTP_USER_AGENT};
print \nInvalid path!\n;
exit;
  }


  $ARGV[0] = $_script=$script;
  require $form{path}/$script;
} else {

  if (!$form{terminal}) {
if ($ENV{HTTP_USER_AGENT}) {
  # web browser
  $form{terminal} = lynx;
  if ($ENV{HTTP_USER_AGENT} !~ /lynx/i) {
$form{terminal} = mozilla;
  }
} else {
  if ($ENV{TERM} =~ /xterm/) {
$form{terminal} = xterm;
  }
  if ($ENV{TERM} =~ /(console|linux|vt.*)/i) {
$form{terminal} = console;
  }
}
  }


  if ($form{terminal}) {
$form{terminal} =~ s/%2f/\//gi;
$form{terminal} =~ s/\.\.//g;

$ARGV[0] = path=bin/$form{terminal}script=$script;
map { $ARGV[0] .= ${_}=$form{$_} } keys %form;

require bin/$form{terminal}/$script;

  } else {


print Content-Type: text/html\n\n if $ENV{HTTP_USER_AGENT};
print qq|\nUnknown terminal\n|;
  }

}

# end of main

--
Joseph



Re: [gentoo-user] DBI connect dbname=template1 failed Permission denied

2011-12-15 Thread Joseph

On 12/16/11 06:09, Pandu Poluan wrote:


  Some thoughts : if the line is correct, the problem might be in how you
  configured Apache. Here's a reference :

  http://cpanforum.com/threads/1268

  Rgds,


Thanks for the pointer, that is interesting!
How do I check if apache loaded multithreaded MPM module?

This is a new machine and everthing is possible.

--
Joseph



Re: [gentoo-user] DBI connect dbname=template1 failed Permission denied

2011-12-15 Thread Joseph

On 12/15/11 20:28, Joseph wrote:

On 12/16/11 06:09, Pandu Poluan wrote:


  Some thoughts : if the line is correct, the problem might be in how you
  configured Apache. Here's a reference :

  http://cpanforum.com/threads/1268

  Rgds,


Thanks for the pointer, that is interesting!
How do I check if apache loaded multithreaded MPM module?

This is a new machine and everthing is possible.

--
Joseph


It seems to me that my apache is loading both modules:
./httpd.conf:LoadModule cgi_module modules/mod_cgi.so
./httpd.conf:LoadModule cgid_module modules/mod_cgid.so

but this is identical with my other working server that is functioning 
correctly.

dbh = DBI-connect( 'DBI:Pg:dbname=DBNAME','USERNAME','PASSWORD');

I was trying to test this line, but I don't think so I can as I did not even 
created the database.
I'm trying to create dataset using SQL-Ledger apacher web-interface.

--
Joseph



Re: [gentoo-user] DBI connect dbname=template1 failed Permission denied

2011-12-15 Thread Pandu Poluan
On Dec 16, 2011 10:28 AM, Joseph syscon...@gmail.com wrote:

 On 12/16/11 06:09, Pandu Poluan wrote:


  Some thoughts : if the line is correct, the problem might be in how you
  configured Apache. Here's a reference :

  http://cpanforum.com/threads/1268

  Rgds,


 Thanks for the pointer, that is interesting!
 How do I check if apache loaded multithreaded MPM module?

 This is a new machine and everthing is possible.


I'm not sure either, haven't deployed Apache ever before...

Rgds,


[gentoo-user] Re: LVM: extending volume groups and logical volumes

2011-12-15 Thread Jens Müller

Am 16.12.2011 04:05, schrieb Jens Müller:

resize2fs also supports shrinking ext3 partitions, see
http://linux.die.net/man/8/resize2fs


Sorry about that one - yes, the fs must be unmounted to do this.

- Jens




Re: [gentoo-user] DBI connect dbname=template1 failed Permission denied

2011-12-15 Thread Pandu Poluan
On Dec 16, 2011 10:42 AM, Joseph syscon...@gmail.com wrote:

 On 12/15/11 20:28, Joseph wrote:

 On 12/16/11 06:09, Pandu Poluan wrote:


  Some thoughts : if the line is correct, the problem might be in how you
  configured Apache. Here's a reference :

  http://cpanforum.com/threads/1268

  Rgds,


 Thanks for the pointer, that is interesting!
 How do I check if apache loaded multithreaded MPM module?

 This is a new machine and everthing is possible.

 --
 Joseph


 It seems to me that my apache is loading both modules:
 ./httpd.conf:LoadModule cgi_module modules/mod_cgi.so
 ./httpd.conf:LoadModule cgid_module modules/mod_cgid.so

 but this is identical with my other working server that is functioning
correctly.


Honestly, I have no idea whether that's good or ungood. But if the other
servers have no problem...

 dbh = DBI-connect( 'DBI:Pg:dbname=DBNAME','USERNAME','PASSWORD');

 I was trying to test this line, but I don't think so I can as I did not
even created the database.
 I'm trying to create dataset using SQL-Ledger apacher web-interface.


Hmmm... try GRANTing the user sql-ledger ALL privileges to the database.

Rgds,


Re: [gentoo-user] LVM: extending volume groups and logical volumes

2011-12-15 Thread J. Roeleveld
On Friday 16 December 2011 03:18:16 Allan Gottlieb wrote:
 I need to add space to /var (thank you, libreoffice), which is on lvm.
 Since my one volume group vg is getting low, I thought this would be a
 good time to extend it as well.

Actually, you need space in /var/tmp/portage

 Alan (McKinnon) has posted very helpful lvm bits (reprinted below).
 Following alan's bottom up creation mandate I believe the idea is
 
 phy disk:   /dev/sda  my only drive
 phy part:   fdisk   create another partition of type LVM (/dev/sda8)
 phy vol:pvcreate /dev/sda8
 vol grp:vgextend vg /dev/sda8
 log vol:lvextend --size +10G /dev/vg/var
 file sys:   resize2fs /dev/vg/var
 files/dirs: not relevant
 
 Questions
 
 1.  Apparently 2.6 (hence 3.x) kernels can expand mounted file systems
 (/var is mounted as ext3).
 
 Since I can't unmount /var because it is in use, I guess that, if I
 every need to shrink /var, I would need to boot off a CD.  Is that
 correct?

For shrinking, you need to umount the partition first. Online-resizing only 
works when increasing the size.

 Back in the day, we had single user mode for this, but I don't see
 how to get the equivalent now.

rc single (See Dales email)

 Is it really safe to extend /var (i.e., /dev/vg/var) while mounted
 as ext3?  It sounds frightening since daemons could start running
 and access /var.

Yes, I regularly extend filesystems while already copying data to them.

 2.  Since currently /var is entirely from /dev/sda7 (my original lvm
 partition) should I use the optional parameter to lvextend to
 force the new space for /var to come from there as well?
 lv extend --size +10G /dev/sda7

No, LVM can assign space from any disk. It will know where to go when 
accessing it.

If it's just temporary for LibreOffice, I'd suggest making a temporary LV, 
mount 
it at /var/tmp/portage and then emerging the software.
Then when finished, umount and remove the LV.

I see no need to have /var really large for normal use and have never tried 
shrinking filesystems myself.

 thanks in advance

Your welcome :)

HTH,

--
Joost



Re: [gentoo-user] LVM: extending volume groups and logical volumes

2011-12-15 Thread Dale

J. Roeleveld wrote:
If it's just temporary for LibreOffice, I'd suggest making a temporary 
LV, mount it at /var/tmp/portage and then emerging the software. Then 
when finished, umount and remove the LV. I see no need to have /var 
really large for normal use and have never tried shrinking filesystems 
myself.

Your welcome :)

HTH,

--
Joost




If he has enough memory, he could mount it on tmpfs too.  That's how I 
do mine.  I got more ram than space on /var.  lol


Dale

:-)   :-)

--
I am only responsible for what I said ... Not for what you understood or how 
you interpreted my words!

Miss the compile output?  Hint:
EMERGE_DEFAULT_OPTS=--quiet-build=n