FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Development

 
 
LinkBack Thread Tools
 
Old 02-03-2009, 12:04 PM
Hans de Goede
 
Default PATCH: Recognize /sys/block/dm-X as a devicemapper dev (and thus call handledm)

One of my last patches moved the checking for Volgroups to handledm, however
when the root device is specified in fstab as /dev/VolGroup00/Volume00,
handledm never gets called, as neither /dev/VolGroup00/Volume00 nor
/sys/block/dm-X are recognized as being dm by findstoragedriver ()

This patch fixes findstoragedriver () to recognize atleast /sys/block/dm-X
as dm.

p.s.

Why are we still calling findstoragedriver twice in cases like this ???
---
mkinitrd | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/mkinitrd b/mkinitrd
index 6f06084..fb1cf3f 100755
--- a/mkinitrd
+++ b/mkinitrd
@@ -389,14 +389,14 @@ findstoragedriver () {
continue
fi
vecho "Looking for driver for device $device"
+ if [[ "$device" =~ ^/sys ]]; then
+ device=${device##*/}
+ fi
if [[ "$device" =~ ^(dm-|mapper/) ]]; then
majmin=$(get_numeric_dev dec "/dev/$device")
sysfs=$(finddevnoinsys $majmin)
handledm $(echo "$majmin" |cut -d : -f 1) $(echo "$majmin" |cut
-d : -f 2)

else
- if [[ "$device" =~ ^/sys ]]; then
- device=${device##*/}
- fi
sysfs=""
device=$(echo "$device" | sed 's,/,!,g')
if [ -d /sys/block/$device/ ]; then
--
1.6.1.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 02-16-2009, 10:22 PM
David Cantrell
 
Default PATCH: Recognize /sys/block/dm-X as a devicemapper dev (and thus call handledm)

Hans de Goede wrote:
One of my last patches moved the checking for Volgroups to handledm,
however

when the root device is specified in fstab as /dev/VolGroup00/Volume00,
handledm never gets called, as neither /dev/VolGroup00/Volume00 nor
/sys/block/dm-X are recognized as being dm by findstoragedriver ()

This patch fixes findstoragedriver () to recognize atleast /sys/block/dm-X
as dm.


Looks fine, commit it.


p.s.

Why are we still calling findstoragedriver twice in cases like this ???
---
mkinitrd | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/mkinitrd b/mkinitrd
index 6f06084..fb1cf3f 100755
--- a/mkinitrd
+++ b/mkinitrd
@@ -389,14 +389,14 @@ findstoragedriver () {
continue
fi
vecho "Looking for driver for device $device"
+ if [[ "$device" =~ ^/sys ]]; then
+ device=${device##*/}
+ fi
if [[ "$device" =~ ^(dm-|mapper/) ]]; then
majmin=$(get_numeric_dev dec "/dev/$device")
sysfs=$(finddevnoinsys $majmin)
handledm $(echo "$majmin" |cut -d : -f 1) $(echo "$majmin"
|cut -d : -f 2)

else
- if [[ "$device" =~ ^/sys ]]; then
- device=${device##*/}
- fi
sysfs=""
device=$(echo "$device" | sed 's,/,!,g')
if [ -d /sys/block/$device/ ]; then



--
David Cantrell <dcantrell@redhat.com>
Red Hat / Honolulu, HI

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 06:43 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org