LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-23-2011, 12:09 AM   #1
smbrooks
LQ Newbie
 
Registered: Jun 2007
Posts: 5

Rep: Reputation: 0
How mount and read hard drive from another linux system


I'm trying to mount a hard drive that was used on a FC 4.0 system on a headless Ubuntu 11.04 server. I need to be able to read the information on the old drive. I created a mount point: /mnt/backup then ran the following command with this result.

root@GX300:/mnt/backup# mount -t vfat /dev/sda /mnt/backup
mount: /dev/sda already mounted or /mnt/backup busy

I don't know why /mnt/backup would be busy and /etc/mtab doesn't list sda.

Can someone tell me what I'm doing wrong?

Last edited by smbrooks; 08-23-2011 at 12:12 AM.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 08-23-2011, 01:07 AM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
One thing is that you usually mount partitions, rather than the device itself (so you should be trying to mount, e.g. /dev/sda1). Are you sure you've got the right device? Post the outputs of fdisk -l (lowercase L) and mount, so we can see the partition table(s) and what's already mounted.
 
2 members found this post helpful.
Old 08-23-2011, 01:09 AM   #3
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Rep: Reputation: 90
Run this:
df -hT
to see what's mounted already. You might want to change out of that directory too. Mount balks when you are in a directory you're trying to mount or umount a file system to. Give us the output of the aforementioned command.
 
2 members found this post helpful.
Old 08-23-2011, 01:42 PM   #4
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6-7, WIN 7-10, WIN SRV 03-12r2
Posts: 1,312

Rep: Reputation: 98
I agree check to make sure it isn't all ready mounted, Ubuntu will autodetect a lot of things and may auto mount the drive. check /media. Further you are referencing sda which is usually the main hard drive the OS is on. Even though this device may have been sda on the fedora system in this new one it is likely sdb or sdc depends on how many drives you have in the system (including CD drives etc....)

Nylex also has a good point you will need to mount actual partitions not the drive itself, so whatever sd* it is you will need to append the partition number to it as well. You will likely have at least 2 partitions 1 for swap and one for the root, more if you had things set up differently.

Last edited by scheidel21; 08-23-2011 at 01:44 PM. Reason: add more information.
 
1 members found this post helpful.
Old 08-23-2011, 03:55 PM   #5
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,120

Rep: Reputation: 876Reputation: 876Reputation: 876Reputation: 876Reputation: 876Reputation: 876Reputation: 876
are you sure the linux disk is vfat formatted and not linux ext3 formatted ?
 
1 members found this post helpful.
Old 08-23-2011, 07:22 PM   #6
smbrooks
LQ Newbie
 
Registered: Jun 2007
Posts: 5

Original Poster
Rep: Reputation: 0
More info

Thanks everybody. Though I've searched for and found answers on this forum I've never actually asked a question. I'm bowled over by the response.

I have done what you all have asked and I'll attach information at the end of this post. schneidz you are correct - the disk I'm trying to attach appears to be ext3. I tried running the same commands with that change and received the same result.

Additional info:

I brought up this system when fc4.0 was current, installed LAMP and used it as a test bed for web development. Then, I used it as a backup file server. It's an old Pentium 3 or 4 with 512k memory. I'm doing some experimentation with wordpress and remembered this old server. Then I hosed up MySQL to the point it seemed simpler to reinstall and start over. That was mistake number 1. I had several more learning experiences before posting this question. I like Linux more all the time. Reminds me of the days when command lines were all we had.

sdb is a fast SCSI 80G drive and the one on which I installed the boot sector, swap partition and all the operating system files.

sda is a 200G ATA drive. It was mounted and working in the FC system before I installed the Natty distro. I used it to back up two or three systems using backup software that is no longer used here. Those systems are now out of commission but the backup files, God forbid I should ever need them, are all that survived a direct lightening strike to the facility which knocked us all the way back to tape.

I remember it was originally mounted as /mnt/backup or (Backup) so tried to duplicate that.

Installing current versions of Fedora failed. But, I was successful with Ubuntu 11.04 server. When I brought up the OS I didn't try to partition backup drive since I wanted to save the info and believed that I could mount it after getting a working Linux OS.

Here is output from the commands for the questions you've asked:

root@GX300:/home/smbrooks# fdisk -l > pig
Disk /dev/dm-0 doesn't contain a valid partition table
Disk /dev/dm-1 doesn't contain a valid partition table
Disk /dev/dm-2 doesn't contain a valid partition table
root@GX300:/home/smbrooks# nano pig
GNU nano 2.2.6 File: pigr


Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00056f39

Device Boot Start End Blocks Id System
/dev/sda1 * 1 24322 195360983+ 8e Linux LVM

Disk /dev/dm-0: 200.0 GB, 200047329280 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

--------------------------------------------------------------------------------
root@GX300:/home/smbrooks# df -hT >pig
root@GX300:/home/smbrooks# nano pig
GNU nano 2.2.6 File: pig

Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/GX300-root
ext4 33G 1.2G 31G 4% /
none devtmpfs 241M 196K 241M 1% /dev
none tmpfs 248M 0 248M 0% /dev/shm
none tmpfs 248M 388K 248M 1% /var/run
none tmpfs 248M 0 248M 0% /var/lock
/dev/sdb1 ext2 228M 23M 194M 11% /boot
--------------------------------------------------------------------------------

