Commit 2829a935 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by James Bottomley

[PATCH] remove LVM1 leftovers from the tree

Now that the devicemapper hit the tree there's no more reason
to keep the uncompiling LVM1 code around and it's various hacks
to other files around, this patch removes it.
parent adf283f2
......@@ -28,8 +28,6 @@ IO-mapping.txt
- how to access I/O mapped memory from within device drivers.
IRQ-affinity.txt
- how to select which CPU(s) handle which interrupt events on SMP.
LVM-HOWTO
- info on setting up logical volume management (virtual disks etc.)
README.DAC960
- info on Mylex DAC960/DAC1100 PCI RAID Controller Driver for Linux
README.moxa
......
......@@ -114,9 +114,6 @@ Architectural changes
DevFS is now in the kernel. See Documentation/filesystems/devfs/* in
the kernel source tree for all the gory details.
The Logical Volume Manager (LVM) is now in the kernel. If you want to
use this, you'll need to install the necessary LVM toolset.
32-bit UID support is now in place. Have fun!
Linux documentation for functions is transitioning to inline
......@@ -330,10 +327,6 @@ Xfsprogs
--------
o <ftp://oss.sgi.com/projects/xfs/download/cmd_tars/xfsprogs-2.1.0.src.tar.gz>
LVM toolset
-----------
o <http://www.sistina.com/lvm/>
Pcmcia-cs
---------
o <ftp://pcmcia-cs.sourceforge.net/pub/pcmcia-cs/pcmcia-cs-3.1.21.tar.gz>
......
Heinz Mauelshagen's LVM (Logical Volume Manager) howto. 02/10/1999
Abstract:
---------
The LVM adds a kind of virtual disks and virtual partitions functionality
to the Linux operating system.
It achieves this by adding an additional layer between the physical peripherals
and the i/o interface in the kernel.
This allows the concatenation of several disk partitions or total disks
(so-called physical volumes or PVs) or even multiple devices
to form a storage pool (so-called Volume Group or VG) with
allocation units called physical extents (called PE).
You can think of the volume group as a virtual disk.
Please see scenario below.
Some or all PEs of this VG then can be allocated to so-called Logical Volumes
or LVs in units called logical extents or LEs.
Each LE is mapped to a corresponding PE.
LEs and PEs are equal in size.
Logical volumes are a kind of virtual partitions.
The LVs can be used through device special files similar to the known
/dev/sd[a-z]* or /dev/hd[a-z]* named /dev/VolumeGroupName/LogicalVolumeName.
But going beyond this, you are able to extend or reduce
VGs _AND_ LVs at runtime!
So...
If for example the capacity of a LV gets too small and your VG containing
this LV is full, you could add another PV to that VG and simply extend
the LV afterwards.
If you reduce or delete a LV you can use the freed capacity for different
LVs in the same VG.
The above scenario looks like this:
/------------------------------------------\
| /--PV2---\ VG 1 /--PVn---\ |
| |-VGDA---| |-VGDA-- | |
| |PE1PE2..| |PE1PE2..| |
| | | ...... | | |
| | | | | |
| | /-----------------------\ | |
| | \-------LV 1------------/ | |
| | ..PEn| | ..PEn| |
| \--------/ \--------/ |
\------------------------------------------/
PV 1 could be /dev/sdc1 sized 3GB
PV n could be /dev/sde1 sized 4GB
VG 1 could be test_vg
LV 1 could be /dev/test_vg/test_lv
VGDA is the volume group descriptor area holding the LVM metadata
PE1 up to PEn is the number of physical extents on each disk(partition)
Installation steps see INSTALL and insmod(1)/modprobe(1), kmod/kerneld(8)
to load the logical volume manager module if you did not bind it
into the kernel.
Configuration steps for getting the above scenario:
1. Set the partition system id to 0x8e on /dev/sdc1 and /dev/sde1.
2. do a "pvcreate /dev/sd[ce]1"
For testing purposes you can use more than one partition on a disk.
You should not use more than one partition because in the case of
a striped LV you'll have a performance breakdown.
3. do a "vgcreate test_vg /dev/sd[ce]1" to create the new VG named "test_vg"
which has the total capacity of both partitions.
vgcreate activates (transfers the metadata into the LVM driver in the kernel)
the new volume group too to be able to create LVs in the next step.
4. do a "lvcreate -L1500 -ntest_lv test_vg" to get a 1500MB linear LV named
"test_lv" and it's block device special "/dev/test_vg/test_lv".
Or do a "lvcreate -i2 -I4 -l1500 -nanother_test_lv test_vg" to get a 100 LE
large logical volume with 2 stripes and stripesize 4 KB.
5. For example generate a filesystem in one LV with
"mke2fs /dev/test_vg/test_lv" and mount it.
6. extend /dev/test_vg/test_lv to 1600MB with relative size by
"lvextend -L+100 /dev/test_vg/test_lv"
or with absolute size by
"lvextend -L1600 /dev/test_vg/test_lv"
7. reduce /dev/test_vg/test_lv to 900 logical extents with relative extents by
"lvreduce -l-700 /dev/test_vg/test_lv"
or with absolute extents by
"lvreduce -l900 /dev/test_vg/test_lv"
9. rename a VG by deactivating it with
"vgchange -an test_vg" # only VGs with _no_ open LVs can be deactivated!
"vgrename test_vg whatever"
and reactivate it again by
"vgchange -ay whatever"
9. rename a LV after closing it by
"lvchange -an /dev/whatever/test_lv" # only closed LVs can be deactivated
"lvrename /dev/whatever/test_lv /dev/whatever/whatvolume"
or by
"lvrename whatever test_lv whatvolume"
and reactivate it again by
"lvchange -ay /dev/whatever/whatvolume"
10. if you own Ted Tso's/Powerquest's resize2fs program, you are able to
resize the ext2 type filesystems contained in logical volumes without
destroyiing the data by
"e2fsadm -L+100 /dev/test_vg/another_test_lv"
......@@ -188,5 +188,3 @@ Code Seq# Include File Comments
0xB1 00-1F PPPoX <mailto:mostrows@styx.uwaterloo.ca>
0xCB 00-1F CBM serial IEC bus in development:
<mailto:michael.klein@puffin.lb.shuttle.de>
0xFE 00-9F Logical Volume Manager <mailto:linux-lvm@sistina.com>
......@@ -990,12 +990,6 @@ L: ldm-devel@lists.sourceforge.net
W: http://ldm.sourceforge.net
S: Maintained
LOGICAL VOLUME MANAGER
P: Heinz Mauelshagen
L: linux-LVM@sistina.com
W: http://www.sistina.com/lvm
S: Maintained
LSILOGIC/SYMBIOS/NCR 53C8XX and 53C1010 PCI-SCSI drivers
P: Gerard Roudier
M: groudier@free.fr
......
CONFIG_BLK_DEV_LVM
This driver lets you combine several hard disks, hard disk
partitions, multiple devices or even loop devices (for evaluation
purposes) into a volume group. Imagine a volume group as a kind of
virtual disk. Logical volumes, which can be thought of as virtual
partitions, can be created in the volume group. You can resize
volume groups and logical volumes after creation time, corresponding
to new capacity needs. Logical volumes are accessed as block
devices named /dev/VolumeGroupName/LogicalVolumeName.
For details see <file:Documentation/LVM-HOWTO>. You will need
supporting user space software; location is in
<file:Documentation/Changes>.
If you want to compile this support as a module ( = code which can
be inserted in and removed from the running kernel whenever you
want), say M here and read <file:Documentation/modules.txt>. The
module will be called lvm-mod.o.
CONFIG_MD
Support multiple physical spindles through a single logical device.
Required for RAID and logical volume management (LVM).
Required for RAID and logical volume management.
CONFIG_BLK_DEV_MD
This driver lets you combine several hard disk partitions into one
......
......@@ -12,8 +12,6 @@ dep_tristate ' RAID-0 (striping) mode' CONFIG_MD_RAID0 $CONFIG_BLK_DEV_MD
dep_tristate ' RAID-1 (mirroring) mode' CONFIG_MD_RAID1 $CONFIG_BLK_DEV_MD
dep_tristate ' RAID-4/RAID-5 mode' CONFIG_MD_RAID5 $CONFIG_BLK_DEV_MD
dep_tristate ' Multipath I/O support' CONFIG_MD_MULTIPATH $CONFIG_BLK_DEV_MD
dep_tristate ' Logical volume manager (LVM) support' CONFIG_BLK_DEV_LVM $CONFIG_MD
dep_tristate ' Device mapper support' CONFIG_BLK_DEV_DM $CONFIG_MD
endmenu
......@@ -3,7 +3,6 @@
#
export-objs := md.o xor.o dm-table.o dm-target.o
lvm-mod-objs := lvm.o lvm-snap.o lvm-fs.o
dm-mod-objs := dm.o dm-table.o dm-target.o dm-linear.o dm-stripe.o \
dm-ioctl.o
......@@ -18,7 +17,6 @@ obj-$(CONFIG_MD_RAID1) += raid1.o
obj-$(CONFIG_MD_RAID5) += raid5.o xor.o
obj-$(CONFIG_MD_MULTIPATH) += multipath.o
obj-$(CONFIG_BLK_DEV_MD) += md.o
obj-$(CONFIG_BLK_DEV_LVM) += lvm-mod.o
obj-$(CONFIG_BLK_DEV_DM) += dm-mod.o
include $(TOPDIR)/Rules.make
......
This diff is collapsed.
/*
* kernel/lvm-internal.h
*
* Copyright (C) 2001 Sistina Software
*
*
* LVM driver is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* LVM driver is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNU CC; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*/
/*
* Changelog
*
* 05/01/2001:Joe Thornber - Factored this file out of lvm.c
*
*/
#ifndef LVM_INTERNAL_H
#define LVM_INTERNAL_H
#include <linux/lvm.h>
#define _LVM_INTERNAL_H_VERSION "LVM "LVM_RELEASE_NAME" ("LVM_RELEASE_DATE")"
/* global variables, defined in lvm.c */
extern char *lvm_version;
extern ushort lvm_iop_version;
extern int loadtime;
extern const char *const lvm_name;
extern vg_t *vg[];
extern struct file_operations lvm_chr_fops;
extern struct block_device_operations lvm_blk_dops;
/* debug macros */
#ifdef DEBUG_IOCTL
#define P_IOCTL(fmt, args...) printk(KERN_DEBUG "lvm ioctl: " fmt, ## args)
#else
#define P_IOCTL(fmt, args...)
#endif
#ifdef DEBUG_MAP
#define P_MAP(fmt, args...) printk(KERN_DEBUG "lvm map: " fmt, ## args)
#else
#define P_MAP(fmt, args...)
#endif
#ifdef DEBUG_KFREE
#define P_KFREE(fmt, args...) printk(KERN_DEBUG "lvm kfree: " fmt, ## args)
#else
#define P_KFREE(fmt, args...)
#endif
#ifdef DEBUG_DEVICE
#define P_DEV(fmt, args...) printk(KERN_DEBUG "lvm device: " fmt, ## args)
#else
#define P_DEV(fmt, args...)
#endif
/* lvm-snap.c */
int lvm_get_blksize(kdev_t);
int lvm_snapshot_alloc(lv_t *);
int lvm_snapshot_fill_COW_page(vg_t *, lv_t *);
int lvm_snapshot_COW(kdev_t, ulong, ulong, ulong, vg_t *vg, lv_t *);
int lvm_snapshot_remap_block(kdev_t *, ulong *, ulong, lv_t *);
void lvm_snapshot_release(lv_t *);
int lvm_write_COW_table_block(vg_t *, lv_t *);
void lvm_hash_link(lv_block_exception_t *, kdev_t, ulong, lv_t *);
int lvm_snapshot_alloc_hash_table(lv_t *);
void lvm_drop_snapshot(vg_t *vg, lv_t *, const char *);
/* lvm_fs.c */
void lvm_init_fs(void);
void lvm_fin_fs(void);
void lvm_fs_create_vg(vg_t *vg_ptr);
void lvm_fs_remove_vg(vg_t *vg_ptr);
devfs_handle_t lvm_fs_create_lv(vg_t *vg_ptr, lv_t *lv);
void lvm_fs_remove_lv(vg_t *vg_ptr, lv_t *lv);
void lvm_fs_create_pv(vg_t *vg_ptr, pv_t *pv);
void lvm_fs_remove_pv(vg_t *vg_ptr, pv_t *pv);
#endif
This diff is collapsed.
This diff is collapsed.
#ifndef _LINUX_KDEV_T_H
#define _LINUX_KDEV_T_H
#if defined(__KERNEL__) || defined(_LVM_H_INCLUDE)
#ifdef __KERNEL__
/*
As a preparation for the introduction of larger device numbers,
we introduce a type kdev_t to hold them. No information about
......@@ -136,7 +136,7 @@ static inline kdev_t to_kdev_t(int dev)
return mk_kdev(MAJOR(dev),MINOR(dev));
}
#else /* __KERNEL__ || _LVM_H_INCLUDE */
#else /* __KERNEL__ */
/*
Some programs want their definitions of MAJOR and MINOR and MKDEV
......@@ -145,5 +145,5 @@ from the kernel sources. These must be the externally visible ones.
#define MAJOR(dev) ((dev)>>8)
#define MINOR(dev) ((dev) & 0xff)
#define MKDEV(ma,mi) ((ma)<<8 | (mi))
#endif /* __KERNEL__ || _LVM_H_INCLUDE */
#endif /* __KERNEL__ */
#endif
#ifndef _LINUX_LIST_H
#define _LINUX_LIST_H
#if defined(__KERNEL__) || defined(_LVM_H_INCLUDE)
#ifdef __KERNEL__
#include <linux/prefetch.h>
#include <asm/system.h>
......@@ -319,6 +319,7 @@ static inline void list_splice_init(struct list_head *list,
for (pos = (head)->next, n = pos->next; pos != (head); \
pos = n, ({ read_barrier_depends(); 0;}), n = pos->next)
#endif /* __KERNEL__ || _LVM_H_INCLUDE */
#else
#warning "don't include kernel headers in userspace"
#endif /* __KERNEL__ */
#endif
This diff is collapsed.
......@@ -85,8 +85,6 @@
#define IDE4_MAJOR 56
#define IDE5_MAJOR 57
#define LVM_BLK_MAJOR 58 /* Logical Volume Manager */
#define SCSI_DISK1_MAJOR 65
#define SCSI_DISK2_MAJOR 66
#define SCSI_DISK3_MAJOR 67
......@@ -138,8 +136,6 @@
#define PHONE_MAJOR 100
#define LVM_CHAR_MAJOR 109 /* Logical Volume Manager */
#define RTF_MAJOR 150
#define RAW_MAJOR 162
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment