Hello community,
here is the log from the commit of package yast2-storage
checked in at Fri Apr 28 21:16:55 CEST 2006.
--------
--- yast2-storage/yast2-storage.changes 2006-04-26 15:50:39.000000000 +0200
+++ STABLE/yast2-storage/yast2-storage.changes 2006-04-27 18:06:37.000000000 +0200
@@ -1,0 +2,9 @@
+Thu Apr 27 11:46:07 CEST 2006 - fehr(a)suse.de
+
+- call udevsettle instead of udev.count_events
+- remove sole /dev/evms/md/ entries (#170075)
+- move /boot lower in mount point proposal list
+- prevent raid devices activated by EVMS breaking install (#170080)
+- version 2.13.57
+
+-------------------------------------------------------------------
Old:
----
yast2-storage-2.13.56.tar.bz2
New:
----
yast2-storage-2.13.57.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-storage.spec ++++++
--- /var/tmp/diff_new_pack.BOgsTc/_old 2006-04-28 21:16:43.000000000 +0200
+++ /var/tmp/diff_new_pack.BOgsTc/_new 2006-04-28 21:16:43.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-storage (Version 2.13.56)
+# spec file for package yast2-storage (Version 2.13.57)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-storage
-Version: 2.13.56
-Release: 1
+Version: 2.13.57
+Release: 2
License: GPL
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-storage-2.13.56.tar.bz2
+Source0: yast2-storage-2.13.57.tar.bz2
prefix: /usr
BuildRequires: blocxx-devel docbook-xsl-stylesheets doxygen evms gcc-c++ libxcrypt-devel libxslt openssl-devel perl-XML-Writer sablot sgml-skel swig update-desktop-files yast2 yast2-devtools yast2-installation yast2-perl-bindings yast2-testsuite
Requires: yast2 parted yast2-installation yast2-storage-lib yast2-perl-bindings
@@ -40,7 +40,7 @@
%prep
-%setup -n yast2-storage-2.13.56
+%setup -n yast2-storage-2.13.57
%build
%{prefix}/bin/y2tool y2autoconf
@@ -164,6 +164,12 @@
%doc %{prefix}/share/doc/packages/yast2-storage/libstorage
%changelog -n yast2-storage
+* Thu Apr 27 2006 - fehr(a)suse.de
+- call udevsettle instead of udev.count_events
+- remove sole /dev/evms/md/ entries (#170075)
+- move /boot lower in mount point proposal list
+- prevent raid devices activated by EVMS breaking install (#170080)
+- version 2.13.57
* Wed Apr 26 2006 - fehr(a)suse.de
- use evms log level from config file
- add needed changes to use md device as EVMS PVs
++++++ yast2-storage-2.13.56.tar.bz2 -> yast2-storage-2.13.57.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.56/VERSION new/yast2-storage-2.13.57/VERSION
--- old/yast2-storage-2.13.56/VERSION 2006-04-26 14:15:06.000000000 +0200
+++ new/yast2-storage-2.13.57/VERSION 2006-04-27 11:45:55.000000000 +0200
@@ -1 +1 @@
-2.13.56
+2.13.57
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.56/libstorage/src/AppUtil.cc new/yast2-storage-2.13.57/libstorage/src/AppUtil.cc
--- old/yast2-storage-2.13.56/libstorage/src/AppUtil.cc 2006-04-25 12:01:03.000000000 +0200
+++ new/yast2-storage-2.13.57/libstorage/src/AppUtil.cc 2006-04-27 12:22:13.000000000 +0200
@@ -629,6 +629,19 @@
y2mil( "map: " << ret );
}
+unsigned getMajorDevices( const string& driver )
+ {
+ unsigned ret=0;
+ string cmd = "grep \" " + driver + "$\" /proc/devices";
+ SystemCmd c( cmd );
+ if( c.numLines()>0 )
+ {
+ extractNthWord( 0, *c.getLine(0)) >> ret;
+ }
+ y2mil( "driver:" << driver << " ret:" << ret );
+ return( ret );
+ }
+
bool system_cmd_testmode = false;
const string app_ws = " \t\n";
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.56/libstorage/src/AppUtil.h new/yast2-storage-2.13.57/libstorage/src/AppUtil.h
--- old/yast2-storage-2.13.56/libstorage/src/AppUtil.h 2006-03-15 14:00:06.000000000 +0100
+++ new/yast2-storage-2.13.57/libstorage/src/AppUtil.h 2006-04-27 11:59:17.000000000 +0200
@@ -50,6 +50,7 @@
void undevDevice( string& dev );
bool runningFromSystem();
void delay(int Microsec_iv);
+unsigned getMajorDevices( const string& driver );
int createLogger( const string& component, const string& name,
const string& logpath, const string& logfile );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.56/libstorage/src/Dm.cc new/yast2-storage-2.13.57/libstorage/src/Dm.cc
--- old/yast2-storage-2.13.56/libstorage/src/Dm.cc 2006-04-26 14:59:46.000000000 +0200
+++ new/yast2-storage-2.13.57/libstorage/src/Dm.cc 2006-04-27 16:21:54.000000000 +0200
@@ -427,12 +427,8 @@
void Dm::getDmMajor()
{
- SystemCmd c( "grep device-mapper /proc/devices" );
- if( c.numLines()>0 )
- {
- extractNthWord( 0, *c.getLine(0)) >> dm_major;
- y2milestone( "dm_major:%u", dm_major );
- }
+ dm_major = getMajorDevices( "device-mapper" );
+ y2milestone( "dm_major:%u", dm_major );
}
void Dm::getInfo( DmInfo& tinfo ) const
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.56/libstorage/src/DmCo.cc new/yast2-storage-2.13.57/libstorage/src/DmCo.cc
--- old/yast2-storage-2.13.56/libstorage/src/DmCo.cc 2006-04-13 17:33:07.000000000 +0200
+++ new/yast2-storage-2.13.57/libstorage/src/DmCo.cc 2006-04-27 17:12:48.000000000 +0200
@@ -223,6 +223,8 @@
ret = DM_REMOVE_FAILED;
else
getStorage()->waitForDevice();
+ y2mil( "this:" << *this );
+ getStorage()->logProcData( cmd );
}
if( ret==0 )
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.56/libstorage/src/Evms.cc new/yast2-storage-2.13.57/libstorage/src/Evms.cc
--- old/yast2-storage-2.13.56/libstorage/src/Evms.cc 2006-04-19 18:36:53.000000000 +0200
+++ new/yast2-storage-2.13.57/libstorage/src/Evms.cc 2006-04-27 12:34:56.000000000 +0200
@@ -17,9 +17,11 @@
Dm( d, getMapperName(d,name) )
{
init( name );
+ y2mil( "init:" << *this );
setLe( le );
calcSize();
- getTableInfo();
+ if( majorNr()==Dm::dmMajor())
+ getTableInfo();
compat = !native;
y2debug( "constructed evms vol %s on vg %s", dev.c_str(),
cont->name().c_str() );
@@ -69,6 +71,39 @@
dev += cont->name() + "/";
dev += name;
Dm::init();
+ if( majorNr()!=Dm::dmMajor())
+ {
+ list<string>::iterator it;
+ y2mil( "alt_names:" << alt_names );
+ while( (it=find_if( alt_names.begin(), alt_names.end(),
+ find_begin("/dev/dm-")))!=alt_names.end() )
+ alt_names.erase(it);
+ y2mil( "alt_names:" << alt_names );
+ while( (it=find_if( alt_names.begin(), alt_names.end(),
+ find_begin("/dev/mapper/")))!=alt_names.end() )
+ alt_names.erase(it);
+ y2mil( "alt_names:" << alt_names );
+ }
+ }
+
+void Evms::updateMd()
+ {
+ if( majorNr()==Md::mdMajor() )
+ {
+ Volume const *v;
+ string dev = "/dev/md" + decString( minorNr() );
+ if( cont->getStorage()->findVolume( dev, v ))
+ {
+ y2mil( "bef update " << *this );
+ setUuid( v->getUuid() );
+ initLabel( v->getLabel() );
+ alt_names = v->altNames();
+ fs = detected_fs = v->getFs();
+ mp = orig_mp = v->getMount();
+ is_mounted = v->isMounted();
+ y2mil( "aft update " << *this );
+ }
+ }
}
string Evms::removeText( bool doing ) const
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.56/libstorage/src/Evms.h new/yast2-storage-2.13.57/libstorage/src/Evms.h
--- old/yast2-storage-2.13.56/libstorage/src/Evms.h 2005-11-07 12:15:51.000000000 +0100
+++ new/yast2-storage-2.13.57/libstorage/src/Evms.h 2006-04-27 12:35:26.000000000 +0200
@@ -24,6 +24,7 @@
string formatText( bool doing ) const;
string resizeText( bool doing ) const;
+ void updateMd();
void getInfo(storage::EvmsInfo&) const;
bool equalContent( const Evms& rhs ) const;
void logDifference( const Evms& d ) const;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.56/libstorage/src/EvmsCo.cc new/yast2-storage-2.13.57/libstorage/src/EvmsCo.cc
--- old/yast2-storage-2.13.56/libstorage/src/EvmsCo.cc 2006-04-25 21:14:24.000000000 +0200
+++ new/yast2-storage-2.13.57/libstorage/src/EvmsCo.cc 2006-04-27 12:39:59.000000000 +0200
@@ -77,6 +77,20 @@
return( ret );
}
+static bool isMdMajor( const Evms& l ) { return( l.majorNr()==Md::mdMajor() ); }
+
+void EvmsCo::updateMd()
+ {
+ if( nm.empty() )
+ {
+ EvmsPair p=evmsPair(isMdMajor);
+ for( EvmsIter i=p.begin(); i!=p.end(); ++i )
+ i->updateMd();
+ }
+ else
+ y2war( "updateMd called for:" << nm );
+ }
+
static bool lvDeleted( const Evms& l ) { return( l.deleted() ); }
static bool lvCreated( const Evms& l ) { return( l.created() ); }
static bool lvResized( const Evms& l ) { return( l.extendSize()!=0 ); }
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.56/libstorage/src/EvmsCo.h new/yast2-storage-2.13.57/libstorage/src/EvmsCo.h
--- old/yast2-storage-2.13.56/libstorage/src/EvmsCo.h 2006-04-25 19:38:33.000000000 +0200
+++ new/yast2-storage-2.13.57/libstorage/src/EvmsCo.h 2006-04-27 12:36:10.000000000 +0200
@@ -120,6 +120,7 @@
bool equalContent( const EvmsCo& rhs ) const;
void logDifference( const EvmsCo& d ) const;
bool checkConsistency() const;
+ void updateMd();
static void activate( bool val=true );
static int activateDevices();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.56/libstorage/src/Md.cc new/yast2-storage-2.13.57/libstorage/src/Md.cc
--- old/yast2-storage-2.13.56/libstorage/src/Md.cc 2006-04-25 19:53:57.000000000 +0200
+++ new/yast2-storage-2.13.57/libstorage/src/Md.cc 2006-04-27 12:09:54.000000000 +0200
@@ -530,6 +530,20 @@
computeSize();
}
+unsigned Md::mdMajor()
+ {
+ if( md_major==0 )
+ getMdMajor();
+ return( md_major );
+ }
+
+void Md::getMdMajor()
+ {
+ md_major = getMajorDevices( "md" );
+ y2milestone( "md_major:%u", md_major );
+ }
+
+
void Md::getInfo( MdInfo& tinfo ) const
{
@@ -636,9 +650,9 @@
*this = rhs;
}
-
string Md::md_names[] = { "unknown", "raid0", "raid1", "raid5", "raid6",
"raid10", "multipath" };
string Md::par_names[] = { "none", "left-asymmetric", "left-symmetric",
"right-asymmetric", "right-symmetric" };
+unsigned Md::md_major = 0;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.56/libstorage/src/Md.h new/yast2-storage-2.13.57/libstorage/src/Md.h
--- old/yast2-storage-2.13.56/libstorage/src/Md.h 2006-04-25 19:53:07.000000000 +0200
+++ new/yast2-storage-2.13.57/libstorage/src/Md.h 2006-04-27 12:11:29.000000000 +0200
@@ -39,6 +39,7 @@
string mdadmLine() const;
string createCmd() const;
static bool matchRegex( const string& dev );
+ static unsigned mdMajor();
static const string& pName( storage::MdType t ) { return md_names[t]; }
static bool mdStringNum( const string& name, unsigned& num );
@@ -58,6 +59,7 @@
void computeSize();
Md& operator=( const Md& );
+ static void getMdMajor();
static storage::MdType toMdType( const string& val );
static storage::MdParity toMdParity( const string& val );
@@ -70,6 +72,7 @@
std::list<string> spare;
static string md_names[storage::MULTIPATH+1];
static string par_names[storage::RIGHT_SYMMETRIC+1];
+ static unsigned md_major;
mutable storage::MdInfo info;
};
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.56/libstorage/src/Storage.cc new/yast2-storage-2.13.57/libstorage/src/Storage.cc
--- old/yast2-storage-2.13.56/libstorage/src/Storage.cc 2006-04-26 15:47:40.000000000 +0200
+++ new/yast2-storage-2.13.57/libstorage/src/Storage.cc 2006-04-27 18:08:59.000000000 +0200
@@ -163,6 +163,7 @@
detectObjects();
setCacheChanges( true );
dumpObjectList();
+ logProcData();
}
void Storage::dumpObjectList()
@@ -222,14 +223,19 @@
detectLoops( ppart );
detectFsData( vBegin(), vEnd() );
}
-#if 0
+ EvmsCoIterator e = findEvmsCo( "" );
+ if( e!=evCoEnd() )
+ e->updateMd();
+
if( instsys() )
{
- LvmVg::activate( false );
- EvmsCo::activate( false );
- MdCo::activate( false );
+ SystemCmd c( "grep ^md.*dm- /proc/mdstat" );
+ SystemCmd rm;
+ for( unsigned i=0; i<c.numLines(); i++ )
+ {
+ rm.execute( "mdadm --stop /dev/" + extractNthWord(0, *c.getLine(i)) );
+ }
}
-#endif
}
void Storage::deleteClist( CCont& co )
@@ -412,6 +418,11 @@
}
}
+static bool isEvmsMd( const Volume& v )
+ {
+ return( v.device().find( "/dev/evms/md/" )==0 );
+ }
+
void
Storage::detectEvms()
{
@@ -434,12 +445,17 @@
if( !data.volumes.empty() )
{
EvmsCo * e = new EvmsCo( this, data );
- addToList( e );
+ Container::VolPair ep = e->volPair( isEvmsMd );
+ y2mil( "md:" << ep.length() << " evms:" << e->numVolumes() );
+ if( ep.length()!=e->numVolumes() )
+ addToList( e );
+ else
+ delete e;
for( list<EvmsCont>::const_iterator i=data.cont.begin();
i!=data.cont.end(); ++i )
{
y2mil( "EVMS Container:" << *i );
- EvmsCo * e = new EvmsCo( this, *i, data );
+ e = new EvmsCo( this, *i, data );
addToList( e );
e->checkConsistency();
}
@@ -3820,6 +3836,8 @@
c.execute( "dmsetup remove \"" + table + "\"" );
waitForDevice();
ret = c.retcode()==0;
+ c.execute( "dmsetup table | grep \"" + table + "\"" );
+ logProcData();
}
y2milestone( "ret:%d", ret );
return( ret );
@@ -3839,6 +3857,20 @@
}
}
+void Storage::logProcData( const string& l )
+ {
+ y2mil( "begin:" << l );
+ ProcPart t;
+ AsciiFile md( "/proc/mdstat" );
+ for( unsigned i=0; i<md.numLines(); i++ )
+ y2mil( "mdstat:" << i+1 << ". line:" << md[i] );
+ AsciiFile mo( "/proc/mounts" );
+ for( unsigned i=0; i<mo.numLines(); i++ )
+ y2mil( "mounts:" << i+1 << ". line:" << mo[i] );
+ y2mil( "end" << l );
+ }
+
+
bool Storage::findVolume( const string& device, ContIterator& c,
VolIterator& v )
{
@@ -3912,6 +3944,22 @@
return( v!=p.end() );
}
+bool Storage::findVolume( const string& device, Volume const * &vol )
+ {
+ bool ret = false;
+ vol = NULL;
+ VolIterator v;
+ if( findVolume( device, v ))
+ {
+ vol = &(*v);
+ ret = true;
+ }
+ y2mil( "device:" << device << " ret:" << ret );
+ if( vol )
+ y2mil( "vol:" << *vol );
+ return( ret );
+ }
+
string Storage::findNormalDevice( const string& device )
{
string ret;
@@ -4705,12 +4753,14 @@
int Storage::waitForDevice() const
{
int ret = 0;
- char * prog = "/usr/bin/udev.count_events";
+ char * prog = "/sbin/udevsettle";
if( access( prog, X_OK )==0 )
{
- y2milestone( "calling prog:%s", prog );
- SystemCmd c( prog );
- y2milestone( "returned prog:%s retcode:%d", prog, c.retcode() );
+ string cmd( prog );
+ cmd += " --timeout=20";
+ y2milestone( "calling prog:%s", cmd.c_str() );
+ SystemCmd c( cmd );
+ y2milestone( "returned prog:%s retcode:%d", cmd.c_str(), c.retcode() );
}
y2milestone( "ret:%d", ret );
return( ret );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.56/libstorage/src/Storage.h new/yast2-storage-2.13.57/libstorage/src/Storage.h
--- old/yast2-storage-2.13.56/libstorage/src/Storage.h 2006-04-24 15:55:22.000000000 +0200
+++ new/yast2-storage-2.13.57/libstorage/src/Storage.h 2006-04-27 16:54:17.000000000 +0200
@@ -156,6 +156,7 @@
static bool testFilesEqual( const string& n1, const string& n2 );
void printInfo( std::ostream& str );
void logCo( Container* c );
+ void logProcData( const string& l="" );
storage::UsedByType usedBy( const string& dev );
bool setUsedBy( const string& dev, storage::UsedByType typ,
const string& name );
@@ -168,6 +169,7 @@
void rootMounted();
bool isRootMounted() const { return( root_mounted ); }
string findNormalDevice( const string& device );
+ bool findVolume( const string& device, Volume const* &vol );
virtual ~Storage();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.13.56/storage/src/modules/FileSystems.ycp new/yast2-storage-2.13.57/storage/src/modules/FileSystems.ycp
--- old/yast2-storage-2.13.56/storage/src/modules/FileSystems.ycp 2006-04-24 16:42:40.000000000 +0200
+++ new/yast2-storage-2.13.57/storage/src/modules/FileSystems.ycp 2006-04-27 16:53:44.000000000 +0200
@@ -7,7 +7,7 @@
* These module contains the supported filesystems and their settings.
*
*
- * $Id: FileSystems.ycp 30416 2006-04-24 14:42:24Z fehr $
+ * $Id: FileSystems.ycp 30551 2006-04-27 14:53:42Z fehr $
*/
{
module "FileSystems";
@@ -52,8 +52,8 @@
return( ret );
}
- global list<string> system_m_points = [ "/", Partitions::BootMount(), "/usr",
- "/var", "/opt" ];
+ global list<string> system_m_points = [ "/", "/usr", "/var", "/opt",
+ Partitions::BootMount() ];
global list<string> crypt_m_points = [ "/", Partitions::BootMount(), "/usr" ];
global list<string> suggest_m_points = (list<string>)union( system_m_points,
[ "/home", "/srv", "/tmp", "/local", ""] );
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...