Main Page | Report this Page
Linux Forum Index  »  Linux - Red Hat Forum  »  Cannot mount previously mounted USB HD...
Page 1 of 1    

Cannot mount previously mounted USB HD...

Author Message
Nico Kadel-Garcia...
Posted: Sun Oct 11, 2009 3:16 pm
Guest
On Oct 11, 8:23 pm, Editorial_Response <Editorial_Respo... at (no spam) yahoo.com>
wrote:
Quote:
Thank you for the reply Nico.

I am willing to pull this 2T drive out of the USB case it is in and
mount it as a hot swap drive in the Dell T-410 system that I have.
Can you tell me, other than modifying /etc/fstab to mount an ext3
drive at a minimum rw, is there anything I need to know? Can I mount
it "outside" of a Vol/Grp...or do I have to work within that
framework?

Can you tell me explicitly what the /etc/fstab entry would be for
either scenario, using the Vol/Grp and mounting outside Vol/Grp?

The key is the volume group, and the logical volume. This device
*should* be showing up as /dev/backup/wizdom. The fact that it's *not*
is a hint the USB device isn't showing up at all.

Quote:
[root at (no spam) localhost ~]# pvscan
PV /dev/sda2 VG VolGroup00 lvm2 [698.53 GB / 0 free]
PV /dev/sdb1 VG VolGroup00 lvm2 [698.62 GB / 0 free]
Total: 2 [1.36 TB] / in use: 2 [1.36 TB] / in no VG: 0 [0 ]

[root at (no spam) localhost ~]# vgscan
Reading all physical volumes. This may take a while...
Found volume group "VolGroup00" using metadata type lvm2
[root at (no spam) localhost ~]# lvscan
ACTIVE '/dev/VolGroup00/LogVol00' [1.36 TB] inherit
ACTIVE '/dev/VolGroup00/LogVol01' [7.78 GB] inherit

Your 'backup' volume group is missing. You cannot use this drive until
it's seen.

Quote:
[root at (no spam) localhost ~]# fdisk -l
Disk /dev/sda: 750.1 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 91201 732467610 8e Linux LVM

Disk /dev/sdb: 750.1 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 91201 732572001 8e Linux LVM

See above. Why isn't sdb1 showing up in a volume group?

Quote:
[root at (no spam) localhost ~]# mount -l
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw) [/boot]
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

[root at (no spam) localhost ~]# free
total used free shared buffers
cached
Mem: 5837916 2197088 3640828 0 378800
1362640
-/+ buffers/cache: 455648 5382268
Swap: 8159224 0 8159224

[root at (no spam) localhost ~]# df -al
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
1411242632 37151872 1301247496 3% /
proc 0 0 0 - /proc
sysfs 0 0 0 - /sys
devpts 0 0 0 - /dev/pts
/dev/sda1 101086 15551 80316 17% /boot
tmpfs 2918956 0 2918956 0% /dev/shm
none 0 0 0 - /proc/sys/fs/
binfmt_misc
sunrpc 0 0 0 - /var/lib/nfs/
rpc_pipefs

Just to let you know, I am doing 100% of this work to learn how to be
a hard core bioinformatics sys admin with skills in FreeBSD, SE Linux,
MySQL, Apache, Bash(sed grep awk), C, PERL, PHP, and Python. I am on
a helpdesk now at a Fortune 500 Company and want to go back to what I
was doing several years ago...but get in to the technologies hard core
and "get lost in them mentally" so as to manage the resources. I like
being "there" with the technologies. If I am working 50+ hours a week
I may as well be involved in the technologies I am interested in and
get paid well for it.

Cool. Enjoy the learning experienced. Testing your backup before you
rely on it is, unfortunately, part of that learning experience.

Quote:
I know this is an open forum/newgroup but I appreciate the help that I
get from people. If anyone here offering help is very good in the
technologies I am studying I am willing to pay you every now and then
for the help that you give me. Just obtain a PayPal account and I
will direct payments directly to it.

At this time I am running 2 paid instances of RHEL 5.3, one desktop
and one server. First, I installed RHEL 5.3 server 30 day trial to
try it out(did not have all the cash for everything all at once and
wanted to get rolling), then purchased and installed RHEL 5.3 desktop,
followed by the 5.3 Server purchase (basic support now, which I am
modifying to standard thuis week). I've yet to be asked for the
Subscription ID on the 30-day trial Server.