root@GX300:/media# ls
cdrom floppy floppy0
--------------------------------------------------------------------------------
root@GX300:/media# cat /proc/mounts
rootfs / rootfs rw 0 0
none /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
none /proc proc rw,nosuid,nodev,noexec,relatime 0 0
none /dev devtmpfs rw,relatime,size=246648k,nr_inodes=61662,mode=755 0 0
none /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0
/dev/mapper/GX300-root / ext4 rw,relatime,errors=remount-ro,barrier=1,data=ordered 0 0
none /sys/kernel/debug debugfs rw,relatime 0 0
none /sys/kernel/security securityfs rw,relatime 0 0
none /dev/shm tmpfs rw,nosuid,nodev,relatime 0 0
none /var/run tmpfs rw,nosuid,relatime,mode=755 0 0
none /var/lock tmpfs rw,nosuid,nodev,noexec,relatime 0 0
/dev/sdb1 /boot ext2 rw,relatime,errors=continue 0 0
----------------------------------------------------------------------------------
root@GX300:/media# parted -l
Model: ATA ST3200822A (scsi)
Disk /dev/sda: 200GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 512B 200GB 200GB primary boot, lvm


Model: QUANTUM ATLAS10K3_36_WLS (scsi)
Disk /dev/sdb: 36.8GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 256MB 255MB primary ext2 boot
2 257MB 36.8GB 36.5GB extended
5 257MB 36.8GB 36.5GB logical lvm


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/GX300-swap_1: 533MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 533MB 533MB linux-swap(v1)


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/GX300-root: 36.0GB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 36.0GB 36.0GB ext4


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/Backup-Backup: 200GB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 200GB 200GB ext3
------------------------------------------------------------------
I hope I'm being clear. I'm a stranger in a strange land. Thanks again for your help.
 
Old 08-23-2011, 10:34 PM   #7
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6-7, WIN 7-10, WIN SRV 03-12r2
Posts: 1,312

Rep: Reputation: 98
Did you try mounting sda1? instead of just sda. The only thing that I see that concerns me of all the output you posted is that /dev/dm-0 has no partition table, if i read the rest of the output correctly the sda is dm-0
 
Old 08-23-2011, 11:11 PM   #8
smbrooks
LQ Newbie
 
Registered: Jun 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Onward1

Yes, I did try mounting sda1 with an identical result. I don't know what to do with the device management mappings that will help me mount the drive. Do you think LVM is getting in the way in any way?
 
Old 08-23-2011, 11:24 PM   #9
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6-7, WIN 7-10, WIN SRV 03-12r2
Posts: 1,312

Rep: Reputation: 98
I don't think so I think it has to do with a bad or non-existent partition table this is what concerns me in the output of what you posted

Code:
Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-0: 200.0 GB, 200047329280 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
what does, however, seem odd is that you have a 200GB disk as /dev/dm-0 and /dev/sda it appears they are the same disk, at least to me. I suppose you could also try mounting /dev/dm-0 or /dev/dm-1 as well.
 
Old 08-24-2011, 01:05 AM   #10
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Rep: Reputation: 90
Your 200gb drive is your primary boot, the one your OS is on. It has one partition, /dev/sda1. You can't mount it because it's LVM and it's already mounted. Your 36gb drive is /dev/sdb and it has three partitions, /dev/sdb1, /dev/sdb2 and /dev/sdb5. Good old LVM has /dev/sdb2 and /dev/sdb5 labeled as "extended" and "logical lvm". Personally I hate LVM. It's confusing. I always use conventional partitioning during an install, but it's too late for that here. Make a directory:
mkdir /mnt/sdb2
and try mounting /dev/sdb2:
mount /dev/sdb2 /mnt/sdb2
If that doesn't mount your 36gb partition try this:
mkdir /mnt/sdb5
mount /dev/sdb5 /mnt/sdb5
Of course do
df -hT
after each attempt to see if either partition mounts. You are right in a way, LVM is screwing with you. I hope this doesn't start a dispute over LVM but if it does maybe we will all learn something. But as for me I think a person should know beforehand what partitions they want, right? LVM is all about resizing partitions safely. If partition size is getting to be a problem a person should add another hard drive. Bring it, LVM fans! Anyway, hope this helps the OP.
EDIT
Wait a minute, I just saw something. Try this:
mkdir /mnt/sda1
mount /dev/mapper/Backup-Backup /mnt/sda1
Then do:
df -hT
just for kicks and giggles.

Last edited by SharpyWarpy; 08-24-2011 at 01:13 AM. Reason: Wait a minute:
 
Old 08-24-2011, 11:48 AM   #11
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6-7, WIN 7-10, WIN SRV 03-12r2
Posts: 1,312

Rep: Reputation: 98
Sharp, you sure about this he stated that the smaller 80GB drive (sdb) was the drive he installed the OS on, and sda the 200GB drive was the one from the other system. sda and sdb will simply be assigned based on what port on the mobo it is plugged into (and jumper position or cable select on IDE interfaces)
 
