On 09/06/16 17:43, Olaf Hering wrote:
> From: Jeff Mahoney
>
> This patch creates a sysfs group to export blkfront attribute via sysfs.
> For now, we just export the backend device name.
>
> This helps with migrating existing domU installation from a xenlinux
> based kernel to a pvops based kernel. The old blkfront driver did
> respect the vdev=hd|sd|xvd setting in domU.cfg, while the pvops blkfront
> driver enforce xvd as kernel device name.
>
> If for some reason the domU uses kernel devices names in configuration
> files like fstab, menu.lst, grub.cfg etc. the system may not startup
> properly after upgrading from a dist version with xenlinux based kernel
> to a newer one with pvops based kernel. With the new sysfs attribute
> /sys/block/*/blkfront/backend_dev udev can create a symlink /dev/hda to
> /dev/xvda using rules as shown below.
>
> The value of "vdev" is cached to avoid the load caused by constant
> rereading from the sysfs file.
>
> This might be added to systemd/rules/60-persistent-storage.rules:
> KERNEL=="xvd*[!0-9]", ATTRS{blkfront/backend_dev}=="hd[a-d]",
> SYMLINK+="$attr{blkfront/backend_dev}"
> KERNEL=="xvd*[0-9]", ATTRS{blkfront/backend_dev}=="hd[a-d]",
> SYMLINK+="$attr{blkfront/backend_dev}%n"
Why don't you get the udev rule to read the xenstore key directly instead?
David
___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel