Unable to mount hard drive

Topics about disk partitioning (fdisk, parted, gparted, partimage), Volumes Management (lvm, evms, dmraid), Storage, file systems, ...
Post Reply
netadminuk
Posts: 2
Joined: 13 Aug 2009, 16:16

Unable to mount hard drive

Post by netadminuk » 13 Aug 2009, 16:29

Hello,
I'm trying to use sysrescuecd to boot from then use partimage to image one disk to another.

To do this I have two hard disks, one with an installtion of Ubuntu, the other blank but partitioned in the same way as the Ubuntu disk. I then boot from the rescue cd.

I would like to mount the second disk so I can write the image file to it. But when I try I see the following error.

mkdir /mnt/image
mount /dev/sda1 /mnt/image

"mount:dev/sda1 already mounted or /mnt/image busy"

I run the mount command to see a list of mounted devices but no /dev/sda* anything is listed.

If I do fdisk -l I can see all the partitions.

Please tell me what I'm doing wrong

Thanks

admin
Site Admin
Posts: 2715
Joined: 17 Jul 2003, 09:44

Post by admin » 13 Aug 2009, 19:40

Can you do a "fsarchiver probe detailed" and also copy the exact command output for "df -hP" and "mount /dev/sda1 /mnt/image " ?

netadminuk
Posts: 2
Joined: 13 Aug 2009, 16:16

Post by netadminuk » 17 Aug 2009, 08:28

fdupoux wrote:Can you do a "fsarchiver probe detailed" and also copy the exact command output for "df -hP" and "mount /dev/sda1 /mnt/image " ?
Hi fdupoux,

Thanks for your response. Here is the extra info:

[email protected] / % fsarchiver probe detailed
[=====DEVICE=====] [==FILESYS==] [=====LABEL=====] [====SIZE====] [MAJ] [MIN] [==============LONGNAME==============] [==================UUID==================]
[/dev/sda1 ] [ext3 ] [<unknown> ] [ 455.74 GB] [ 8] [ 1] [/dev/sda1 ] [c99fa2c3-7a53-4d35-a498-7724fd9e9dc5 ]
[/dev/sda5 ] [swap ] [SWAP ] [ 10.02 GB] [ 8] [ 5] [/dev/sda5 ] [7721b329-a482-4692-86ef-b6e285d2301b ]
[/dev/sdb1 ] [ext3 ] [<unknown> ] [ 449.37 GB] [ 8] [ 17] [/dev/sdb1 ] [7c243bb1-53db-44fc-a314-8dd2f3b516ac ]
[/dev/sdb3 ] [ext2 ] [<unknown> ] [ 239.85 GB] [ 8] [ 19] [/dev/sdb3 ] [b4598822-cb4f-4dbe-9f45-11dd4602733b ]
[/dev/sdb5 ] [swap ] [<unknown> ] [ 9.41 GB] [ 8] [ 21] [/dev/sdb5 ] [02c0acde-025d-4809-9b8b-ecaf169add1e ]
[/dev/dm-0 ] [<unknown> ] [<unknown> ] [ 698.64 GB] [253] [ 0] [/dev/mapper/nvidia_chhdaffe ] [<unknown> ]
[/dev/dm-1 ] [ext3 ] [<unknown> ] [ 449.37 GB] [253] [ 1] [/dev/mapper/nvidia_chhdaffe1 ] [7c243bb1-53db-44fc-a314-8dd2f3b516ac ]
[/dev/dm-2 ] [ext2 ] [<unknown> ] [ 239.85 GB] [253] [ 2] [/dev/mapper/nvidia_chhdaffe3 ] [b4598822-cb4f-4dbe-9f45-11dd4602733b ]
[/dev/dm-3 ] [swap ] [<unknown> ] [ 9.41 GB] [253] [ 3] [/dev/mapper/nvidia_chhdaffe5 ] [02c0acde-025d-4809-9b8b-ecaf169add1e ]
[/dev/dm-4 ] [<unknown> ] [<unknown> ] [ 9.41 GB] [253] [ 4] [/dev/mapper/nvidia_chhdaffe2 ] [<unknown> ]



[email protected] / % df -hP
Filesystem Size Used Avail Use% Mounted on
tmpfs 1.6G 22M 1.6G 2% /
/dev/sr0 236M 236M 0 100% /mnt/cdrom
/dev/loop0 191M 191M 0 100% /mnt/livecd
tmpfs 1.6G 22M 1.6G 2% /mnt/memory
udev 10M 208K 9.8M 3% /dev
tmpfs 1.6G 13M 1.6G 1% /lib/firmware
//192.168.0.100/z$ 100G 84G 17G 84% /mnt/network


[email protected] / % mount /dev/sdb3 /mnt/image
mount: /dev/sdb3 already mounted or /mnt/image busy

admin
Site Admin
Posts: 2715
Joined: 17 Jul 2003, 09:44

Post by admin » 17 Aug 2009, 19:23

Yes that's really bizarre. Can you try with another partition and with another mount point (/mnt/something for instance after doing the mkdir)

