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 12-10-2009, 11:19 PM   #1
klmaustin
LQ Newbie
 
Registered: Dec 2009
Posts: 3

Rep: Reputation: 0
/dev/sdb2 already mounted or /mnt/other busy


I've looked at previous posts with the same error message and they don't seem to solve my problem. I am still rather new to Linux administration, although I've been a Linux/Unix user for many years.

My situation: I've had Fedora 3 running on a 120 Gb hard drive for several years. I've added a new primary drive (80 Gb) and have installed Fedora 12 (uname -r: 2.6.31.5-127.fc12.i686) on it. I disconnected my old 120 Gb drive when I installed Fedora 12 on the new 80 Gb drive because I was afraid the installation process would try to format this older drive. It has critical data that I don't want lost.

Fedora 12 has installed just fine. Here's what 'df' looks like:

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_klmaustin-lv_root
72G 2.1G 69G 3% /
tmpfs 502M 548K 502M 1% /dev/shm
/dev/sda1 194M 22M 163M 12% /boot


Now, I want to mount the old 120 Gb drive. I've powered it back up in my system and connected it. BIOS sees it as a slave drive. After booting, it appears that the drive shows up in the /dev directory. See listing below:

[root@klmaustin dev]# lsl sd*
brw-rw----. 1 root disk 8, 0 2009-12-10 21:38 sda
brw-rw----. 1 root disk 8, 16 2009-12-10 21:38 sdb <- here
brw-rw----. 1 root disk 8, 2 2009-12-10 21:38 sda2
brw-rw----. 1 root disk 8, 18 2009-12-10 21:38 sdb2 <- here, and
brw-rw----. 1 root disk 8, 17 2009-12-10 21:38 sdb1 <- here.
brw-rw----. 1 root disk 8, 32 2009-12-10 21:38 sdc
brw-rw----. 1 root disk 8, 1 2009-12-10 21:38 sda1


This old 120 Gb drive has 2 partitions: a boot and a main (larger) standard partition. I only want to mount the larger partion. I'm pretty sure that's the sdb2 label.

I've used fdisk to list out partition information as shown below:

# fdisk /dev/sdb2
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xf9bb038d.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.


The number of cylinders for this disk is set to 14580.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): p

Disk /dev/sdb2: 119.9 GB, 119924582400 bytes
255 heads, 63 sectors/track, 14580 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf9bb038d

Device Boot Start End Blocks Id System


I've edited my /etc/fstab as shown:

# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Thu Dec 10 02:48:08 2009
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_klmaustin-lv_root / ext4 defaults 1 1
UUID=5a818b4e-13bf-4ca0-8dcd-72eb5b3e6745 /boot ext4 defaults 1 2
/dev/mapper/vg_klmaustin-lv_swap swap swap defaults 0 0
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/sdb2 /mnt/other ext4 defaults 1 2


I've also used "mkdir" to create the "other" directory under /mnt. See listing:

# ls -Rl /mnt
/mnt:
total 4
drwxr-xr-x. 2 root root 4096 2009-12-10 21:57 other

/mnt/other:
total 0


Assuming I've done this correct, I should be able to do a mount. Here's what I see:

# mount /dev/sdb2
mount: /dev/sdb2 already mounted or /mnt/other busy

I've read posts 251293 and SATA Stil 3112 - 494987. They don't seem to help. My .dep file doesn't seem to have any dm-mod/dm-mirror modules running. I've also looked at this link much and have tried to follow it: http://www.skullbox.net/newsda.php

So, here are my questions:
1. Am I trying to do this the hard way? Is there some utility or SW tool in Fedora or anywhere to automate mounting a drive like this?
2. Is this even possible to do -- that is, mount an old drive that was added after a new distribution has been installed in a system? I would think so.
3. If I can do it, what's the next step to troubleshoot this?

Thanks!
 
Old 12-10-2009, 11:39 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
I'm sorry, but I don't see what the problem is. You have /dev/sdb2 in your /etc/fstab, so it mounts on boot. If you try to mount it again once the system is up and running, the system politely informs you that the partition is already mounted.

So, what's the problem?
 
Old 12-10-2009, 11:46 PM   #3
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Just a note... when using fdisk you need to specify the device not the partition

eg.
fdisk /dev/sdb

not
fdisk /dev/sdb1

sdb is the device, sdb1 is the first partiton on the sdb device

cheers
 
Old 12-11-2009, 08:10 AM   #4
klmaustin
LQ Newbie
 
Registered: Dec 2009
Posts: 3

Original Poster
Rep: Reputation: 0
(To first response.)

To bigrigdriver: I think I tried going ahead and booting the system with the /fstab as edited. The boot process complains. I will try this and let you know what happens.

The bottom line remains: The disk does not get mounted when I try to do this manually, even though the message indicates that it is mounted.

Perhaps it really is mounted and I don't know what that mount point is? Even so, I would think 'df' would tell me that.

(To next response.)

Thanks kbp. I didn't know that fdisk should be used on the main volume. Here are the results using fdisk on the entire disk:

# fdisk /dev/sdb

The number of cylinders for this disk is set to 14593.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000876b1

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13 104391 83 Linux
/dev/sdb2 14 14593 117113850 8e Linux LVM


My next step: I see other similar threads that I didn't notice before. Please feel free to respond, but I'm going to check out those as well.
 
Old 12-11-2009, 10:57 PM   #5
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
I see what your problem is... /dev/sdb2 is actually an LVM partition, you shouldn't mount it directly but via it's LVM name.

