[01:49] <Keybuk> Md: the CONFIG_SYSFS_DEPRECATED option makes some amount of difference
[01:49] <Keybuk> a bunch of stuff in /sys/class gets turned into symlinks and moves under /sys/devices instead
[01:49] <Keybuk> but doesn't seem to change /sys/block at all yet
[01:51] <Keybuk> interesting
[01:52] <Keybuk> initctl emit doesn't seem to always work
[01:52] <Keybuk> except the not working seems to be consistent
[02:06] <_ion> I'll try to get around to writing a small C tool that works like this: 'foo --dev /sys/block/sda/sda1' prints '/dev/sda1', 'foo --sys /dev/sda1' prints '/sys/block/sda/sda1', 'foo /dev/volumegroup/foo' prints '/sys/block/dm-0' (--sys is the default, as opposed to --dev), Both 'foo --slaves /sys/block/dm-0' and 'foo --slaves /dev/volumegroup/foo' print '/sys/block/md1', 'foo --physdev /dev/volumegroup/foo' prints '/sys/block/sda /sys/block/sdb', 'foo ...
[02:06] <_ion> ... --dev --physdev /dev/volumegroup/foo' prints '/dev/sda /dev/sdb'. Also --short would omit either the '/sys/block/' or the '/dev/' prefixes from the output.
[02:18] <Keybuk> where'd we use that?
[02:18] <Keybuk> assuming you generate the events from udev, you already have that information?
[02:19] <_ion> You have the information about what physical device any partition is, whether it's on LVM or MD or a combination of those?
[02:20] <_ion> device(s), that is.
[02:21] <Keybuk> it's quite hard to determine "physical device" for LVM or MD :p
[02:21] <Keybuk> it might be several
[02:21] <_ion> It's not hard, and one of the examples showed the tool printing several devices because of RAID. :-)
[02:23] <_ion> I did some prototyping for the functionality in sh,
[02:23] <_ion> % foo() { local syspath="${1#/sys/block/}"; syspath="${syspath%%/*}"; set -- $(ls -1 /sys/block/"$syspath"/slaves); if [ "$*" = "" ] ; then echo "$syspath"; else for file in "$@"; do foo "$(readlink -f /sys/block/"$syspath"/slaves/"$file")"; done; fi; }; for f in dm-0 md1 sda; do foo "$f" | xargs echo "$f":; done
[02:23] <_ion> dm-0: sda sdb
[02:24] <_ion> md1: sda sdb
[02:24] <_ion> sda: sda
[02:24] <_ion> Also: sda/sda1: sda
[02:29] <Keybuk> *nods*
i'm installing ubuntu edgy server edition, does anyone here know where it's default location for apache's DocumentRoot is if I select the LAMP server option?</off-topic>
[04:41] <wasabi> /var/www
[04:41] <AlexExtreme> thanks
[04:42] <wasabi> i assume there's some very compelling reason why you didn't just read /etc/apache2
[04:43] <AlexExtreme> i haven't installed it yet, i'm just asking because i need to know what to do with the partitions
[04:45] <_ion> http://tnx.nl/php.jpg
[04:45] <wasabi> haha nice
[04:46] <AlexExtreme> :P
[04:46] <wasabi> Oh. Use LVM.
[04:46] <wasabi> THen when I turn out to be wrong, you can fix it.
[04:46] <AlexExtreme> Yeah, I will :)
[06:51] <Keybuk> oh
[06:52] <Keybuk> so that's why it doesn't work if you try and emit an event that stops an instance job
[06:52] <Keybuk> Mar 11 17:51:42 wing-commander init: job.c:714: Assertion failed in job_change_goal: (! job->instance) || (job->instance_of != NULL)
[06:52] <Keybuk> Mar 11 17:51:42 wing-commander init: Caught abort, core dumped