LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-22-2009, 04:19 AM   #1
vaibhavs
Member
 
Registered: Jun 2008
Posts: 113

Rep: Reputation: 15
Cannot mount sdb : Wish to rsync the 2 sata drives


Hi,

I have CentOS 5.3 (Final)

2 SATA disks attached on boot

Code:
[root@server1 ~]# fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 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       30401   244091610   8e  Linux LVM

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          13      104391   83  Linux
/dev/sdb2              14       30401   244091610   8e  Linux LVM
Did this:
mkdir /mnt/HDD2
mount /dev/sdb /mnt/HDD2 -rw

Got this response "mount: /dev/sdb already mounted or /mnt/HDD2 busy"

I have been reading on the net; multiple causes and resolutions but all dated 2004-2005. Tried some, no help.

I want to mount the 2nd sata disk, rsync my sda to sdb, then unmount sdb


Someone pls help me...

Thx
Vai
 
Old 10-22-2009, 04:25 AM   #2
avijitp
Member
 
Registered: May 2005
Location: India
Distribution: FC11, Debian/Ubuntu, RHEL, Solaris, AIX, HP-UX
Posts: 161

Rep: Reputation: 32
Do a df -h and see if the /dev/sdb1 or /dev/sdb2 is already mounted to some other mount points.
 
Old 10-22-2009, 04:27 AM   #3
vaibhavs
Member
 
Registered: Jun 2008
Posts: 113

