Alasdair Kergon [Wed, 30 Jan 2002 15:33:12 +0000 (15:33 +0000)]
Basic support for (read-only) partial activation if any PVs are
missing from a VG. (Linear targets use the device-mapper 'error' target
which returns ioerror; striped targets use '/dev/ioerror' for now - which must
already exist e.g. as a sufficiently large block device version of /dev/zero).
Alasdair Kergon [Tue, 29 Jan 2002 17:23:33 +0000 (17:23 +0000)]
o Basic support for exporting (but importing not completed yet).
o When volume group does not have write flag set, prevent changes to it.
o Preparation for partial activation (not completed yet).
Alasdair Kergon [Fri, 25 Jan 2002 20:21:13 +0000 (20:21 +0000)]
Set pv->pe_size when reading in text-file backup.
Otherwise LVM1 decides the PV structure is corrupt.
But do we need to keep both pv->pe_size and vg->extent_size
in internal metadata or can we generate pvd->pe_size when writing out
a PV that belongs to a VG?
Alasdair Kergon [Thu, 24 Jan 2002 23:16:19 +0000 (23:16 +0000)]
Fix the device cache to cope reasonably safely with device name changes.
This should be a rare occurrence so the aim is to recover if it's
straightforward to do so, otherwise just to abort the operation.
If people *knowingly* change device names, they should always run vgscan
afterwards.
A few bytes of memory gets leaked inside a pool each time an alias
has to be discarded - it's not worth restructuring the code to reuse it.
More of LVM2 needs updating to pass device objects (or uuids) about
instead of pathnames so that resolution of pathname->object only happens
once per operation.
dev_cache_get() should now always return the *current* device at the path given
dev_name_confirmed() replaces dev_name() whenever it's important to
know that name for the device is still current (ie when opening it).
If the cache doesn't know a current name, the function fails.
dev_open() guarantees that the file descriptor returned is for the dev_t
of the device structure it was passed.
Alasdair Kergon [Wed, 23 Jan 2002 18:55:01 +0000 (18:55 +0000)]
o Remove redundant symlink-handling code.
o When opening device, return error if its cached name is incorrect (eg if
it's changed since the cache was generated). This prevents use until
the cache is rebuilt (eg with vgscan). Doesn't catch every case.
Alasdair Kergon [Thu, 17 Jan 2002 13:37:09 +0000 (13:37 +0000)]
Add another level of symlink to library name (like LVM1) so people who find
themselves running multiple incompatible kernel versions will just need
to swap symlinks at boot.
Alasdair Kergon [Thu, 17 Jan 2002 13:19:55 +0000 (13:19 +0000)]
Use additional version numbers.
Kernel driver has a version number (stored in kernel/VERSION).
The first two components of this (0.94) give the version number of the
ioctl interface. This number must be changed whenever a change is
made to the ioctl interface that breaks backwards compatibility.
The library has a version number (stored in VERSION) which is
used for linking.
The first and/or second component of this must be changed whenever
a change is made to the library API that breaks backwards
compatibility.
Alasdair Kergon [Wed, 16 Jan 2002 18:10:08 +0000 (18:10 +0000)]
o pvcreate --uuid to specify the uuid (required before using vgcfgrestore
onto a new device). uuid specified must not already exist on the system.
o More message tidying.
o When checking for label, only read PV metadata.
o Add ataraid. [Needs moving into config/defaults files.]
Alasdair Kergon [Tue, 15 Jan 2002 21:28:04 +0000 (21:28 +0000)]
o missing labeller free
o updated vgcfgrestore args
o change _check_for_open_devices only to check devices present in the hash
table instead of using dev_iter which triggers a full scan even when only
displaying command line help
Alasdair Kergon [Tue, 15 Jan 2002 15:21:57 +0000 (15:21 +0000)]
Another ioctl interface update:
Supply offset to start of variable data area (so struct size can change
without breaking backward compatibility)
Add command that just returns the driver version