You'll need to run through the LVM commands to see what the status is:

pvdisplay:
Code:
root@xxxxxx ~# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda3
  VG Name               vg_xxxxxx_data
  PV Size               74.53 GB / not usable 608.50 KB
  Allocatable           yes (but full)
  PE Size (KByte)       4096
  Total PE              19079
  Free PE               0
  Allocated PE          19079
  PV UUID               MAcOcU-0zYB-cwbp-eGOg-4h7f-9tM8-X0XKPs
...
...this shows that the vg_xxxxxx_data volume group is present on the /dev/sda3 LVM partition.

vgdisplay:
Code:
root@xxxxxx ~# vgdisplay
  --- Volume group ---
  VG Name               vg_xxxxxx_data
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  3
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               74.53 GB
  PE Size               4.00 MB
  Total PE              19079
  Alloc PE / Size       19079 / 74.53 GB
  Free  PE / Size       0 / 0   
  VG UUID               QKkm4S-bhMC-1Jfk-x3mg-jnNS-B303-O8CbbX
...
...shows some info regarding the vg_xxxxxx_data volume group.

lvdisplay:
Code:
root@xxxxxx ~# lvdisplay
  --- Logical volume ---
  LV Name                /dev/vg_xxxxxx_data/lv_data
  VG Name                vg_xxxxxx_data
  LV UUID                f5dQ8Y-JtlA-7rmM-pzqy-TR0k-WZzS-qPiMVs
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                74.53 GB
  Current LE             19079
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:3
...
...shows the lv_data logical volume residing within the vg_xxxxxx_data volume group.

To see your old data, you will need to determine the logical volume name by using the steps above, then add that to your /etc/fstab. It will need to look something like:
Code:
/dev/vg_xxxxxx_data/lv_data    /data    ext4 defaults 0 0
cheers
 
1 members found this post helpful.
Old 12-12-2009, 09:25 AM   #6
klmaustin
LQ Newbie
 
Registered: Dec 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Smile

kbp: That's it! Thank you so much. I expected it was something kind of simple. I just replaced the physical name (/dev/sdb2) with the logical name (/dev/VolGroup00/LogVol00). I know I could read much on LVM now, but this is all I need to get running for now. See my own command results below. Here's the pvdisplay:

Code:
# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sdb2
  VG Name               VolGroup00
  PV Size               111.69 GB / not usable 1018.00 KB
  Allocatable           yes 
  PE Size (KByte)       32768
  Total PE              3574
  Free PE               4
  Allocated PE          3570
  PV UUID               5UzjWg-0K5x-773m-FuL4-P5Ol-FDFZ-Au5whk
   
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               vg_klmaustin
  PV Size               74.33 GB / not usable 577.00 KB
  Allocatable           yes (but full)
  PE Size (KByte)       4096
  Total PE              19029
  Free PE               0
  Allocated PE          19029
  PV UUID               y6u3Jd-G1x9-8i77-3Q9u-tESP-TgT2-mg8X2Y
... and the lvdisplay

Code:
# lvdisplay
  --- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol00
  VG Name                VolGroup00
  LV UUID                a5WDH9-Or3P-ALVi-1w7i-ffHN-9o5I-EqHrsZ
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                109.62 GB
  Current LE             3508
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
   
  --- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol01
  VG Name                VolGroup00
  LV UUID                n4Aij7-RHao-frKd-ssUF-3PjA-KmzD-LAj66Y
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                1.94 GB
  Current LE             62
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
   
  --- Logical volume ---
  LV Name                /dev/vg_klmaustin/lv_root
  VG Name                vg_klmaustin
  LV UUID                lKpX2n-mgBQ-nxum-YxvZ-k7zt-SFDx-P8Zn5l
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                72.36 GB
  Current LE             18525
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2
   
  --- Logical volume ---
  LV Name                /dev/vg_klmaustin/lv_swap
  VG Name                vg_klmaustin
  LV UUID                BasUSN-9ap8-2Ndx-wD86-wDwO-LsMb-0uQ8vU
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                1.97 GB
  Current LE             504
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:3
My fstab now looks like:

Code:
# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Thu Dec 10 02:48:08 2009
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_klmaustin-lv_root /                       ext4    defaults        1 1
UUID=5a818b4e-13bf-4ca0-8dcd-72eb5b3e6745 /boot                   ext4    defaults        1 2
/dev/mapper/vg_klmaustin-lv_swap swap                    swap    defaults        0 0
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/LogVol00 /mnt/other             ext4    defaults        0 0
My manual mount command now works like this. (I've verified that boot works too since the fstab entry is correct now.)

Code:
# mount /dev/VolGroup00/LogVol00
So, thanks again! This is exactly the kind of help I was hoping for. I most appreciate it.
 
  


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
/dev/sda1 already mounted or /mnt busy. (SATA Sil 3112) psamuel01 Red Hat 14 10-10-2008 03:59 PM
Mount "already mounted or /mnt busy" problems with dmraid, Promise FastTrak, 2.6.12 Iainuki Linux - Hardware 1 12-01-2006 08:33 AM
Software RAID1 problems, won't take /dev/sdb2 ? michaelsanford Linux - General 4 01-08-2006 07:46 PM
/dev/hda4 already mounted or z busy tunasashimi Ubuntu 13 09-06-2005 01:55 PM
umount: /mnt/a5: device is busy PTBmilo Linux - General 2 01-31-2003 10:48 PM

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

All times are GMT -5. The time now is 04:50 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