:: Re: [Dng] What to do with udev? Som…
Etusivu
Poista viesti
Vastaa
Lähettäjä: karl
Päiväys:  
Vastaanottaja: dng
Aihe: Re: [Dng] What to do with udev? Some ideas...
Teodoro Santoni:
> On Fri, Dec 26, 2014 at 11:12:00PM +0100, karl@??? wrote:
> > thiagocmartinsc@???:
> > > I'm wondering here about what to do with `udev`, which is `systemd` in
> > > fact...
> > > What about this:
> > > 1- Rename current `udev` package to `systemd-udev`;
> > > 2- Add `vdev`;
> > > 3- Add `eudev`;
> > > 4- Add `mdev`;
> > > 4- Create a new Metapackage called `udev`, that will Depends on `eudev |
> > > vdev | mdev | systemd-udev`.
> >
> > I suggest:
> > 5- root maintains /dev manually
> > since a daemon for /dev isn't nessesary for a static system.
>
> How good cases like raid hotswap and pendrives are dealt under
> this 5th bullet point?


My scant knowlede about *dev is that they are about creating /dev/
nodes and (except mdev) setting up the physical device so it is
"usable".

To create a /dev/ node you use mknod or MAKEDEV (as usual).
When done the, the node is in the filesystem, you don't have to
recreate them.

For raid hotswap as in md-devices:
. for a running system, to replace a disk:
  e.g.
    mdadm /dev/md2 -f /dev/sdc1
    mdadm /dev/md2 -r /dev/sdc1
    -- replace the disk
    -- copy the partition table to the new disk
    mdadm /dev/md2 -a /dev/sdXX


to check which disks you have, you can use e.g. "sg_map -x -i"

. to boot from a md-device:
  disks with mbr partition tables: use kernel config CONFIG_MD_AUTODETECT=y
  or (for e.g. a gpt paritioned disk):
    add kernel boot command to specifying your root fs:
     md=2,/dev/sda2,/dev/sdb2,/dev/sdc2 root=/dev/md2
    then at /sbin/init time create the rest of the raid devices
  or use a suitable initram


Havn't tried with anything fancier.

For a pendrive (assuming you mean a USB flash disk):
root "knows" that any new usb-storage things shows up as /dev/sdXX
by "experience": add
/dev/sdXX /pendrive auto defaults,user,noauto 0 0
or similar to your fstab; mount manually as needed.

> You've caught my attention, like "if a device node manager isn't
> really needed if you can mount new things under 9fs or via san",
> it would really astonish me.


Don't know what 9fs is (is it http://v9fs.sf.net you are pointing to?).
I haven't tried mounting a network fs for some time, but nfs don't use
/dev, and neither did samba from what I remember. Where would a
device node manager enter ?

///

But given the fact that "cd /dev; mknod sda1 b 8 1",
"insmod usb-storage", "sg_map -x -i | grep -i kingston", etc.
arn't difficult to use. I conclude that *dev are not needed on
static systems.

Regards,
/Karl Hammar

-----------------------------------------------------------------------
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57