All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dale Kemp <dale@inet.net.nz>
To: Linux LVM mailing list <linux-lvm@msede.com>
Subject: [linux-lvm] LVM /dev and /proc problems and change proposal
Date: Sun, 25 Jun 2000 18:35:52 +1200	[thread overview]
Message-ID: <3955A848.D5071D8E@inet.net.nz> (raw)

Hi all,

I've started using LVM thanks to Daniel Mehrmann 2.2.16 kernel patch
and the debian lvm package (apt-get install lvm). I notice that vg's and

lv's are created in /dev this means the volume name is limited since it
could
clash with similar named devices in the /dev directory. For example:

# ls -l /dev/par0
crw-rw----    1 root     lp         6,   0 Feb 23  1999 /dev/par0

# pvscan
pvscan -- reading all physical volumes (this may take a while...)
pvscan -- ACTIVE   PV "/dev/hda6" of VG "vdisk1" [3 GB / 3 GB free]
pvscan -- inactive PV "/dev/hde5"  is in no VG  [762.86 MB]
pvscan -- inactive PV "/dev/hde6"  is in no VG  [285.93 MB]
pvscan -- total: 3 [4.02 GB] / in use: 1 [3 GB] / in no VG: 2 [1.02 GB]

(create a volume group called par0)

# vgcreate par0 /dev/hde6
vgcreate -- INFO: using default physical extent size 4 MB
vgcreate -- INFO: maximum logical volume size is 255.99 Gigabyte
vgcreate -- doing automatic backup of volume group "par0"
vgcreate -- volume group "par0" successfully created and activated

# ls -ld /dev/par0
dr-xr-xr-x    2 root     root         1024 Jun 25 17:20 /dev/par0

Ouch! The device has been replace with a directory! Just adding
protection here doesn't solve the problem of potential name clashes.
I think the solution is to store these names in /etc/lvm* and use
another directory level in /dev.

e.g.. /dev/lvm/
      |
      +---- lvm (109,0)
      |
      +---- <name1> +---- group (109,0)
      |             |
      |             +---- <lv_name1> (58,0)
      |             +---- <lv_name2> (58,1)
      |
      +---- <name2> +---- group (109,1)
      |             |
      |             +---- <lv_name3> (58,2)
      |
      +---- etc (not needed if add vg_ and lv_ to above names)
            |
            +---- future_item (890,0)

OR...

    /dev/lvm
      |
      |
      +-- <name1> (109,0) [optional forced vg_ prefix to stop
name-clash]
      +-- <name2> (109,1)
      |
      +-- <name1> (58,0) [optional forced lv_ prefix to stop name-clash]

      +-- <name2> (58,1)
      +-- <name3> (58,2)
      |
      +-- future_item (890,0)

OR... (my favorite)

    /dev/lvm
      |
      |
      +-- pv (example to show future expansion options)
      |    |
      |    +-- pv0 --> /dev/hda6
      |    +-- pv1 --> /dev/hde5
      |    +-- pv2 --> /dev/hde6
      |
      +-- vg
      |    |
      |    +-- <name1> (109,0)
      |    +-- <name2> (109,1)
      |
      +-- lv
      |    |
      |    +-- <name1> (58,0)
      |    +-- <name2> (58,1)
      |    +-- <name3> (58,2)
      |
      +-- future_item (890,0)

I use the prefix 'vg_' and 'lv_' to stop any future name clashes. I
don't see
it being a good idea to list lv under the vg's since you might allow the
transfer
of lv's between vg's. We use the tools to find out more info, or create
readable
files in /etc/...

Also I think there should be a sub-directory for lvm itself in /proc
ie. /proc/lvm/lvm instead of /proc/lvm.

Example:

    # pvcreate /dev/hde[56]
    # vgcreate vdisk2 /dev/hde5 /dev/hde6
    # lvcreate -n XFilesVol -L 150M vdisk2
    # mke2fs /dev/lvm/lv/XFilesVol
    # mount -t ext2 /dev/lvm/lv/XFileVol /mnt/XFiles

The current system has name space problems and will be more difficult to
extend
in the future.

-- Dale (dale@sclnz.com)

             reply	other threads:[~2000-06-25  6:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-25  6:35 Dale Kemp [this message]
2000-06-25  8:30 ` [linux-lvm] LVM /dev and /proc problems and change proposal Heinz J. Mauelshagen
2000-06-25 10:01   ` Dale Kemp
2000-06-25 11:16     ` Heinz J. Mauelshagen
2000-06-25 11:35       ` Dale Kemp
     [not found]       ` <3956DF94.218CA65E@inet.net.nz>
2000-06-26  7:13         ` Heinz J. Mauelshagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3955A848.D5071D8E@inet.net.nz \
    --to=dale@inet.net.nz \
    --cc=linux-lvm@msede.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.