TenForward

技術ブログ。はてなダイアリーから移転しました

Plamo Linux で lvm メモ

4.72 の話.

  • デフォルトで入っているツールは readline4 がないとかで動かない (5 にリンクすれば動くのかも?)
  • ftp://plamo.linet.gr.jp/pub/Plamo-test/for-4.7x/lvm2-2.02.66-i586-P1.tgz を作成してみた.
  • /etc/rc.d/rc.modules で dm-mod と dm-snapshot を modprobe してみた (他にも必要な可能性あり)
  • pvcreate, vgcreate, lvcreate は成功し,無事 /dev/vgname/lvname で見えてマウント可能になった (もちろん mkfs してる).
  • /etc/rc.d/rc.S を修正し,起動時に Volume Group を有効にする処理を追加.
--- rc.S.dist	2010-06-02 18:27:26.000000000 +0900
+++ rc.S	2010-06-02 18:33:41.000000000 +0900
@@ -251,6 +251,20 @@
 mkdir /tmp/.ICE-unix
 chmod 1777 /tmp/.ICE-unix
 
+# lvm
+if [ -x /sbin/lvm.static ]; then
+    echo "Starting LVM volume groups..."
+    /sbin/lvm.static vgchange -a y
+
+    if [ $? -gt 0 ]; then
+        echo "*** An error occurred during the LVM startup"
+	/sbin/sulogin
+	echo "Exited from the single-user shell."
+	echo -n "Press ENTER to continue: "
+	read junk
+    fi
+fi
+
 # Check the integrity of the other filesystems.
 if [ -n "`/sbin/mount -afnvt ext2,ext3,umsdos 2> /dev/null`" ]; then
     if [ ! -f /fastboot ]; then