swap not turned on at boot
Rick Stevens
rstevens at vitalstream.com
Thu Dec 14 01:07:48 UTC 2006
On Wed, 2006-12-13 at 18:07 -0500, ron wrote:
> Rick,
>
> Can this header checksum be corrected?
>
> # /usr/sbin/lvdisplay
>
> File descriptor 11 left open
> File descriptor 12 left open
> File descriptor 13 left open
>
> Incorrect metadata area header checksum
Hmmm. That's a bit disturbing, that is. Repairing that isn't exactly
easy and you can blow things up in a great big hurry. What it looks
like is someone ran "mkswap" or fired up swap on your PV (physical
volume). In all probability, the PV was /dev/sda2, where gparted said
your swap was. This is one of the dangers of using non-LVM-aware tools
against LVM-based systems.
My recommendation is to do a full reinstall. I know, I know, you don't
want to, but you may have to anyway since if you make the tiniest little
mistake in the following stuff, it'll hose the system anyway.
1. Do a "swapoff -a" to disable swap. It looks like the data you gave
me before is bogus.
2. Edit /etc/fstab and remove any references to "swap" or /dev/sda2. We
do NOT want swap to start on this beast until we sort this out.
3. You must take a look at the file
"/etc/lvm/archive/VolGroup00_(highest-number).vg" and look for the
"pv0{" stanza. In there will be "device=" thing that gives you the raw
physical device that the VG was made up of. You need to grab the "id ="
string and recreate the PV using pvcreate:
# pvcreate --uuid "<id = string>" --restorefile
/etc/lvm/archive/VolumeGroupName_XXXXX.vg
<"device=" value>
(that should all be on one line. I wrapped it for readability).
Do NOT include the "<>" characters and replace the "XXXXX" with the
number of the .vg file. For example, on my machine, the file is
"/etc/lvm/archive/sys_vg_00000.vg". In there, I find:
physical_volumes {
pv0 {
id = "ecTyyn-waBk-HSIN-eMDZ-fLQX-KX1h-zMw0od"
device = "/dev/hda2" # Hint only
status = ["ALLOCATABLE"]
pe_start = 384
pe_count = 3569 # 111.531 Gigabytes
}
}
So my pvcreate command would be:
#pvcreate --uuid "ecTyyn-waBk-HSIN-eMDZ-fLQX-KX1h-zMw0od"
--restorefile /etc/lvm/archive/sys_vg_00000.vg /dev/hda2
(again all on one line). As I said, this is EXTREMELY DANGEROUS to do.
4. Create a swap _file_ on one of your volumes and use it instead of a
partition.
> --- Logical volume ---
> LV Name /dev/VolGroup00/LogVol00
> VG Name VolGroup00
> LV UUID sBlZ56-28sj-2Qv2-IB50-XPLS-gRII-W0Q107
> LV Write Access read/write
> LV Status available
> # open 1
> LV Size 74.59 GB
> Current LE 2387
> Segments 1
> Allocation inherit
> Read ahead sectors 0
> Block device 253:0
>
> --- Logical volume ---
> LV Name /dev/VolGroup01/LogVol00
> VG Name VolGroup01
> LV UUID xsCAOz-Bk8k-AAhI-n7GA-zJVg-g661-4LSvqU
> LV Write Access read/write
> LV Status available
> # open 1
> LV Size 19.50 GB
> Current LE 624
> Segments 1
> Allocation inherit
> Read ahead sectors 0
> Block device 253:1
Well, it's rather obvious that you never had a /dev/VolGroup00/LogVol01
device to use as swap, so that's why it never got turned on.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer rstevens at vitalstream.com -
- VitalStream, Inc. http://www.vitalstream.com -
- -
- You know you've landed gear-up when it takes full power to taxi. -
- -- Chuck Yeager -
----------------------------------------------------------------------
More information about the fedora-list
mailing list