Difference between revisions of "LVM2"

From CBLFS
Jump to navigationJump to search
(Bootscript)
m (update download link)
 
(4 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
|-
 
|-
 
!Download Source:
 
!Download Source:
| ftp://sources.redhat.com/pub/lvm2/LVM2.{{Device-lvm2-Version}}.tgz
+
| ftp://sources.redhat.com/pub/lvm2/releases/LVM2.{{Device-lvm2-Version}}.tgz
 
|}
 
|}
  
Line 74: Line 74:
 
The following bootscript is only needed in a very specific situation, If you use an initramfs or some other early userspace to initialize lvm2 device nodes.  This script only runs '''vgscan --mknodes''' and reports the status of the command on start. If you need this functionality, install the bootscript with the following command:
 
The following bootscript is only needed in a very specific situation, If you use an initramfs or some other early userspace to initialize lvm2 device nodes.  This script only runs '''vgscan --mknodes''' and reports the status of the command on start. If you need this functionality, install the bootscript with the following command:
  
  cat > /etc/rc.d/init.d/lvm2 << EOF
+
  cat > /etc/rc.d/init.d/lvm2 << "EOF"
 
  #!/bin/bash
 
  #!/bin/bash
 
  ########################################################################
 
  ########################################################################
Line 94: Line 94:
 
   
 
   
 
  case "${1}" in
 
  case "${1}" in
start)
+
        start)
boot_mesg "Running vgscan mknodes..."
+
                boot_mesg "Running vgscan mknodes..."
/sbin/vgscan --mknodes
+
                /sbin/vgscan --mknodes
evaluate_retval
+
                evaluate_retval
;;
+
                ;;
*)
+
        *)
echo "Usage: ${0} {start}"
+
                echo "Usage: ${0} {start}"
exit 1
+
                exit 1
;;
+
                ;;
 
  esac
 
  esac
 
   
 
   
Line 108: Line 108:
 
  EOF
 
  EOF
 
  chmod 751 /etc/rc.d/init.d/lvm2
 
  chmod 751 /etc/rc.d/init.d/lvm2
  ln -s ../init.d /etc/rc.d/rcsysinit.d/S15lvm2
+
  ln -s ../init.d/lvm2 /etc/rc.d/rcsysinit.d/S16lvm2
  
 
[[Category:Block Device]]
 
[[Category:Block Device]]

Latest revision as of 03:17, 5 July 2011

Download Source: ftp://sources.redhat.com/pub/lvm2/releases/LVM2.2.02.43.tgz

Introduction to LVM2

Logical Volume Manager v2 is the updated version of LVM which supports +256 volumes and +2TB logical size.

Project Homepage: http://sourceware.org/lvm2/

Dependencies

Non-Multilib

Compile the package:

./configure --enable-cmdlib -enable-fsadm \
    --enable-dmeventd --disable-selinux &&
make

Install the package:

make install

Multilib

32Bit

Compile the package:

CC="gcc ${BUILD32}" ./configure --mandir=/usr/share/man \
    --enable-cmdlib --enable-fsadm \
    --enable-dmeventd --disable-selinux &&
make

Install the package:

make install

N32

Compile the package:

sed -i "/usrlibdir/s:/lib:&32:" configure && 
CC="gcc ${BUILDN32}" ./configure --mandir=/usr/share/man \
    --enable-cmdlib --enable-fsadm \
    --enable-dmeventd --libdir=/lib32 \
    --disable-selinux &&
make

Install the package:

make install

64Bit

Compile the package:

sed -i "/usrlibdir/s:/lib:&64:" configure && 
CC="gcc ${BUILD64}" ./configure --libdir=/lib64 \
    --mandir=/usr/share/man --enable-dmeventd \
    --enable-cmdlib --enable-fsadm \
    --enable-dmeventd --disable-selinux &&
make

Install the package:

make install

Confuration

Bootscript

The following bootscript is only needed in a very specific situation, If you use an initramfs or some other early userspace to initialize lvm2 device nodes. This script only runs vgscan --mknodes and reports the status of the command on start. If you need this functionality, install the bootscript with the following command:

cat > /etc/rc.d/init.d/lvm2 << "EOF"
#!/bin/bash
########################################################################
# Begin $rc_base/init.d/lvm2
#
# Description : Creates lvm2 nodes that may have been created in an
#               early userspace.
#
# Authors     : Joe Ciccone <jciccone@gmail.com>
#
# Version     : 00.01
#
# Notes       :
#
########################################################################

. /etc/sysconfig/rc
. ${rc_functions}

case "${1}" in
        start)
                boot_mesg "Running vgscan mknodes..."
                /sbin/vgscan --mknodes
                evaluate_retval
                ;;
        *)
                echo "Usage: ${0} {start}"
                exit 1
                ;;
esac

# End $rc_base/init.d/lvm2
EOF
chmod 751 /etc/rc.d/init.d/lvm2
ln -s ../init.d/lvm2 /etc/rc.d/rcsysinit.d/S16lvm2
Retrieved from "?title=LVM2&oldid=21201"