> > ----- Original Message ---- > From: Jon Peatfield <[log in to unmask]> > To: William Shu <[log in to unmask]> > Cc: Troy Dawson <[log in to unmask]>; [log in to unmask] > Sent: Friday, September 7, 2007 1:04:25 AM > Subject: Re: How do I perform manual or automatic mounts/accesses/repairs of hardisk/devices on SL 5.0 > <...> > > 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: > <snip use of pvresize> > > Because pvresize just alters the amount of space that LVM is allowed to > use. The pvresize manpage says: > > Shrink the PV on /dev/sda1 prior to shrinking the partition with > fdisk (ensure that the PV size is appropriate for your intended new > partition size): > > Altering the pv-size is an unusual operation. What are you actually > trying to do? If you just wanted to move some of the space from one lv to > another (in the same vg) then tools like system-config-lvm will let you do > that (though shrinking can't be done while a filesystem is live)... Wanted to create space for a vfat partition (ntfs is too risky) which will thus enable me transfer data between linux and windows. <...> > > [root@slinux sluser]# mount -text3 /dev/sda6 /mnt/anchor # physical partition is sda6. > > mount:mounting /dev/sda6 failed: No such file or directory > > is lvm active at this point? What do you get from running: > > vgscan > vgchange -tv -ay > pvdisplay -c > vgdisplay -c > lvdisplay -c > > BTW the error I'd expect if the device doesn't exist is: > > mount: special device /dev/VolGroup00/LogVol00 does not exist > > or if the mount-point doesn't exist I'd expect something like: > > mount: mount point /mnt/anchor does not exist Was working with the SL 5.0 rescue CD. The above vg* lv* pv* commands seemed to provide the desired information, but since another soln path has been used, I will not try to hand-copy them. > > >>> 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! > > Copy the raw disk/partitions off to somewhere safe before working on it if > there is anything 'valuable' on the disk. If the disk does have bad > sectors then a utility like ddrescue may be more helpful than plain dd. My worry here is that with lvm, you can no longer guarantee where information is found on the partition -- unless, perhaps, lvm is still in control!. While I have gotten yet another hard disk, and my immediate problem solved, I still want to be able to bypass lvm in the future, if need be. <...> > > <snip> > >>> 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! > > udev isn't really relevant except that it is involved in setting up the > devices when 'hotplug' stuff happens. > > The magic keyword to look for is 'hal' (or 'hald'). The hald keeps track > of hardware and presents APIs to access it (over d-bus I think). > > The shortish answer is that hal picks a mount-point based on info from the > device or file-system. Most commonly it will pick the volume-label if the > file-system has one (and it doesn't clash with an existing mount) and then > uses that under /media/ > > Applications like gnome-volume-manager speak to hald (over d-bus) to get > info about available devices and make requests to have things done (e.g. > mount or umount volumes). In fact g-v-m calls gnome-mount which speaks to > hal for it. From the command-line you can call gnome-mount directly if > you want, e.g. I may use: > > gnome-mount -p JSPDATA > > and it mounts my usb-stick (which has the volume-label JSPDATA), under > /media/JSPDATA/ and later I can say: > > gnome-mount --unmount -p JSPDATA > > to make it go away. If there isn't a suitable volume-label it probably > uses something else and I'm sure it you can find out what by reading hal's > .fdi files - ok I'm not really sure at all the behaviour might possibly be > hard-wired... You can ask hal to mount in a different place (still under > /media) and add mount options by adding extra options to the command-line: > > $ gnome-mount -p JSPDATA --mount-point ook > $ df -hl| grep media > /dev/sdb1 962M 4.3M 958M 1% /media/ook > thanks for the explanations, which have been very helpful. However, I still have the following difficulties: 1) I have tried changing the mount point using gnome-mount -p as shown below to no success. looks like some defaults tucked somewhere override this, and the gnome-mount page is not clear on the matter. I could not figure out much with respect to gnome-vfs-daemon and gnome-volume-manager which, from the man pages, invoke gnome-mount. [root@localhost ~]# df Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/VolGroup00-LogVol00 60946300 5664932 52135640 10% / /dev/sda5 101086 18319 77548 20% /boot tmpfs 966112 0 966112 0% /dev/shm [root@localhost ~]# /sbin/fdisk -l Disk /dev/sda: 120.0 GB, 120034123776 bytes 255 heads, 63 sectors/track, 14593 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 3851 30933126 7 HPFS/NTFS /dev/sda2 13280 14462 9502447+ c W95 FAT32 (LBA) /dev/sda3 14463 14593 1052257+ d7 Unknown /dev/sda4 3852 13279 75730410 5 Extended /dev/sda5 3852 3864 104391 83 Linux /dev/sda6 3865 13279 75625956 8e Linux LVM Partition table entries are not in disk order Disk /dev/sdb: 120.0 GB, 120034123776 bytes 255 heads, 63 sectors/track, 14593 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 14593 117218241 c W95 FAT32 (LBA) [root@localhost ~]# gnome-mount -p wdmount -d /dev/sdb1 gnome-mount 0.5 [root@localhost ~]# df Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/VolGroup00-LogVol00 60946300 5667264 52133308 10% / /dev/sda5 101086 18319 77548 20% /boot tmpfs 966112 0 966112 0% /dev/shm /dev/sdb1 117189600 11871296 105318304 11% /media/WD Passport [root@localhost ~]# 2) The article http://www.mythic-beasts.com/~mark/random/hal/ seems to suggest that .fdi files found in etc/hal/fdi/policy may be used to alter, say, default mount points (specifically in etc/hal/fdi/policy/preferences.fdi), but these directories are empty in SL 5.0. 3) Related problems to (2) are: 3.1) how do you get the UDI (unique device identifier), or access paths such as /org/freedesktop/Hal/devices/ which do not seem to be under root directory (/)! 3.2) how does one view .fdi files? firefox gives complains such as: [root@localhost ~]# firefox /usr/share/doc/hal-0.5.8.1/conf/storage-non-fixed.fdi & [1] 8404 "This XML file does not appear to have any style information associated with it. The document tree is shown below." <!-- This .fdi files makes sure no fixed storage device gets tagged as mountable except if it's a floppy or optical drive --> <deviceinfo version="0.2"> <device> <match key="storage.hotpluggable" bool="false"> <merge key="storage.policy.should_mount" type="bool">false</merge> <match key="storage.drive_type" string="floppy"> <merge key="storage.policy.should_mount" type="bool">true</merge> </match> <match key="storage.drive_type" string="cdrom"> <merge key="storage.policy.should_mount" type="bool">true</merge> </match> </match> </device> </deviceinfo> 3.3) The mail in: http://www.redhat.com/archives/fedora-devel-list/2006-January/msg00515.html led me to gconf, but I cannot make sense out of the gconf-editor command which the manual recommends I "... Use this tool at your own risk." 4) Could there be a simple command/scripts OR templates for .fdi files that novices can use to just mount devices? Sprawling all over the place only helps get me confused! > >> 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. > > Is the rest of the hardware known to be ok? I'd run memtest+ on it for a > couple of days just to be sure that memory is ok. > > Did you get any smartd (or other interesting) messages before it started > to fail? > > Can you attach this disk to another machine and use the utilities on there > to check it? To the best of my knowledge, the other hardware components are okay, and S.M.A.R.T. does not complain at boot. I have circumvented the problem by obtaining yet another hard disk, and hope I can find someone to tinker with hardware issues (though these seem to be Windows people). <...> > An adage to live by is: > > If data is worth spending any time trying to recover, it should be > backed up. > > Not that this helps you right now but it might be something to avoid > problems in the future. I've almost been attacked by people when I tell > them this after their disk failed, but I've never had the same person come > back a second time... :-) <...> Yes, I agree. I've been saved many times by backed up data. Things are getting difficult with backing of configurations/p;ograms, as these are tweaked into place and the man-hours are not just available. Kickstart seems to be okay for standard o/sys installs. ____________________________________________________________________________________ Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games. http://sims.yahoo.com/