LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-04-2005, 02:10 PM   #1
diana_chen23
LQ Newbie
 
Registered: Apr 2005
Posts: 11

Rep: Reputation: 0
Accessing second drive problem


Hi all-

I am a FC3 user, with a problem seeing my second drive. I would appreciate any insights.

I recently needed to get a bigger hard drive. I opted to remove the old drive (working just fine), and replace it with a new drive and do a new install of FC3 onto the new drive. This way I could go back to the old drive if I ever needed to (this gives me a safe backup with no extra work). All is well - the new drive boots fine, works fine.

I would like to hook my old drive up now in order to transfer some archived/original files from it to the new drive. I must be missing fundamental point - I cannot seem to be able to read the partition I want to. Here is what I did:
* New big drive is master in 1st ide slot
* Old small drive is slave in 1st ide slot
* jumpers are correct for both drives defining master and slave

Power up

On boot, FC3 reported a duplicate partition name on the slave drive (/boot). Yes, since the slave was the real boot drive before, the boot partition name now conflicts with the new drives partition called /boot. I used
tune2fs -L /xboot /dev/hdb1
in order to remove the contention. Reboot shows no contention problem.

I cannot mount the 2nd partition - where I think all of the data is on the old, smaller drive.

Here are the facts:

---------------------------
# more /proc/partitions
major minor #blocks name

3 0 245117376 hda
3 1 104391 hda1
3 2 245007315 hda2
3 64 78150744 hdb <------
3 65 104391 hdb1 <------
3 66 78043770 hdb2 <------ this is what I want to copy from (I think)
253 0 242778112 dm-0
253 1 2031616 dm-1
8 0 58615704 sda
8 1 58613121 sda1
----------------------------

# fdisk -l

Disk /dev/hda: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 30515 245007315 8e Linux LVM

Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux
/dev/hdb2 14 9729 78043770 8e Linux LVM

Disk /dev/sda: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 7297 58613121 c W95 FAT32 (LBA)
------------------

With this setup, I can do a:
mount /dev/hdb1 /media/drive2 -t ext3

and it will show me the contents of the boot partition on the old drive just fine.

After doing a umount, if I try to do a:
mount /dev/hdb2 /media/drive2 -t ext3

I get:
mount: wrong fs type, bad option, bad superblock on /dev/hdb2,
or too many mounted file systems

What am I missing?


Much thanks,
DC
 
Old 07-04-2005, 04:46 PM   #2
mjrich
Senior Member
 
Registered: Dec 2001
Location: New Zealand
Distribution: Debian
Posts: 1,046

Rep: Reputation: 45
Re: Accessing second drive problem

Quote:
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux
/dev/hdb2 14 9729 78043770 8e Linux LVM
This may have something to do with it. Have you tried mounting with either no filesystem type specified, or using Resierfs ?

Cheers,

mj
 
Old 07-05-2005, 02:59 AM   #3
Andreas Huppert
LQ Newbie
 
Registered: Nov 2004
Location: Freising, Germany
Distribution: Fedora 3
Posts: 6

Rep: Reputation: 0
Hi,
1)I created a Linux LVM partition of 75 GB using fdisk.
2) reboot
3) mkfs -t ext3 /dev/hdaxx
4) mount /dev/hdaxx /tmp ### please, don't use the -t option!!!

It worked fine. If you have the problems, like before, do reset the partition
before calling mkfs using "dd if=/dev/zero of=/dev/hdb2 bs=163840"
Regards
Andreas Huppert
 
Old 07-05-2005, 03:03 AM   #4
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
Stop! fdisk and mkfs would delete the data.

I'd rather suggest you find out whether LVM is properly supported and set up on your machine (i.e. were physical volumes, volume groups, logical volumes created etc?)...

See also
http://www.sistina.com/products_lvm.htm
and search for documentation there or look at
http://tldp.org/HOWTO/LVM-HOWTO/
http://www.suse.de/de/whitepapers/lvm/index.html

P.S.: Was this an LVM-partition on your original set up, or has something gone awry?

Last edited by JZL240I-U; 07-07-2005 at 01:50 AM.
 
Old 07-05-2005, 07:27 AM   #5
DocFabian
Newbie
 
Registered: Jun 2005
Location: Sydney - with view of Harbour Bridge
Distribution: Debian (also DSL, Knoppix & Ubuntu)
Posts: 2

Rep: Reputation: 0
Since you have data that you have backed up on the second drive I would proceed with caution.

It appears that you have LVM on /dev/hdb2 and that is what you can't mount. You can only mount the logical volumes on the volume group that is hosted by that physical drive. I assume that you set up logical volumes on that drive.

Before disconnecting such a drive you need to do a vgexport to "detach" the pv from the system. But all is not lost.

Here's what I would suggest you do:
1. vgscan - you shouldn't get any errors at this step.
2. pvscan - you should see both /dev/hda2 and /dev/hdb2
3. vgimport /dev/vgxx - whatever it was called. But the problem may exist if you used the same name for the new volume group
4. vgchange -a y /dev/vgxx
5. vgdisplay -v /dev/vgxx - should show details of logical volumes

If this doesn't make sense, you might want to check the documentation for LVM2.

Let us know what you find, etc.

Good Luck
 
Old 07-06-2005, 11:01 AM   #6
diana_chen23
LQ Newbie
 
Registered: Apr 2005
Posts: 11

Original Poster
Rep: Reputation: 0
Hi DocFabian and JZL240I-U-

Thank you for your helpful leads (and warnings). I will need to do some reading on LVM2 just to get familiar with the commands that DocFabian has provided. I will post more as soon as I know it. LVM looks like it can be very powerful over the old way of doing things (with simple fstab entries), at the cost of having to fdo a bit more study.

Thanks!
DC
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
permission problem accessing ntfs drive in MDK jmcdonald21 Linux - Hardware 2 03-28-2005 12:19 AM
having a problem accessing my usb flash drive vadriaan Linux - Hardware 4 01-27-2005 02:15 AM
Installing Mandrake 10: problem accessing CD-Rom drive paulsr Mandriva 9 10-15-2004 03:58 AM
Accessing Windows Drive Burquedout Linux - Newbie 8 04-24-2004 11:41 AM
problem accessing fat drive as a user thegeekster Linux - Newbie 6 12-09-2003 10:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration