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:
Troy Dawson <[log in to unmask]>
Reply To:
Troy Dawson <[log in to unmask]>
Date:
Tue, 4 Sep 2007 14:28:27 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (97 lines)
Hi William,
I would start by burning myself a copy of SL 5.0 Live CD.
ftp://ftp.scientificlinux.org/linux/scientific/livecd/50/i386/livecd_SL50_gnome_2007-05-25.iso
Boot into it.
All of the answers I have below relate to being in that.

William Shu wrote:
> Hi,
> I want to move over from Redhat 9.0 to Scientific Linux 5.0, 
> (2.6.18-8.1.3.el5) on my laptop and desktop, but I am having some 
> problems which essentially seem to be linked to access to harddrive or 
> 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?
> I have a logical volume on my harddrive, which I want ot reduce in size 
> so as to make room for a new vfat partition. Unfortunately, the logical 
> volume (/dev/VolGroup00/LogVol00), which contains the operating system, 
> must be unmounted before I can use the graphical lvm facility on it! 
> Using the SL 5.0 rescue CD, I decide to reduce it manually, after 
> browsing the RedHat's Cluster_Logical Volume Management document. 
> Commands given are [roughly]:
> 
>    sh-3.1# lvm
>    lvm> lvscan
>      inactive          '/dev/VolGroup00/LogVol00' [70.16 GB] inherit
>      inactive          '/dev/VolGroup00/LogVol01' [1.94 GB] inherit
>    lvm> lvchange -aly /dev/VolGroup00/LogVol00
>    lvm> lvscan
>      ACTIVE            '/dev/VolGroup00/LogVol00' [70.16 GB] inherit
>      inactive          '/dev/VolGroup00/LogVol01' [1.94 GB] inherit
>    lvm> lvreduce --size -10G -r /dev/VolGroup00/LogVol00
>      fsadm: execlp failed: No such file or directory
>      fsadm failed: 2
>    lvm>
> 
> The problem seems to be deficulties in resizing file systems (from the 
> -r flag to lvreduce).
> 

Use  system-config-lvm

> 
> 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

> 
> 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.
Note:  Doing an fsck on a corrupt file system does not bring data back.  It 
might actually remove the data you want.

> 
> 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.

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.

Troy

-- 
__________________________________________________
Troy Dawson  [log in to unmask]  (630)840-6468
Fermilab  ComputingDivision/LCSI/CSI DSS Group
__________________________________________________

ATOM RSS1 RSS2