Re: [Bacula-users] Rescue-Disk: getdiskinfo does not work correctly with lvm2

2007-03-30 Thread Christian Nolte
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Christian Nolte schrieb:
 Creating a rescue disk on a system using Fedora Core 6 and lvm2 I
 noticed that getdiskinfo does not create the diskinfo/lvm-*.bsi. They
 are always empty. The problem is that the redirection of the output of
 lvm does not work. See the attached patch for the necessary changes.

The patch was flawed, sorry. Here is a working one (hopefully), at least
it works for me.

- --

Christian Nolte

mailto:[EMAIL PROTECTED]

key : http://www.noltec.org/christian-nolte.asc
or  : www.keyserver.net

  GPG-fingerprint:
  1088 6C2D 1496 0A34 D159 1108 08D8 C0D2 77E1 5BBC
- --
For more than 4 generations the IT Professionals were the guardians
of quality and stability in software. Before the dark times.
Before Microsoft...
- --
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFGDNMmCNjA0nfhW7wRAtnlAJ0SJ9FvYwD96rvkbIVNFvnlmUio4gCgokv5
aSHiJ0zrywXTGnw2G1yG7hk=
=qRaT
-END PGP SIGNATURE-
--- rescue/linux/cdrom/bacula/getdiskinfo.orig	2007-03-30 10:48:44.0 +0200
+++ rescue/linux/cdrom/bacula/getdiskinfo	2007-03-30 10:49:09.0 +0200
@@ -64,9 +64,9 @@
 echo Gathering LVM information
 dolvm=1
 
-lvm pvs --noheadings --nosuffix -o pv_name,vg_name  lvm-pv.bsi
-lvm vgs --noheadings --nosuffix -o vg_name,vg_extent_size --units=k  lvm-vg.bsi
-lvm lvs --noheadings --nosuffix -o lv_name,vg_name,lv_size --units=k  lvm-lv.bsi
+lvm pvs --noheadings --nosuffix -o pv_name,vg_name | cat  lvm-pv.bsi
+lvm vgs --noheadings --nosuffix -o vg_name,vg_extent_size --units=k | cat  lvm-vg.bsi
+lvm lvs --noheadings --nosuffix -o lv_name,vg_name,lv_size --units=k | cat  lvm-lv.bsi
 fi
 
 echo Done collecting info.
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Rescue-Disk: getdiskinfo does not work correctly with lvm2

2007-03-30 Thread Kern Sibbald
Thanks for the patch.

On Friday 30 March 2007 11:06, Christian Nolte wrote:
 Christian Nolte schrieb:
  Creating a rescue disk on a system using Fedora Core 6 and lvm2 I
  noticed that getdiskinfo does not create the diskinfo/lvm-*.bsi. They
  are always empty. The problem is that the redirection of the output of
  lvm does not work. See the attached patch for the necessary changes.
 
 The patch was flawed, sorry. Here is a working one (hopefully), at least
 it works for me.

Hmmm.  It seems to me that even the second one is not really ideal though it 
should work OK.  Could 
you try the following, which I think is better -- providing it works?

Best regards,

Kern



 
 --
 
 Christian Nolte
 
 mailto:[EMAIL PROTECTED]
 
 key : http://www.noltec.org/christian-nolte.asc
 or  : www.keyserver.net
 
   GPG-fingerprint:
   1088 6C2D 1496 0A34 D159 1108 08D8 C0D2 77E1 5BBC
 --
 For more than 4 generations the IT Professionals were the guardians
 of quality and stability in software. Before the dark times.
 Before Microsoft...
 --
 
--- rescue/linux/cdrom/bacula/getdiskinfo.orig	2007-03-30 10:48:44.0 +0200
+++ rescue/linux/cdrom/bacula/getdiskinfo	2007-03-30 10:49:09.0 +0200
@@ -64,9 +64,9 @@
 echo Gathering LVM information
 dolvm=1
 
-lvm pvs --noheadings --nosuffix -o pv_name,vg_name  lvm-pv.bsi
-lvm vgs --noheadings --nosuffix -o vg_name,vg_extent_size --units=k  lvm-vg.bsi
-lvm lvs --noheadings --nosuffix -o lv_name,vg_name,lv_size --units=k  lvm-lv.bsi
+lvm pvs --noheadings --nosuffix -o pv_name,vg_name 21  lvm-pv.bsi
+lvm vgs --noheadings --nosuffix -o vg_name,vg_extent_size --units=k 21  lvm-vg.bsi
+lvm lvs --noheadings --nosuffix -o lv_name,vg_name,lv_size --units=k 2.1  lvm-lv.bsi
 fi
 
 echo Done collecting info.
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Rescue-Disk: getdiskinfo does not work correctly with lvm2

2007-03-30 Thread Christian Nolte
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Kern Sibbald schrieb:
 Thanks for the patch.
 
 On Friday 30 March 2007 11:06, Christian Nolte wrote:
 Christian Nolte schrieb:
 Creating a rescue disk on a system using Fedora Core 6 and lvm2 I
 noticed that getdiskinfo does not create the diskinfo/lvm-*.bsi. They
 are always empty. The problem is that the redirection of the output of
 lvm does not work. See the attached patch for the necessary changes.
 The patch was flawed, sorry. Here is a working one (hopefully), at least
 it works for me.
 
 Hmmm.  It seems to me that even the second one is not really ideal though it 
 should work OK.  Could 
 you try the following, which I think is better -- providing it works?

This solution would indeed be better but it does not work. This is
really odd. It seems that lvm neither uses stdout nor stderr which could
be redirected. I wonder why cat does the trick though.

- --

Christian Nolte

mailto:[EMAIL PROTECTED]

key : http://www.noltec.org/christian-nolte.asc
or  : www.keyserver.net

  GPG-fingerprint:
  1088 6C2D 1496 0A34 D159 1108 08D8 C0D2 77E1 5BBC
- --
For more than 4 generations the IT Professionals were the guardians
of quality and stability in software. Before the dark times.
Before Microsoft...
- --
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFGDPgCCNjA0nfhW7wRAp0aAJwN1qEwOHi57ObkKTNU/3satgGbLgCg3eq7
3tW+cOIjC3XMQomQHeCWn6k=
=yqyD
-END PGP SIGNATURE-

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users