SCIENTIFIC-LINUX-USERS Archives

September 2007

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
William Shu <[log in to unmask]>
Reply To:
William Shu <[log in to unmask]>
Date:
Thu, 6 Sep 2007 14:47:14 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (158 lines)
Thanks Troy,
I've made progress, but still have outstanding issues, as explained below.

...
> > media devices, given the logical volume management (LVM). (Also, I am
> > not too technical, and just want my machine to work without destroying
> > information!)
> >
> >
> > Q1) How do I resize an LVM logical partition? and its underlying file
> > system?

...

> >
> 
> Use  system-config-lvm
> 



I used system-config-lvm in the SL 5.0 Live CD to change the logical volume from the live CD. I have successfully reduced the size of the physical volume. However, the partition size in question (/dev/sda6) does not seem to have been reduced. fdisk and parted do not find free space to create a new partition, and gparted (free-standing) still shows the old partition size.

Question: why was the partition /dev/sda6 not automatically reduced in size, when the the physical volume was reduced? Do I manually reduce the partition to create the free space? Some of the interactions follow:

[root@slinux sluser]# lvm
lvm> pvresize --setphysicalvolumesize 63552M -vv /dev/sda6
      Setting global/locking_type to 1
      File-based locking selected.
      Setting global/locking_dir to /var/lock/lvm
    Using physical volume(s) on command line

      ...

      /dev/sda6: size is 151251912 sectors
    /dev/sda6: Pretending size is 130154496 not 151251912 sectors.
    Resizing physical volume /dev/sda6 from 2307 to 1985 extents.
    Resizing volume "/dev/sda6" to 130154112 sectors.
    Updating physical volume "/dev/sda6"
    Test mode: Skipping volume group backup.
      Unlocking /var/lock/lvm/V_VolGroup00
  Physical volume "/dev/sda6" changed
  1 physical volume(s) resized / 0 physical volume(s) not resized
    Test mode: Wiping internal cache
    Wiping internal VG cache
lvm> 

[root@slinux sluser]# /sbin/fdisk /dev/sda

The number of cylinders for this disk is set to 14593.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

   ...

Command (m for help): n
No free sectors available

Command (m for help):         

...


> >
> > Q2) How do I *manually* mount the Linux LVM file?
> >  From the rescue CD, the 'conventional' commands do not work, presumably
> > because of wrong file type:
> >
> >    # mount -text3 /dev/mapper/VolGroup00/LogVol00 /mnt/anchor
> >    # mount -text3 /dev/VolGroup00/LogVol00 /mnt/anchor
> >    # mount -text3 VolGroup00/LogVol00 /mnt/anchor
> >    # mount -text3 /dev/sda6 /mnt/anchor        # physical partition is sda6.
> >
> 
> You aren't showing any error messages.  It's hard to know what the error is, if
> you don't show the messages.
> I personally would do
>    mount /dev/mapper/VolGroup00/LogVol00 /mnt/anchor
> 

[root@slinux sluser]# mount -text3 /dev/mapper/VolGroup00/LogVol00 /mnt/anchor
mount:mounting /dev/mapper/VolGroup00/LogVol00 failed: No such file or directory
[root@slinux sluser]# mount -text3 /dev/VolGroup00/LogVol00 /mnt/anchor
mount:mounting /dev/VolGroup00/LogVol00 failed: No such file or directory

[root@slinux sluser]# mount -text3 VolGroup00/LogVol00 /mnt/anchor
mount:mounting VolGroup00/LogVol00 failed: No such file or directory

[root@slinux sluser]# mount -text3 /dev/sda6 /mnt/anchor        # physical partition is sda6.
mount:mounting /dev/sda6 failed: No such file or directory



> >
> > Q3) How do I perform a file system check with LVM partitions?
> > I suspect I have a disk crash/bad sectors on my desktop but do not want
> > to loose information. fsck does not work, presumably because of wrong
> > file type, since I have to unmount the partition!
> >
> 
> again, you aren't showing any error messages.  fsck should work.

I had messages similar to the one below for various devices tried. (the copy below is hand-copied (as I do not know how to copy the screen nor mount a flash stick when in rescue mode.)

# e3fsck -fcvn /dev/VolGroup00/LogVol00
e3fsck: Command not found.

# fsck -fcvn
e2fsck 1.39 (29 May-2006)
e2fsck: No such file or directory when to trying to open /dev/VolGroup00/LogVol00. The superblock could not be read or does not describe the correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with alternate superbloc:
     e2fsck -b 8193 <device>.

> Note:  Doing an fsck on a corrupt file system does not bring data back.  It
> might actually remove the data you want.

Yes, but can help get rid of the od badblocks in crucial places. see further response below.

> 
> >
> > Q4) How can you control where you mount devices automatically  (e.g.,
> > flash sticks)?
> > The mountpoints are not indicated in /etc/fstab, and the config files
> > (*.conf) of automount and autofs do not seem to tell me where! In short
> > I do not understand how these or the hal (hardware abstraction layer) work!
> >
> 
> They get mounted in /media
> 
> I'll let others expain how to figure that out.

Is there some documentation that presents things in a coherent fashion. So far, I have drifted into finding out about udev, but things are just getting more elaborate!

> 
> Conclusion: If you are concerned that you have a bad disk, get another disk,
> install S.L. 5.0 on it, then try your hardest to get the data off the other
> disk.  If you have a bad disk, that is not the time to be trying updates and
> upgrades on the disk.

The hard disk is new and a test under windows (by a third party) did not show any defects before I started using it. Things where working smoothly then suddenly, files for the X windowing system went missing but I could boot on a text screen sometimes.
The good news is I recovered reasonable from backup, though I lost all the setting up the machine in ways I cannot repeat! fsck, say, may help me if it is just a question of bad blocks.
The good news is I recovered reasonable from backup, though I lost all the setting up of the machine in ways I cannot repeat!

In non-lvm file system you know where things are, and dd, fdisk and other commands let you take your chances. In lvm, I am lost and given the lagacy software in various partitions of the machine (a pentium II) I cannot add more disks or use RAID.

Thanks





       
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games.
http://sims.yahoo.com/

ATOM RSS1 RSS2