And you can also run this:
strace -o /root/strace.log mount /dev/sdb3 /mnt/image

And then put the strace.log on pastebin with the link here.

johnw
Posts: 1
Joined: 03 Oct 2009, 10:20

Re: Unable to mount hard drive

Post by johnw » 03 Oct 2009, 10:30

Many thanks. This thread has been a life saver for me.

I was getting the "mount: /dev/sda1 already mounted or /mnt/x busy" error and struggling to figure out what was wrong. Using the "fsarchiver probe detailed" command showed me another possibility. There was a /dev/dm-1 of exactly the same size. Tried mounting that and it worked, contained the filesystem I was looking for.

Incidentally, the reason I was trying to mount this partition was in order to use it to save recovered files on, using PhotoRec. PhotoRec is a brilliant program for recovering files -- obviously its name is historical, it now recovers many other file types, not just graphics.

oke
Posts: 1
Joined: 27 Oct 2009, 19:17

Re: Unable to mount hard drive

Post by oke » 27 Oct 2009, 22:50

I had a similar problem as outlined prior to this post and the solutions given so far in this thread did not work for me. However, I've solved the problem with a different and very simple solution after many time consuming attempts.

My situation is that I have temporarily three hdd's in my system. The problem occurred with the 5 /dev/sdb? partitions on a 1TB HDD: /dev/sdb1 primary and /dev/sdb5-8 logical. Only the /dev/sdb1 partition was covered by a "mapper" device /dev/dm-1 (and occasionaly also a /dev/dm-2 was pointing to this same /dev/sdb1). The other /dev/sdb? partitions cannot be addressed whatsoever. Following is "fsarchiver probe simple" output:
=====================>>> fsarchiver probe simple <<<=====================
[=====DEVICE=====] [==FILESYS==] [=====LABEL=====] [====SIZE====] [MAJ] [MIN]
[/dev/sda1 ] [ntfs ] [C ] [ 62.50 GB] [ 8] [ 1]
[/dev/sda5 ] [ntfs ] [N ] [ 86.55 GB] [ 8] [ 5]
[/dev/sdb1 ] [ntfs ] [Q ] [ 186.30 GB] [ 8] [ 17]
[/dev/sdb5 ] [ntfs ] [R ] [ 186.30 GB] [ 8] [ 21]
[/dev/sdb6 ] [ntfs ] [S ] [ 186.30 GB] [ 8] [ 22]
[/dev/sdb7 ] [ntfs ] [T ] [ 186.30 GB] [ 8] [ 23]
[/dev/sdb8 ] [ntfs ] [ 186.31 GB] [ 8] [ 24]
[/dev/sdc1 ] [ntfs ] [L ] [ 32.03 GB] [ 8] [ 33]
[/dev/sdc5 ] [ntfs ] [M ] [ 79.76 GB] [ 8] [ 37]
[/dev/dm-0 ] [<unknown> ] [<unknown> ] [ 931.48 GB] [253] [ 0]
[/dev/dm-1 ] [ntfs ] [Q ] [ 186.30 GB] [253] [ 1]

Obvious to state that this result is not really trustworthy for start doing a fsarchive. Note also that PING Partimage didn't work at all in this situation since it didn't discover the /dev/dm-? devices at all. Looking into the logging of rescuecd I saw attempts to discover raid array(s) with "dmraid -ay", which failed.
>> Executing "dmraid -ay" to access dmraid devices
ddf1: physical drives with CRC 10D6E9F9, expected 80C0E2E2 on /dev/sdb
RAID set "ddf1_test0" was activated
ERROR: dos: partition address past end of RAID device
RAID set "ddf1_test01" was activated

The solution was to start rescuecd at the boot: prompt with a general option:

Code: Select all

boot: rescuecd nodmraid
Now I see following result from "fsarchiver probe simple":
=====================>>> fsarchiver probe simple <<<=====================
[=====DEVICE=====] [==FILESYS==] [=====LABEL=====] [====SIZE====] [MAJ] [MIN]
[/dev/sda1 ] [ntfs ] [C ] [ 62.50 GB] [ 8] [ 1]
[/dev/sda5 ] [ntfs ] [N ] [ 86.55 GB] [ 8] [ 5]
[/dev/sdb1 ] [ntfs ] [Q ] [ 186.30 GB] [ 8] [ 17]
[/dev/sdb5 ] [ntfs ] [R ] [ 186.30 GB] [ 8] [ 21]
[/dev/sdb6 ] [ntfs ] [S ] [ 186.30 GB] [ 8] [ 22]
[/dev/sdb7 ] [ntfs ] [T ] [ 186.30 GB] [ 8] [ 23]
[/dev/sdb8 ] [ntfs ] [ 186.31 GB] [ 8] [ 24]
[/dev/sdc1 ] [ntfs ] [L ] [ 32.03 GB] [ 8] [ 33]
[/dev/sdc5 ] [ntfs ] [M ] [ 79.76 GB] [ 8] [ 37]

And all the /dev/sdb? partitions can be mounted directly and flawless.

Post Reply