[lkml]   [2001]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [RFD w/info-PATCH] device arguments from lookup, partion code in userspace
    On Saturday 19 May 2001 13:37, Eric W. Biederman wrote:
    > For creating partitions you might want to do:
    > cat 1024 2048 > /dev/sda/newpartition

    How about:

    # mkpart /dev/sda /dev/mypartition -o size=1024k,type=swap
    # ls /dev/mypartition
    base size device type
    # cat /dev/mypartition/size
    # cat /dev/mypartition/device
    # mke2fs /dev/mypartition

    The information that was specified is persistent in /dev. We can
    rearrange our physical devices any way we want without affecting
    the name we chose in /dev. When the kernel enumerates devices
    at startup, our persistent information better match or we will have
    to take some corrective action.

    Generally, we shouldn't care which order the kernel enumerates
    devices in or which device number gets assigned internally. If we
    did need to care, we'd just do:

    # echo 666 >/dev/mypartition/number

    setting a persistent device minor number. The major number is
    inherited via the partition's /device property.

    To set the minor number back to 'don't care':

    # rm /dev/mypartition/number

    By taking the physical device off the top of the food chain we
    gain the flexibility of being able to move the device from bus to
    bus for example, and only the partition's device property
    changes, nothing in our fstab. It's no great leap to set things
    up so that not even the /device property would need to

    Note that we can have a heirarchy of partitions this way if
    we want to, since /dev/mypartition is just another block

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 12:53    [W:0.026 / U:24.304 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site