Cool. If money is tight and you don't need RedHat Network, consider
switching to CentOS and avoid the licensing issues with RHEL, simply
for testing purposes.

Quote:
The 2T ext3 drive had NTFS put on it because I saw that the flash
drive mounted so easily/seamlessly and I just needed it for a quick
1-2 week use...so I gave it a shot. Hahaha! That backfired hard, and
I have not been able to remount is at a usb device since I pulled it
from the system.

Great ghu! NTFS is a problem because RHEL does not include the drivers
in the default kernel. CentOS includes it in the 'centosplus' add-on
components and the corresponding kernel, which I've used for RHEL.

Did you unmount it and shut down gracefully before you pulled it? If
information was still paged out, you may have seriously horked your
filesystem.

Quote:
To be honest with you over the past week I was dealing with setfacl/
getfacl and permissions issues...and this could be what is going on
here. Not sure just yet.

Hmm. You can turn off SELinux and try it again, temporarily, in /etc/
sysconfig/selinux or with the system-config-security tool.


Quote:
I never modified /etc/fstab but thought that I would give that to you
to cut to the chase:

[root at (no spam) localhost ~]# cat /etc/fstab
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0

OK. You should be able to do this:

/dev/backup/wizdom /[your-mount-point] ext3
noauto 0 0

That will prevent it from auto-mounting and whining if it's not
connected, but allow you to say "mount /[your-mount-pount]" and have
it do the right things if it's available.


Quote:
"Properties for the Logical Volume, /dev/backup/wizdom" but the
location is nonexistant.

Properties for the Volume Group
Volume Group Name backup
Clustered False
System ID
Format lvm2
Attributes wz--n-
Volume Group Size 1.82T
Available Space 0
Total Number of Extents 476931
Number Free Extents 0
Extent Size 4.00M
Max Alowable Physical Volumes 256
Number of Physical Volumes 1
Max Number of Logical Volumes 256
Number of Logical Volumes 1
VG UUID kgDIF2-BFoq-Ttm2-fKTa-6kn3-8aU2-Ctc7dw

Properties for the Logical Volume
/dev/backup/wizdom

Logical Volume Name wizdom
Volume Group Name backup
Logical Volume Size 1863.01GB
Number of Segments 1
Attributes -wi---
LV UID jjzSXd-lWKt-Q64Y-Y9Zw-Cujt-J5wL-PRW11H
Mount Point Unmounted
Mount Point when Rebooted None
File System None

Wait: if this is from lvscan, why doesn't /dev/wizdom/backup exist? Or
is this historical data?

Yes, I think the OS retained it when the drive was unmounted. I am
going to provide you with more info:

[root at (no spam) localhost ~]# chkconfig --list
NetworkManager 0:off 1:off 2:off 3:off 4:off 5:off 6:off
acpid 0:off 1:off 2Surprisedn 3Surprisedn 4Surprisedn 5Surprisedn 6:off
anacron 0:off 1:off 2Surprisedn 3Surprisedn 4Surprisedn 5Surprisedn 6:off
atd 0:off 1:off 2:off 3Surprisedn 4Surprisedn 5Surprisedn 6:off
auditd 0:off 1:off 2Surprisedn 3Surprisedn 4Surprisedn 5Surprisedn 6:off
autofs 0:off 1:off 2:off 3Surprisedn 4Surprisedn


[ the rest doesn't seem involved ]

I'm just thinking. After the machine is booted, what happens if you
unplug and replug the drive? And have you done all the kernel updates
for RHEL 5.3, to make sure you have the latest drivers?
 
Matt Giwer...
Posted: Mon Oct 12, 2009 9:27 pm
Guest
Editorial_Response wrote:
Quote:
The USB 2.0 device is a Sabrent, 3.5 SATA/IDE Hard Drive enclosure
with a 2T WD Caviar, Green, RHEL 5.3 ext3 formatted drive.

A mess of generic stuff here
http://www.giwersworld.org/computers/linux/usb-drives.phtml

You do have to format it with

/sbin/mke2fs -j -L 320 /dev/sdX1

or some other utility you are comfortable using. -L is the label in this
case 320 which it the number of GB for the drive.


You will find the new drive as in /dev/disk/by-label or from the new line
that appears in /etc/mtab after plugging it in.

After you plug in a USB drive you will find a new entry in this directory.

[matt at (no spam) dawn BACKUP-7500]$ ls -l /dev/disk/by-label/
total 0
lrwxrwxrwx 1 root root 10 2009-10-10 20:18 1000 -> ../../sdf1
lrwxrwxrwx 1 root root 10 2009-10-10 20:18 320 -> ../../sdh5
lrwxrwxrwx 1 root root 10 2009-10-10 20:18 4320 -> ../../sdd1
lrwxrwxrwx 1 root root 9 2009-10-10 20:18 5320 -> ../../sdc
lrwxrwxrwx 1 root root 10 2009-10-10 20:18 6100 -> ../../sdg1
lrwxrwxrwx 1 root root 9 2009-10-10 20:18 7500 -> ../../sdb
lrwxrwxrwx 1 root root 10 2009-10-10 20:18 8500 -> ../../sdi1
lrwxrwxrwx 1 root root 10 2009-10-10 20:18 9100 -> ../../sde1
lrwxrwxrwx 1 root root 9 2009-10-11 02:54 CDROM -> ../../sr0
lrwxrwxrwx 1 root root 10 2009-10-10 20:18 \x2fboot -> ../../sda1

This requires you to have given it a label. The labels above are 1000,
320, 4320 and so on.

You have four total ways of identifying the drive.

[matt at (no spam) dawn BACKUP-7500]$ ls -dl /dev/disk/by-*
drwxr-xr-x 2 root root 640 2009-10-10 20:19 /dev/disk/by-id
drwxr-xr-x 2 root root 240 2009-10-11 02:54 /dev/disk/by-label
drwxr-xr-x 2 root root 520 2009-10-10 20:19 /dev/disk/by-path
drwxr-xr-x 2 root root 280 2009-10-10 20:18 /dev/disk/by-uuid

You will have to create a mount point

mkdir /media/backup

or whatever. I find /media/"LABEL" meaning the label of the drive keeps
things simple. Thus I use /media/320 in this example.

and mount it yourself after finding its sdX device name

mount /dev/sdX1 /media/backup

It should identify the file type for you else add -t ext3 or whatever.

To make it mount automatically at boot time you will have to add a line
to /etc/fstab to tell it where. Note here is where a label is very useful.

[matt at (no spam) dawn BACKUP-7500]$ cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Fri Nov 28 02:59:03 2008
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(Cool, mount(Cool and/or vol_id(Cool for more info
#
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
UUID=fbaa9dbc-c5c0-472e-b53e-41e8930db5f6 /boot ext3
defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0

LABEL=1000 /media/1000 ext3 defaults 0 0
LABEL=320 /media/320 ext3 defaults 0 0
LABEL=4320 /media/4320 ext3 defaults 0 0
LABEL=5320 /media/5320 ext3 defaults 0 0
LABEL=6100 /media/6100 ext3 defaults 0 0
LABEL=7500 /media/7500 ext3 defaults 0 0
LABEL=8500 /media/8500 ext3 defaults 0 0
LABEL=9100 /media/9100 ext3 defaults 0 0

/dev/sr0 /media/b iso9660 noauto,user 0 0
/dev/sr1 /media/a iso9660 noauto,user 0 0



--
What is the point of worshiping a god that cannot be seen when its
performance is no better than a statue of Apollo?
-- The Iron Webmaster, 4193
http://www.giwersworld.org/israel/is-seg.phtml a14
Mon Oct 12 01:11:03 EDT 2009
 
Nico Kadel-Garcia...
Posted: Tue Oct 13, 2009 3:19 am
Guest
On Oct 12, 11:27 pm, Matt Giwer <jul... at (no spam) tampabay.rr.com> wrote:
Quote:
Editorial_Response wrote:

 > The USB 2.0 device is a Sabrent, 3.5 SATA/IDE Hard Drive enclosure
 > with a 2T WD Caviar, Green, RHEL 5.3 ext3 formatted drive.

     A mess of generic stuff herehttp://www.giwersworld.org/computers/linux/usb-drives.phtml

     You do have to format it with

/sbin/mke2fs -j -L 320 /dev/sdX1

NO!!!!! Editorial_response has backup data on the oartutuib, and
previously created the file system as part of an LVM managed
partition. This will will simply blow away his partitiion, including
all LVM information, create a new filesystem, and add a label. He
doesn't need to mount the plain partition, he needs access to the LVM
managed partition and filesystem.

Even if he wanted to blow away the partition and start over, he'd
should still first run fdisk on the drive and set the 'type' to be
'Linux', usually type '83' in hex.

I think that a big part of the problem is that the volume group and
logical volume information of his first system didn't get carried over
to the second. This sort of wackiness is why LVM is not a good idea
for detachable drives. I'm not sure how to resolve that for him., but
don't want to blow away his current data by accident.
 
David W. Hodgins...
Posted: Wed Oct 14, 2009 2:14 pm
Guest
On Wed, 14 Oct 2009 06:45:35 -0400, Matt Giwer <jull43 at (no spam) tampabay.rr.com> wrote:

Quote:
I admit to being singularly unenthused with LVM. I have tried adding a drive
and the OS was so kind as to reformat it for me without asking permission,
needless to say MBR first.

Linux/LVM will not format a drive unless you tell it to. Sounds like you
need to learn the basics of partitioning, file system creation, and lvm.

Ignoring things like GUID systems, you're most likely only going to see
partitions using the MBR format, or devices that only contain a filesystem
or physical volume.

If a drive is only going to contain one filesystem, or physical volume, you
have the choice of whether or not to have an mbr.

Running "mkfs.ext3 /dev/sda" will overwrite out the mbr and create a filesystem
that takes up the entire drive.

If you use a program such as fdisk to allocate a partition on sda, and then
run "mkfs.ext3 /dev/sda1", then you'll have a filesystem within the one partition.

Similarly, running pvcreate on /dev/sda will overwrite the mbr, while pvcreate on
/dev/sda1, will create the physical volume within the partition.

The filesystems within lvm logical volumes can only be accessed if the lvm
"database" (stored in /etc/lvm) has the correct information. This information
can be updated/corrected using the command vgscan.

Normally, when you want to access logical volumes on a system where /etc/lvm
does not currently know about them (such as when you're booting from a live
cd), you run "vgscan" to get the information, followed by "vgchange -a y",
to mark the volume group as available. The logical volumes within the vg
will then show up in /dev/mapper, and those device names can then be used
for formatting the filesystems, or mounting them.

Regards, Dave Hodgins

--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)
 
Editorial_Response...
Posted: Wed Oct 14, 2009 7:15 pm
Guest
On Oct 11, 9:16 pm, Nico Kadel-Garcia <nka... at (no spam) gmail.com> wrote:
Quote:
OK. You should be able to do this:

/dev/backup/wizdom                /[your-mount-point]    ext3
noauto          0 0

That will prevent it from auto-mounting and whining if it's not
connected, but allow you to say "mount /[your-mount-pount]" and have
it do the right things if it's available.

Nico, YOU had it right there. I did not have the time to try it out
immediately, then I did not have the time to get back here to you
right after I used the information. I did the following to /etc/fstab
and I was set. I did NOT know that a straight mount command would
work with the USB device, foolish of course but just getting my head
wrapped around Linux/Unix again. My solution based on what you had
said was:

/dev/backup/wizdom /media/sdc1/backup ext3 noauto 0 0


And it works flawlessly.
 
Editorial_Response...
Posted: Wed Oct 14, 2009 7:47 pm
Guest
On Oct 14, 4:14 pm, "David W. Hodgins" <dwhodg... at (no spam) nomail.afraid.org>
wrote:
Quote:
On Wed, 14 Oct 2009 06:45:35 -0400, Matt Giwer <jul... at (no spam) tampabay.rr.com> wrote:
   I admit to being singularly unenthused with LVM. I have tried adding a drive
and the OS was so kind as to reformat it for me without asking permission,
needless to say MBR first.

Linux/LVM will not format a drive unless you tell it to.  Sounds like you
need to learn the basics of partitioning, file system creation, and lvm.

Ignoring things like GUID systems, you're most likely only going to see
partitions using the MBR format, or devices that only contain a filesystem
or physical volume.

If a drive is only going to contain one filesystem, or physical volume, you
have the choice of whether or not to have an mbr.

Running "mkfs.ext3 /dev/sda" will overwrite out the mbr and create a filesystem
that takes up the entire drive.

If you use a program such as fdisk to allocate a partition on sda, and then
run "mkfs.ext3 /dev/sda1", then you'll have a filesystem within the one partition.

Similarly, running pvcreate on /dev/sda will overwrite the mbr, while pvcreate on
/dev/sda1, will create the physical volume within the partition.

The filesystems within lvm logical volumes can only be accessed if the lvm
"database" (stored in /etc/lvm) has the correct information.  This information
can be updated/corrected using the command vgscan.

Normally, when you want to access logical volumes on a system where /etc/lvm
does not currently know about them (such as when you're booting from a live
cd), you run "vgscan" to get the information, followed by "vgchange -a y",
to mark the volume group as available.  The logical volumes within the vg
will then show up in /dev/mapper, and those device names can then be used
for formatting the filesystems, or mounting them.

Regards, Dave Hodgins

--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)


I have enjoyed reading the discussion regarding LVM and how to
approach a solution to this problem. If I am successful going to
twist all of your brains in to a pretzel over the next year!
Hahahahah! Great to see the depth of discussion here. Thanks.
 
Matthias M. Giwer...
Posted: Fri Oct 16, 2009 3:51 am
Guest
On Wed, 14 Oct 2009, David W. Hodgins wrote:

Quote:
On Wed, 14 Oct 2009 06:45:35 -0400, Matt Giwer <jull43 at (no spam) tampabay.rr.com
wrote:

I admit to being singularly unenthused with LVM. I have tried adding
a drive and the OS was so kind as to reformat it for me without asking
permission, needless to say MBR first.

Linux/LVM will not format a drive unless you tell it to. Sounds like you
need to learn the basics of partitioning, file system creation, and lvm.

I can only report what occurred. I have not done it since. In
retrospect it does not appear to be a good idea to add a USB drive to the
mix but perhaps there is a way to make that a good idea. I have no tried
it since.

--
God gave Israel the Ten Commandments because they
were in such desperate need of them.
-- The Iron Webmaster, 4177
http://www.giwersworld.org/environment/aehb.phtml a2
Fri Oct 16 05:48:49 EDT 2009
 
Unruh...
Posted: Fri Oct 16, 2009 10:52 am
Guest
"Matthias M. Giwer" <matt at (no spam) localhost> writes:

Quote:
On Wed, 14 Oct 2009, David W. Hodgins wrote:

On Wed, 14 Oct 2009 06:45:35 -0400, Matt Giwer <jull43 at (no spam) tampabay.rr.com
wrote:

I admit to being singularly unenthused with LVM. I have tried adding
a drive and the OS was so kind as to reformat it for me without asking
permission, needless to say MBR first.

Linux/LVM will not format a drive unless you tell it to. Sounds like you
need to learn the basics of partitioning, file system creation, and lvm.

I can only report what occurred. I have not done it since. In
retrospect it does not appear to be a good idea to add a USB drive to the
mix but perhaps there is a way to make that a good idea. I have no tried
it since.

No, you did not tell us what occured just what you believe the end result was.
It is the details that were missing. Eg, what OS, what did you do?
Note also that Nothing will "format the mbr"


Quote:
--
God gave Israel the Ten Commandments because they
were in such desperate need of them.
-- The Iron Webmaster, 4177
http://www.giwersworld.org/environment/aehb.phtml a2
Fri Oct 16 05:48:49 EDT 2009
 
David W. Hodgins...
Posted: Fri Oct 16, 2009 12:48 pm
Guest
On Fri, 16 Oct 2009 12:52:57 -0400, Unruh <unruh-spam at (no spam) physics.ubc.ca> wrote:

Quote:
Note also that Nothing will "format the mbr"

That is not quite correct. When I was first experimenting with lvm,
I used pvcreate to create a physical volume on an entire usb drive
(after I'd erased the the mbr). I later rebooted the system into
xp home, and found out the hard way, that xp will put a partition
table on any removable devices that don't have one. It doesn't let
you know it's doing this, it just does it. It won't do this if the
pv takes up an entire hard drive, but it will do it on a removable
drive.

Linux/lvm will not overwrite the first sector, but xp will.

Regards, Dave Hodgins

--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)
 
 
Page 1 of 1    
All times are GMT - 5 Hours
The time now is Tue Dec 08, 2009 5:03 am