Accepting request 196827 from Virtualization

- Add support for lvm (bnc#837595)

OBS-URL: https://build.opensuse.org/request/show/196827
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libguestfs?expand=0&rev=4
This commit is contained in:
Stephan Kulow 2013-09-02 15:02:14 +00:00 committed by Git OBS Bridge
commit 0f8e75e274
4 changed files with 29 additions and 7 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Aug 29 21:36:08 CEST 2013 - ohering@suse.de
- Add support for lvm (bnc#837595)
-------------------------------------------------------------------
Thu Aug 22 11:36:24 CEST 2013 - ohering@suse.de

View File

@ -114,6 +114,12 @@ load_modules
# from libguestfs-1.19.34/appliance/init:
# Disk optimizations.
# Increase the SCSI timeout so we can read remote images.
for f in /sys/block/sd*/device/timeout; do if test -w $f ; then echo 300 > $f; fi; done
# https://access.redhat.com/site/solutions/5427
for f in /sys/block/{h,s,ub,v}d*/queue/scheduler; do if test -w $f ; then echo noop > $f; fi; done
# Scan for MDs.
mdadm -As --auto=yes --run
@ -123,22 +129,21 @@ echo -n >> /etc/lvm/lvm.conf
lvm vgscan --ignorelockingfailure
lvm vgchange -ay --ignorelockingfailure
# Improve virtio-blk performance (RHBZ#509383).
for f in /sys/block/vd*/queue/rotational; do if test -f $f ; then echo 1 > $f; fi ; done
# These are useful when debugging.
if grep -sq guestfs_verbose=1 /proc/cmdline; then
ls -lR /dev
head -n 1234 \
/proc/mounts \
/proc/mounts \
/proc/modules \
/proc/cpuinfo \
/proc/uptime \
/proc/version \
/proc/partitions
lvm pvs
lvm vgs
lvm lvs
for i in pvs vgs lvs
do
echo "# lvm $i:"
lvm $i
done
# ip a
# ip r
date

View File

@ -44,6 +44,17 @@ do
done
done
# copy needed rules
for rule in \
95-dm-notify.rules \
; do
if [ -f /lib/udev/rules.d/$rule ]; then
cp /lib/udev/rules.d/$rule $tmp_mnt/lib/udev/rules.d
elif [ -f /etc/udev/rules.d/$rule ]; then
cp /etc/udev/rules.d/$rule $tmp_mnt/etc/udev/rules.d
fi
done
# Need to create the modprobe.conf file to force read-write mode
if modinfo -k $kernel_version ext4 | grep -E '^parm:[[:blank:]]+rw:'
then

View File

@ -667,6 +667,7 @@ bash -x \
-i initramfs.${arch}.img \
-b $PWD/mkinitrd/boot_tmp \
-m "$additional_modules" \
-f "lvm2 dm md network nfs" \
-B
#
mkdir -vp $RPM_BUILD_ROOT%{_libdir}/guestfs