Lost logical volume upon system reboot.

Mansell, Gary Gary.Mansell at ricardo.com
Fri Jan 19 05:42:08 CST 2007


Dear all,

I have been stress testing a couple of Dell PE2950's attached to Dell
MD100 SAS arrays in preparation for putting them out as fileservers. The
machines are running up2date versions of RHEL 4 ES.

I have been stressing and rebooting the machines quite a lot in the
process but today when I rebooted one of them it has come back up and
can't find the logical volumes for the data on the MD1000 SAS array
(although it can find the logical volumes for the system partitions).

The MD1000 partitions and lvm config were setup using the following
procedure:


      * Partition the Storage Device:
        
parted /dev/sdb mklabel gpt

parted /dev/sdb print

parted /dev/sdb mkpart primary ext3 0 <end from above>

parted /dev/sdb set 1 lvm on


      * Create the Logical Volume Configuration

pvcreate /dev/sdb1

vgcreate -s 256m VG_DATA /dev/sdb1

vgchange -a y VG_DATA

vgdisplay

lvcreate -l 2048 VG_DATA -n APPS

lvcreate -l 4096 VG_DATA -n USER

lvcreate -l 8192 VG_DATA -n PROJ


      * Create the filesystems:

mke2fs -j -b 4096 -i 32768 -m 2 -O dir_index /dev/VG_DATA/APPS

mke2fs -j -b 4096 -i 32768 -m 2 -O dir_index /dev/VG_DATA/USER

mke2fs -j -b 4096 -i 32768 -m 2 -O dir_index /dev/VG_DATA/PROJ


      * Turn off filesystem consistency checking at mount time:

tune2fs -i0 -c0 /dev/VG_DATA/APPS

tune2fs -i0 -c0 /dev/VG_DATA/USER

tune2fs -i0 -c0 /dev/VG_DATA/PROJ


      * Label the partitions:

e2label /dev/VG_DATA/APPS APPS

e2label /dev/VG_DATA/APPS USER

e2label /dev/VG_DATA/APPS PROJ


      * Add the following lines in the /etc/fstab file for the new
        filesystems:

LABEL=APPS /usr2/apps ext3 defaults,noatime 1 2

LABEL=USER /usr2/userdata ext3 defaults,noatime 1 2

LABEL=PROJ /usr2/projdata ext3 defaults,noatime 1 2


      * Make the Storage mount points:

mkdir -p /usr2/apps /usr2/projdata /usr2/userdata


      * Mount the filesystems:

mount /usr2/apps /usr2/userdata /usr2/projdata


Is this correct?

Specifically, should I create the gpt partition /dev/sdb1 or should I
have just done a pvcreate of /dev/sdb and not performed the parted
commands?

I wonder about this, as when I do a vgscan -vv, I can see that it looks
at /dev/sdb (and finds nothing) but does not seem to scan /dev/sdb1. 