Old 08-24-2011, 12:42 PM   #12
smbrooks
LQ Newbie
 
Registered: Jun 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Mount worked but I'm more confused than ever

Scheidel - that worked but I really don't understand why. I was able to mount dm-0. That would never have occurred to me. Have I mounted a symlink? I need to bone up on LVM.

Quote:
what does, however, seem odd is that you have a 200GB disk as /dev/dm-0 and /dev/sda it appears they are the same disk, at least to me. I suppose you could also try mounting /dev/dm-0 or /dev/dm-1 as well.
I can read the drive and the backup information is all there. Success! But I have no idea why that worked. And what kind of a mess do I have that may rear up and bite me later. How can I clean this up? Have I screwed up the installation?

Just for giggles, I tried mounting Backup-Backup. (I have no idea where that came from.)

Quote:
root@GX300:/home/smbrooks# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/GX300-root
ext4 33G 1.2G 31G 4% /
none devtmpfs 241M 196K 241M 1% /dev
none tmpfs 248M 0 248M 0% /dev/shm
none tmpfs 248M 392K 248M 1% /var/run
none tmpfs 248M 0 248M 0% /var/lock
/dev/sdb1 ext2 228M 23M 194M 11% /boot
/dev/mapper/Backup-Backup
ext3 184G 114G 61G 66% /mnt/backup
/dev/mapper/Backup-Backup
ext3 184G 114G 61G 66% /mnt/sda1
It works the same as mounting dm-0. Now I'm so confused I'm numb.


To clarify: The 80G drive is a scsi drive attached to its own controller on the PCI bus. It has the OS installed on it. The 200G drive is running off the EIDE bus. The system is confused by a DVD drive installed that the Bios doesn't support. I thought I had disconnected it.

Thanks everyone. I'm paddling as fast as I can.
 
Old 08-24-2011, 01:11 PM   #13
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Rep: Reputation: 90
Quote:
Originally Posted by scheidel21 View Post
Sharp, you sure about this he stated that the smaller 80GB drive (sdb) was the drive he installed the OS on, and sda the 200GB drive was the one from the other system. sda and sdb will simply be assigned based on what port on the mobo it is plugged into (and jumper position or cable select on IDE interfaces)
No, actually I'm not at all sure. LOL. I'm like OP, LVM is confusing. See my edit to that post. One note here. OP mentioned he had a DVD drive installed the bios didn't recognize. It reminded me of something I read in an Intel motherboard manual. It said don't install a CD/DVD drive as a master drive on the IDE channel. This particular board I'm talking about has one IDE channel to accomodate two IDE devices and four SATA channels. Weird. But no, I'm never sure about anything any more.

Last edited by SharpyWarpy; 08-24-2011 at 01:13 PM. Reason: typo
 
Old 08-24-2011, 02:03 PM   #14
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6-7, WIN 7-10, WIN SRV 03-12r2
Posts: 1,312

Rep: Reputation: 98
LVM shouldn't have had anything to say about the 200GB drive unless it was added to the LVM. It seems to me like the device wasn't being mapped properly. Either way I am glad the issue is resolved for you.

SHarp where did you see /dev/mapper/backup-backup that triggered your thought?
 
Old 08-24-2011, 08:34 PM   #15
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Rep: Reputation: 90
Quote:
Originally Posted by scheidel21 View Post
LVM shouldn't have had anything to say about the 200GB drive unless it was added to the LVM. It seems to me like the device wasn't being mapped properly. Either way I am glad the issue is resolved for you.

SHarp where did you see /dev/mapper/backup-backup that triggered your thought?
From this (excerpt from OP running parted -l command):
----------------------------------------------------------------------------------
root@GX300:/media# parted -l
Model: ATA ST3200822A (scsi)
Disk /dev/sda: 200GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 512B 200GB 200GB primary boot, lvm


Model: QUANTUM ATLAS10K3_36_WLS (scsi)
Disk /dev/sdb: 36.8GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 256MB 255MB primary ext2 boot
2 257MB 36.8GB 36.5GB extended
5 257MB 36.8GB 36.5GB logical lvm


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/GX300-swap_1: 533MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 533MB 533MB linux-swap(v1)


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/GX300-root: 36.0GB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 36.0GB 36.0GB ext4


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/Backup-Backup: 200GB <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 200GB 200GB ext3
------------------------------------------------------------------
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Unable to mount data hard drive w/ file system LVM2 on fedora12 kevinckelley Linux - Newbie 1 06-17-2011 03:25 PM
Need to mount a hard drive with my pre existing file system and data kizoin Linux - Newbie 1 03-23-2010 02:38 PM
Trying to read hard drive from old system through a USB enclosure NailCreekPub Linux - Hardware 5 03-21-2009 09:57 AM
dvd drive mount locks system causing a hard reset meetscott Linux - Hardware 2 01-01-2008 03:57 AM
HELP! mounted hard drive's read only system? Devboy Linux - Newbie 8 10-12-2003 07:39 AM


All times are GMT -5. The time now is 10:06 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration