[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[linux-lvm] LVM minor number allocation policy



Hi all,

Here are a few questions that I had related to minor numbers of
logical volumes (LVs). First the questions, and then I will explain
the reason why I ask these questions -

[1] Suppose I create two LVs named vol1 and vol2. They have the
following (major, minor) no.s. vol1 = (major=X, minor=0) and vol2 =
(major=X, minor=1). Now I reboot the system. Is it guaranteed that
vol1 and vol2 will retain their minor no.s?

[2] Are there some options while creating LVs that we can use so that
LVs are created with a particular minor number?

[3] Suppose it is not guaranteed that LVs retain their minor numbers
across system reboots. When the system is coming up, what policy it
uses to assign minor numbers to LVs. For example, it could be based on
any one of the following -
    1. sort order of names of LVs.
    2. Timestamp of creation of LVs.
    3. Random

Why I ask these:
The issue of minor number remaining same is relevant to services being
"highly available". In my case, it happens to be the NFS exported file
system. The NFS file handle includes, among other things, the minor
no. of the device on which the exported file system resides. In case
the minor no. of LV is different on the failed-over-to system, we get
the problem of stale file handles.

Hence, I wanted to know how minor numbers are treated by LVM.

-- 
Best Wishes,
Aditya Kulkarni


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]