[root at dfgsrv2 ~]# vgscan -vv
      Setting global/locking_type to 1
      Setting global/locking_dir to /var/lock/lvm
      File-based locking enabled.
    Wiping cache of LVM-capable devices
    Wiping internal VG cache
  Reading all physical volumes.  This may take a while...
    Finding all volume groups
      /dev/ramdisk: size is 32768 sectors
      /dev/ramdisk: size is 32768 sectors
      /dev/ramdisk: No label detected
      /dev/sda: size is 142082048 sectors
      /dev/md0: size is 0 sectors
      /dev/root: size is 8388608 sectors
      /dev/root: size is 8388608 sectors
      /dev/root: No label detected
      /dev/ram: size is 32768 sectors
      /dev/ram: size is 32768 sectors
      /dev/ram: No label detected
      /dev/sda1: size is 64197 sectors
      /dev/sda1: size is 64197 sectors
      /dev/sda1: No label detected
      /dev/dm-1: size is 33554432 sectors
      /dev/dm-1: size is 33554432 sectors
      /dev/dm-1: No label detected
      /dev/ram2: size is 32768 sectors
      /dev/ram2: size is 32768 sectors
      /dev/ram2: No label detected
      /dev/sda2: size is 16787925 sectors
      /dev/sda2: size is 16787925 sectors
      /dev/sda2: lvm2 label detected
      /dev/dm-2: size is 41943040 sectors
      /dev/dm-2: size is 41943040 sectors
      /dev/dm-2: No label detected
      /dev/ram3: size is 32768 sectors
      /dev/ram3: size is 32768 sectors
      /dev/ram3: No label detected
      /dev/sda3: size is 1044225 sectors
      /dev/sda3: size is 1044225 sectors
      /dev/sda3: No label detected
      /dev/dm-3: size is 16777216 sectors
      /dev/dm-3: size is 16777216 sectors
      /dev/dm-3: No label detected
      /dev/ram4: size is 32768 sectors
      /dev/ram4: size is 32768 sectors
      /dev/ram4: No label detected
      /dev/sda4: size is 2 sectors
      /dev/dm-4: size is 16777216 sectors
      /dev/dm-4: size is 16777216 sectors
      /dev/dm-4: No label detected
      /dev/ram5: size is 32768 sectors
      /dev/ram5: size is 32768 sectors
      /dev/ram5: No label detected
      /dev/sda5: size is 124182387 sectors
      /dev/sda5: size is 124182387 sectors
      /dev/sda5: lvm2 label detected
      /dev/dm-5: size is 16777216 sectors
      /dev/dm-5: size is 16777216 sectors
      /dev/dm-5: No label detected
      /dev/ram6: size is 32768 sectors
      /dev/ram6: size is 32768 sectors
      /dev/ram6: No label detected
      /dev/dm-6: size is 1073741824 sectors
      /dev/dm-6: size is 1073741824 sectors
      /dev/dm-6: No label detected
      /dev/ram7: size is 32768 sectors
      /dev/ram7: size is 32768 sectors
      /dev/ram7: No label detected
      /dev/dm-7: size is 2147483648 sectors
      /dev/dm-7: size is 2147483648 sectors
      /dev/dm-7: No label detected
      /dev/ram8: size is 32768 sectors
      /dev/ram8: size is 32768 sectors
      /dev/ram8: No label detected
      /dev/dm-8: size is 4294967296 sectors
      /dev/dm-8: size is 4294967296 sectors
      /dev/dm-8: No label detected
      /dev/ram9: size is 32768 sectors
      /dev/ram9: size is 32768 sectors
      /dev/ram9: No label detected
      /dev/ram10: size is 32768 sectors
      /dev/ram10: size is 32768 sectors
      /dev/ram10: No label detected
      /dev/ram11: size is 32768 sectors
      /dev/ram11: size is 32768 sectors
      /dev/ram11: No label detected
      /dev/ram12: size is 32768 sectors
      /dev/ram12: size is 32768 sectors
      /dev/ram12: No label detected
      /dev/ram13: size is 32768 sectors
      /dev/ram13: size is 32768 sectors
      /dev/ram13: No label detected
      /dev/ram14: size is 32768 sectors
      /dev/ram14: size is 32768 sectors
      /dev/ram14: No label detected
      /dev/ram15: size is 32768 sectors
      /dev/ram15: size is 32768 sectors
      /dev/ram15: No label detected
      /dev/sdb: size is 7602962432 sectors
      Locking /var/lock/lvm/V_VolGroup_ID_28016 RB
    Finding volume group "VolGroup_ID_28016"
      /dev/sda2: lvm2 label detected
      /dev/sda5: lvm2 label detected
      /dev/sda5: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sda5: lvm2 label detected
      /dev/sda2: lvm2 label detected
  Found volume group "VolGroup_ID_28016" using metadata type lvm2
      Unlocking /var/lock/lvm/V_VolGroup_ID_28016


The MD1000 device is present on the system:

[root at dfgsrv2 ~]# parted /dev/sdb print
Disk geometry for /dev/sdb: 0.000-3712384.000 megabytes
Disk label type: gpt
Minor    Start       End     Filesystem  Name                  Flags
1          0.017 3712383.983                                    lvm
Information: Don't forget to update /etc/fstab, if necessary.


Its completely confusing me because I am sure I have rebooted this
machine several times with no problems - why should it loose the lvm
config for the external storage?

I have now got everything back again by re-running the commands that I
used to create the partitions and lvm configuration but I am very
concerned as this is a critical machine and I don't want problems with
it when it goes into production.

Any light that anyone can help shed on this matter is much appreciated.

Regards

Gary Mansell




-- 

This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this e-mail in error please notify the sender immediately
and delete this e-mail from your system.  Please note that any views or opinions
presented in this e-mail are solely those of the author and do not necessarily
represent those of Ricardo (save for reports and other documentation formally
approved and signed for release to the intended recipient).  Only Directors
or Duly Authorised Officers are authorised to enter into legally binding
obligations on behalf of Ricardo unless the obligation is contained within
a Ricardo Purchase Order.

Ricardo may monitor outgoing and incoming e-mails and other telecommunications
on its e-mail and telecommunications systems.  By replying to this e-mail you
give consent to such monitoring.  The recipient should check this e-mail and
any attachments for the presence of viruses.  Ricardo accepts no liability for
any damage caused by any virus transmitted by this e-mail.  "Ricardo" means
Ricardo plc and its subsidiary companies.

Ricardo plc is a public limited company registered in England with registered
number 00222915.
The registered office of Ricardo plc is Shoreham Technical Centre, Shoreham-by Sea,
West Sussex, BN43 5FG.
 



More information about the Linux-PowerEdge mailing list