Bug 460823
Summary: | /sbin/mkinitrd: line 368: cd: slaves: No such file or directory | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Zbysek MRAZ <zmraz> |
Component: | mkinitrd | Assignee: | Peter Jones <pjones> |
Status: | CLOSED DUPLICATE | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 5.2 | CC: | aharrison, ebenes, jlaska, wilburn |
Target Milestone: | rc | Keywords: | Regression |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | RHBA-2008-0437 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2008-11-04 12:47:12 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 439371 | ||
Bug Blocks: |
Description
Zbysek MRAZ
2008-09-01 15:27:36 UTC
I ran into this bug while testing openvz which runs mkinitrd as part of its postinstall scriptlet. The solution in bz 439371 doesn't solve the problem because there is nothing to handle a non-existent 'slaves' directory. Similar to 439371, my directory layout is: $ find /sys/block/dm-0 /sys/block/dm-0/slaves/cciss\!c0d0p2/ | xargs ls --time-style "+" -Fogd drwxr-xr-x 4 0 /sys/block/dm-0/ -r--r--r-- 1 4096 /sys/block/dm-0/dev drwxr-xr-x 2 0 /sys/block/dm-0/holders/ -r--r--r-- 1 4096 /sys/block/dm-0/range -r--r--r-- 1 4096 /sys/block/dm-0/removable -r--r--r-- 1 4096 /sys/block/dm-0/size drwxr-xr-x 2 0 /sys/block/dm-0/slaves/ lrwxrwxrwx 1 0 /sys/block/dm-0/slaves/cciss!c0d0p2 -> ../../../block/cciss!c0d0/cciss!c0d0p2/ drwxr-xr-x 3 0 /sys/block/dm-0/slaves/cciss!c0d0p2// -r--r--r-- 1 4096 /sys/block/dm-0/slaves/cciss!c0d0p2/dev drwxr-xr-x 2 0 /sys/block/dm-0/slaves/cciss!c0d0p2/holders/ lrwxrwxrwx 1 0 /sys/block/dm-0/slaves/cciss!c0d0p2/holders/dm-0 -> ../../../../block/dm-0/ -r--r--r-- 1 4096 /sys/block/dm-0/slaves/cciss!c0d0p2/size -r--r--r-- 1 4096 /sys/block/dm-0/slaves/cciss!c0d0p2/start -r--r--r-- 1 4096 /sys/block/dm-0/slaves/cciss!c0d0p2/stat lrwxrwxrwx 1 0 /sys/block/dm-0/slaves/cciss!c0d0p2/subsystem -> ../../../block/ --w------- 1 4096 /sys/block/dm-0/slaves/cciss!c0d0p2/uevent -r--r--r-- 1 4096 /sys/block/dm-0/stat lrwxrwxrwx 1 0 /sys/block/dm-0/subsystem -> ../../block/ --w------- 1 4096 /sys/block/dm-0/uevent Here is my proposed fix. --- mkinitrd 2008-10-01 20:11:24.000000000 +0000 +++ mkinitrd 2008-10-01 20:38:20.000000000 +0000 @@ -365,6 +365,7 @@ if echo $PWD | grep -q "/sys/block/dm-[[:digit:]]$"; then while [ ! -L device ]; do if [ -L subsystem ]; then + [ ! -d slaves ] && break cd slaves for x in *;do if [ -L $x ]; then *** This bug has been marked as a duplicate of bug 447841 *** |