[CentOS-docs] HowTo activate LVs after reboot automatically

2008-11-30 Thread Alain Reguera Delgado
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello !

What to do if after reboot, your LVs get inactive ?

Maybe add the following to /etc/rc.local :

{{{
#
# Mounting MyLogVols
#
/usr/sbin/vgchange -a y MyVolGroup

for i in `ls /dev/Backup/`; do

e2fsck -p /dev/Backup/$i

case $? in
0)
mount -t ext3 /dev/MyVolGroup/$i/mnt/MyVolGroup/$i
;;
1)
mount -t ext3 /dev/MyVolGroup/$i/mnt/MyVolGroup/$i
;;
2)
/usr/bin/reboot
;;
esac

done
}}}

Other solutions ?

Could we document this issue on the wiki ?

Cheers,
- --
Alain Reguera Delgado [EMAIL PROTECTED]
GnuPG : http://ciget.cienfuegos.cu/~al/publickey.asc
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with CentOS - http://enigmail.mozdev.org

iD8DBQFJMpmHyXxCQEoXDZARArTGAKCjtR/Q/xPrhu0ycpXKJlqHJjCLAQCeMBug
TKdCSb/up0WJwInMT2TrLf4=
=i2V8
-END PGP SIGNATURE-
___
CentOS-docs mailing list
CentOS-docs@centos.org
http://lists.centos.org/mailman/listinfo/centos-docs


Re: [CentOS-docs] HowTo activate LVs after reboot automatically

2008-11-30 Thread Alain Reguera Delgado
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Alain Reguera Delgado wrote:
 Hello !
 
 What to do if after reboot, your LVs get inactive ?
 
 Maybe add the following to /etc/rc.local :
 
 {{{
 #
 # Mounting MyLogVols
 #
 /usr/sbin/vgchange -a y MyVolGroup
 
 for i in `ls /dev/MyVolGroup/`; do
 
 e2fsck -p /dev/MyVolGroup/$i
 
 case $? in
 0)
 mount -t ext3 /dev/MyVolGroup/$i/mnt/MyVolGroup/$i
 ;;
 1)
 mount -t ext3 /dev/MyVolGroup/$i/mnt/MyVolGroup/$i
 ;;
 2)
 /usr/bin/reboot
 ;;
 esac
 
 done
 }}}

Grrr ... the previous message script has some typos. Excuse me about
that. I think they are fixed now.

Cheers,
- --
Alain Reguera Delgado [EMAIL PROTECTED]
GnuPG : http://ciget.cienfuegos.cu/~al/publickey.asc
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with CentOS - http://enigmail.mozdev.org

iD8DBQFJMptGyXxCQEoXDZARAkM4AJ4kslEwcKpjuBPgdGiQtgWwQRmXCACeOB7J
ncWgNzyovAJKlEc2A3jWLR0=
=eSlr
-END PGP SIGNATURE-
___
CentOS-docs mailing list
CentOS-docs@centos.org
http://lists.centos.org/mailman/listinfo/centos-docs


Re: [CentOS-docs] HowTo activate LVs after reboot automatically

2008-11-30 Thread Tim Verhoeven
On Sun, Nov 30, 2008 at 2:55 PM, Alain Reguera Delgado
[EMAIL PROTECTED] wrote:

 What to do if after reboot, your LVs get inactive ?

 Maybe add the following to /etc/rc.local :

...snip...

 Grrr ... the previous message script has some typos. Excuse me about
 that. I think they are fixed now.

The standaard boot scripts should activate all LVM volume groups and
logical volumes at boot. And the automatic mounting should be done
using /etc/fstab. If this does not happen this is a bug and it should
be investigated.

Are you experiences this problem yourself ?

Regards,
Tim

-- 
Tim Verhoeven - [EMAIL PROTECTED] - 0479 / 88 11 83

Hoping the problem  magically goes away  by ignoring it is the
microsoft approach to programming and should never be allowed.
(Linus Torvalds)
___
CentOS-docs mailing list
CentOS-docs@centos.org
http://lists.centos.org/mailman/listinfo/centos-docs


Re: [CentOS-docs] HowTo activate LVs after reboot automatically

2008-11-30 Thread Alain Reguera Delgado
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Tim Verhoeven wrote:
 On Sun, Nov 30, 2008 at 2:55 PM, Alain Reguera Delgado
 [EMAIL PROTECTED] wrote:
 What to do if after reboot, your LVs get inactive ?

 Maybe add the following to /etc/rc.local :
...
 
 The standaard boot scripts should activate all LVM volume groups and
 logical volumes at boot. And the automatic mounting should be done
 using /etc/fstab. 

That's what I initially thought ... but got surprised when I reboot the
system. What I initially did was:

1. connect an external maxtor usb hdd.
2. initialize the device (pvcreate)
3. create a Backup volume group (vgcreate)
4. create logical volumes inside Backup volume group (lvcreate)
5. mkfs.ext3 to logical volumes inside Backup volume group.
5. create the mount points (mkdir /var/ftp/Backup/departament_name )
6. update /etc/fstab to add mount definitions.
7. mount partitions.
8. fix permissions.

It worked until the system was rebooted. When did so, the system stopped
and prompted me to add root password to correct the filesystem. I picked
the CentOS LiveCD, commented Backup logical volumes definitions in
/etc/fstab and after reboot the system booted up. Once inside the system
checked volumes with lvscan, all lv inside Backup volume group were
inactive.

 If this does not happen this is a bug and it should
 be investigated.

How could I help ?

 Are you experiences this problem yourself ?

Yep. I think so.

Cheers,
- --
Alain Reguera Delgado [EMAIL PROTECTED]
GnuPG : http://ciget.cienfuegos.cu/~al/publickey.asc
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with CentOS - http://enigmail.mozdev.org

iD8DBQFJMwqnyXxCQEoXDZARApCGAKC9wlpzc3fTOvDkv4+xxLLwFWNyjACg4zaV
fCi3BJe2COhk8CrW4pgEMxE=
=dUBi
-END PGP SIGNATURE-
___
CentOS-docs mailing list
CentOS-docs@centos.org
http://lists.centos.org/mailman/listinfo/centos-docs