From: Keith Hopkins <hne@inetnow.net>
To: linux-lvm@sistina.com
Cc: dd92f55e6b3d2ae402d737983f92a268@interlinx.bc.ca
Subject: Re: [linux-lvm] how to determine if /dev/... is an LV?
Date: Thu, 23 Aug 2001 21:34:24 +0900 [thread overview]
Message-ID: <3B84F850.6030908@inetnow.net> (raw)
In-Reply-To: 20010822110154.O8742@pc.ilinx
>>>Also, is there any relationship between the output from the lvdisplay
>>>and the minor number for the device?
>>>
Yes.
example from lvdisplay for lvol1:
Block device 58:0
major 58: minor:0
If you look at the devices for, you may notice, hey, they match!
crw-r----- 1 root disk 109, 0 Aug 23 21:00 group
brw-rw---- 1 root disk 58, 0 Aug 23 21:04 lvol1
brw-rw---- 1 root disk 58, 1 Aug 23 21:03 lvol2
other correlation:
all minor numbers for char 109 (group files) are unique across the system.
all minor numbers for block 58 (lvols) are unique across the system.
without looking at the source, when it comes to recovering/rebuilding vg info in the file system, I am assuming that lvm doesn't really care about device files when it is recording info into the vg headers (vgda & such), and since the advent of UUIDs, I doubt if it really cares about minor numbers either.
here is an test layout I created just for the heck of it.
I created vga across /dev/sda1 & sda4, vgb on sda2, vgc on sda3.
I then lvcreated 3 times on vga,vgb,vgc in turn. [lvcreate -l 1 vg(a-c)]
I then lvremoved vga/lvol1.
I then lvcreated 3 times on vga,vgb,vgc in turn. (again)
the lvcreate makes default names for the lvols.
/dev/vga:
total 46
dr-xr-xr-x 2 root root 161 Aug 23 21:04 .
drwxr-xr-x 17 root root 46444 Aug 23 21:01 ..
crw-r----- 1 root disk 109, 0 Aug 23 21:00 group
brw-rw---- 1 root disk 58, 0 Aug 23 21:04 lvol1
brw-rw---- 1 root disk 58, 1 Aug 23 21:03 lvol2
brw-rw---- 1 root disk 58, 2 Aug 23 21:03 lvol3
brw-rw---- 1 root disk 58, 9 Aug 23 21:04 lvol4
brw-rw---- 1 root disk 58, 10 Aug 23 21:04 lvol5
interestingly enough, it recreated lvol1 here on the fourth lvcreate and started with the lowest minor number available (0), even though higher numbers had already been used.
/dev/vgb:
total 46
dr-xr-xr-x 2 root root 182 Aug 23 21:04 .
drwxr-xr-x 17 root root 46444 Aug 23 21:01 ..
crw-r----- 1 root disk 109, 1 Aug 23 21:00 group
brw-rw---- 1 root disk 58, 3 Aug 23 21:03 lvol1
brw-rw---- 1 root disk 58, 4 Aug 23 21:03 lvol2
brw-rw---- 1 root disk 58, 5 Aug 23 21:03 lvol3
brw-rw---- 1 root disk 58, 11 Aug 23 21:04 lvol4
brw-rw---- 1 root disk 58, 12 Aug 23 21:04 lvol5
brw-rw---- 1 root disk 58, 13 Aug 23 21:04 lvol6
/dev/vgc:
total 46
dr-xr-xr-x 2 root root 182 Aug 23 21:04 .
drwxr-xr-x 17 root root 46444 Aug 23 21:01 ..
crw-r----- 1 root disk 109, 2 Aug 23 21:00 group
brw-rw---- 1 root disk 58, 6 Aug 23 21:03 lvol1
brw-rw---- 1 root disk 58, 7 Aug 23 21:03 lvol2
brw-rw---- 1 root disk 58, 8 Aug 23 21:03 lvol3
brw-rw---- 1 root disk 58, 14 Aug 23 21:04 lvol4
brw-rw---- 1 root disk 58, 15 Aug 23 21:04 lvol5
brw-rw---- 1 root disk 58, 16 Aug 23 21:04 lvol6
This was all gone on a SuSE 7.1 system with the stock 2.2.18 kernel.
LVM 0.9 13/11/2000 (IOP 10)
Lost in Tokyo,
Keith
P.S. My, what a big e-mail address you have Grandma!
next prev parent reply other threads:[~2001-08-23 12:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-22 7:44 [linux-lvm] how to determine if /dev/... is an LV? Brian J. Murrell
2001-08-22 14:49 ` josv
2001-08-22 16:43 ` José Luis Domingo López
2001-08-22 15:01 ` Brian J. Murrell
2001-08-23 8:11 ` Heinz J . Mauelshagen
2001-08-23 12:34 ` Keith Hopkins [this message]
2001-08-23 15:48 ` Harald Milz
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=3B84F850.6030908@inetnow.net \
--to=hne@inetnow.net \
--cc=dd92f55e6b3d2ae402d737983f92a268@interlinx.bc.ca \
--cc=linux-lvm@sistina.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.