Original Poster
Rep: Reputation: 15
Not mounted.
Quote:
[root@server1 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
224G 3.7G 209G 2% /
/dev/sda1 99M 19M 75M 20% /boot
tmpfs 1013M 0 1013M 0% /dev/shm
[root@server1 ~]#
 
Old 10-22-2009, 04:33 AM   #4
avijitp
Member
 
Registered: May 2005
Location: India
Distribution: FC11, Debian/Ubuntu, RHEL, Solaris, AIX, HP-UX
Posts: 161

Rep: Reputation: 32
Is this a new drive that you attached recently. It seems that /dev/sdb2 is part of the LVM volume group VolGroup00.

What are the output of the following commands:
vgdisplay -vv
pvdisplay -v
 
Old 10-22-2009, 04:42 AM   #5
vaibhavs
Member
 
Registered: Jun 2008
Posts: 113

Original Poster
Rep: Reputation: 15
Code:
[root@server1 ~]# vgdisplay -vv
      Setting global/locking_type to 1
      File-based locking selected.
      Setting global/locking_dir to /var/lock/lvm
    Finding all volume groups
      /dev/root: No label detected
      /dev/sda1: No label detected
      /dev/VolGroup00/LogVol01: No label detected
      /dev/sda2: lvm2 label detected
      Locking /var/lock/lvm/V_VolGroup00 RB
    Finding volume group "VolGroup00"
      /dev/sda2: lvm2 label detected
  --- Volume group ---
  VG Name               VolGroup00
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  3
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               232.78 GB
  PE Size               32.00 MB
  Total PE              7449
  Alloc PE / Size       7449 / 232.78 GB
  Free  PE / Size       0 / 0
  VG UUID               rYEsOa-Bmao-0NKS-Jhgg-fnvu-1fXn-4DFVig

  --- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol00
  VG Name                VolGroup00
  LV UUID                jVqFmo-Uj3A-YxIV-HJMc-LgL5-tItD-WK61Db
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                230.84 GB
  Current LE             7387
  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                nfWROu-7SCT-qqVE-ph2P-teGh-u0YU-SXYu87
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                1.94 GB
  Current LE             62
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1

  --- Physical volumes ---
  PV Name               /dev/sda2
  PV UUID               Ytx80v-bcMA-DdGW-a3Me-REY2-4U4X-fuJd5v
  PV Status             allocatable
  Total PE / Free PE    7449 / 0

      Unlocking /var/lock/lvm/V_VolGroup00
Code:
[root@server1 ~]# pvdisplay -v
    Scanning for physical volume names
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               VolGroup00
  PV Size               232.78 GB / not usable 2.71 MB
  Allocatable           yes (but full)
  PE Size (KByte)       32768
  Total PE              7449
  Free PE               0
  Allocated PE          7449
  PV UUID               Ytx80v-bcMA-DdGW-a3Me-REY2-4U4X-fuJd5v
 
Old 10-22-2009, 04:45 AM   #6
avijitp
Member
 
Registered: May 2005
Location: India
Distribution: FC11, Debian/Ubuntu, RHEL, Solaris, AIX, HP-UX
Posts: 161

Rep: Reputation: 32
It is not part of the LVM then.

Try this and see how it goes:

mount /dev/sdb2 /mnt/HDD2
 
Old 10-22-2009, 04:52 AM   #7
vaibhavs
Member
 
Registered: Jun 2008
Posts: 113

Original Poster
Rep: Reputation: 15
Code:
[root@server1 ~]# mount /dev/sdb2 /mnt/HDD2
mount: /dev/sdb2 already mounted or /mnt/HDD2 busy
[root@server1 ~]#
 
Old 10-22-2009, 04:59 AM   #8
avijitp
Member
 
Registered: May 2005
Location: India
Distribution: FC11, Debian/Ubuntu, RHEL, Solaris, AIX, HP-UX
Posts: 161

Rep: Reputation: 32
What is your pwd? Are you in the /mnt/HDD2 directory?

whats output of :
pwd
ls -l /mnt/HDD2
 
Old 10-22-2009, 05:02 AM   #9
vaibhavs
Member
 
Registered: Jun 2008
Posts: 113

Original Poster
Rep: Reputation: 15
Code:
[root@server1 ~]# pwd
/root
[root@server1 ~]# ls -l /mnt/HDD2
total 0
[root@server1 ~]#
 
Old 10-22-2009, 05:08 AM   #10
avijitp
Member
 
Registered: May 2005
Location: India
Distribution: FC11, Debian/Ubuntu, RHEL, Solaris, AIX, HP-UX
Posts: 161

Rep: Reputation: 32
/dev/sdb already has an LVM lebel. Was this done by you after recently attaching the drive or this drive was being used in some other server under LVM control?
 
Old 10-22-2009, 05:23 AM   #11
vaibhavs
Member
 
Registered: Jun 2008
Posts: 113

Original Poster
Rep: Reputation: 15
It was a blank - brand new hdd.

I mirrored the existing disc on the new disc using "DISC COPY 2" -- its a sector-by-sector disc copy tool.

Now I want to simply do rsync on `alternate day` basis to copy just the changes on sdb

I hope this is making sense and I can achieve this...

Thx for all your help.

Vai
 
Old 10-22-2009, 05:54 AM   #12
avijitp
Member
 
Registered: May 2005
Location: India
Distribution: FC11, Debian/Ubuntu, RHEL, Solaris, AIX, HP-UX
Posts: 161

Rep: Reputation: 32
Ah..as you have done a sector by sector copy, it has copied the LVM level as well, which is making this disk as another disk under LVM control. I believe this is why you are getting a error as kernel also sees that under a LVM and not allowing to mount it seperately.

I might be wrong. However, I will expect others to comment on this so that we both have a better idea to achieve this.
 
Old 10-22-2009, 07:09 AM   #13
vaibhavs
Member
 
Registered: Jun 2008
Posts: 113

Original Poster
Rep: Reputation: 15
I really appreciate your help and hope someone can get me out of this....

On second thoughts, what if I did a new install of CentOS.
Would I still have faced this LVM problem ?

Since we are on this subject, any idea what is the best way (commands) to do a full HDD rsync
I am thinking of the following process:
- Stop mysqld, httpd
- Mount HDD2
- RSync
- unmount HDD2
- start mysql, httpd

Let me know if this is good!

Thx
Vai
 
Old 10-22-2009, 09:35 AM   #14
avijitp
Member
 
Registered: May 2005
Location: India
Distribution: FC11, Debian/Ubuntu, RHEL, Solaris, AIX, HP-UX
Posts: 161

Rep: Reputation: 32
A clean install would have been good with same file system layout as the current one.

Quote:
I am thinking of the following process:
- Stop mysqld, httpd
- Mount HDD2
- RSync
- unmount HDD2
- start mysql, httpd

Let me know if this is good!
Sounds good to me.
 
Old 10-23-2009, 07:00 AM   #15
vaibhavs
Member
 
Registered: Jun 2008
Posts: 113

Original Poster
Rep: Reputation: 15
Update:

I installed the basic OS (centOS 5.3) on the Backup HDD and again connected it to the main server.

This time when I execute the mount command, I get the following response.
Code:
[root@server1 ~]# fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 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       30401   244091610   8e  Linux LVM

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

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

[root@server1 ~]#

Code:
[root@server1 ~]# mount -t ext3 -o rw /dev/sdb /mnt/HDD2
mount: wrong fs type, bad option, bad superblock on /dev/sdb,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

[root@server1 ~]#
Someone pls help me, this issue is driving me nuts!!

Thx
Vai
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can not mount SATA hard drives on Debian[etch] Rosiel Linux - Hardware 1 12-19-2008 09:29 AM
Unable to mount SATA drives on boot Rincewind2 Linux - Hardware 5 12-05-2007 11:56 AM
NFTS sata raid drives - won't mount jamangold Linux - Newbie 0 07-25-2004 06:57 PM
Mount SATA RAID drives in debian? EcceVery Debian 8 05-12-2004 04:24 PM
cannot mount SATA drives manub Red Hat 0 03-13-2004 09:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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