On Fri, Apr 16, 2010 at 20:48, Goffredo Baroncelli <kreijack@xxxxxxxxx> wrote:
> Instead the first option has the disadvantage to need to be used for every new
> device.
> From this observation I write a udev rule which scan the new block devices,
> excluding floppy and cdrom.
>
> Below my udev rule
>
> $ cat /etc/udev/rules.d/60-btrfs.rules
>
> # ghigo 15/04/2010
>
> ACTION!="add|change", GOTO="btrfs_scan_end"
> SUBSYSTEM!="block", GOTO="btrfs_scan_end"
> KERNEL!="sd[!0-9]*|hd[!0-9]*", GOTO="btrfs_scan_end"
>
> IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
Udev needs to do this already anyway. People are not encouraged to
call this in their own rule files again. Just make sure you place the
rule after the existing standard call that always comes with udev. The
btrfs rules can just depend on the variable set in the environment.
Also there are more devices than sd* which could have a btrfs volume,
but this is also covered by the standard udev call to blkid.
Thanks,
Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html