LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-18-2014, 09:09 AM   #1
nagileon
LQ Newbie
 
Registered: Nov 2009
Posts: 8

Rep: Reputation: 0
targetcli - ... device is already in use


1. /dev/sdb1 not mounted
2. targetcli ls shows all objects = 0 (attachment)
3. cd /backstores/iblock & create clusterdata /dev/sdb1 causes the system to display the following:

"Cannot configure StorageObject because device /dev/sdb1 is already in use."

root@san001:~# cat /proc/version
Linux version 3.2.0-4-686-pae (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.2.54-2

root@san001:~# mount -l
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=127937,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=103420k,mode=755)
/dev/disk/by-uuid/4f766872-830c-41df-8314-719a039f7ed8 on / type ext4 (rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=387040k)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)



root@san001:~# fdisk -l

Disk /dev/sda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0000c6a2

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 40136703 20067328 83 Linux
/dev/sda2 40138750 41940991 901121 5 Extended
/dev/sda5 40138752 41940991 901120 82 Linux swap / Solaris

Disk /dev/sdb: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders, total 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00010cdd

Device Boot Start End Blocks Id System
/dev/sdb1 2048 209713151 104855552 8e Linux LVM

Disk /dev/sdc: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders, total 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00053657

Device Boot Start End Blocks Id System
/dev/sdc1 2048 20969471 10483712 8e Linux LVM

Disk /dev/mapper/VG01-quorum: 10.7 GB, 10733223936 bytes
255 heads, 63 sectors/track, 1304 cylinders, total 20963328 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/VG01-quorum doesn't contain a valid partition table

Disk /dev/mapper/VG00-ClusterData: 107.4 GB, 107369988096 bytes
255 heads, 63 sectors/track, 13053 cylinders, total 209707008 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/VG00-ClusterData doesn't contain a valid partition table
 
Old 04-18-2014, 09:21 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Does /dev/sdb appear in "pvs" output? If so it is part of your VG.

Is multipathd running? I've seen issues when single path drives weren't filtered out (see /etc/multipath.conf) that prevented me from using such drives in my multipath environment.

Are you running md (software RAID)?
 
Old 04-18-2014, 09:46 AM   #3
nagileon
LQ Newbie
 
Registered: Nov 2009
Posts: 8

Original Poster
Rep: Reputation: 0
Does /dev/sdb appear in "pvs" output? If so it is part of your VG.

root@san001:~# pvs
PV VG Fmt Attr PSize PFree
/dev/sdb1 VG00 lvm2 a-- 100.00g 0
/dev/sdc1 VG01 lvm2 a-- 10.00g 0
root@san001:~#

Is the above a problem ?


Is multipathd running?

root@san001:~# ps -e|grep multipathd
root@san001:~#


/etc/multipath.conf) Does not exist in this environment.

Are you running md (software RAID)? - NOPE
 
Old 04-18-2014, 10:21 AM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
/dev/sdb1 VG00 lvm2 a-- 100.00g 0
Confirms the first partition of /dev/sdb is in use for your Volume Group named VG00.

Your previous fdisk output suggest the entire disk is only ~100 GB so it appears you're probably using most of its space in partition 1:

Disk /dev/sdb: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders, total 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00010cdd

Therefore you could not use all of /dev/sdb for anything else because it is in use for your VG00.

You could run "fdisk -l /dev/sdb" to verify it only has the 1 partition.

You could run "vgdisplay -v VG00" to see all the details of the VG.
 
Old 04-18-2014, 11:05 AM   #5
nagileon
LQ Newbie
 
Registered: Nov 2009
Posts: 8

Original Poster
Rep: Reputation: 0
Hey,
I already figured it out:

cd /backstores/iblock
create ClusterData /dev/VG00/ClusterData
cd /backstores/iblock
create quorum /dev/VG01/quorum

 
Old 04-21-2014, 08:33 AM   #6
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Saying you "already figured it out" is a bit disingenuous.

You figured out you need to use the Logical Volume rather than the underlying disk after learning you had the disk in LVM.

Thanking people that help you rather than implying you did it all on your own is a good way to encourage others to help you in future.

You should also mark this as "resolved" so it might help someone else in future
 
  


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
Is STONITH device(Fencing device) is absolutely required for redhat cluster(cman) Kaustuv Linux - Enterprise 0 07-16-2013 01:44 PM
Mounting encrypted LVM - Device /dev/.../lv_home is not a valid LUKS device. recarv Linux - Hardware 3 02-15-2011 02:38 PM
lifekeeper error: DEVICE FAILURE on SCSI device '/dev/add' yuanjunliang Linux - Server 3 09-17-2009 04:24 PM
Wanted capture device for VCR device with Audio and Video outs only k_graham Linux - Newbie 2 06-18-2009 11:24 PM
ALI-M5451 Laptop Soundcard >>No such device>>Device Not Found>No Pipeline Balarabay1 Linux - Hardware 1 02-21-2006 12:54 PM

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

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