From: Douglas Gilbert <dgilbert@interlog.com>
To: Anand Jain <anand.jain@oracle.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [Bug] Remove and add a mounted device gets a new dev path
Date: Mon, 10 Dec 2012 18:51:48 +1100 [thread overview]
Message-ID: <50C59494.5020103@interlog.com> (raw)
In-Reply-To: <50C55E67.1000507@oracle.com>
On 12-12-10 03:00 PM, Anand Jain wrote:
>
>
> # mount /dev/sdb /btrfs
>
> # echo "scsi remove-single-device 1 0 0 0" > /proc/scsi/scsi
>
> # lsscsi
> [0:0:0:0] disk ATA VBOX HARDDISK 1.0 /dev/sda
> [2:0:0:0] disk ATA VBOX HARDDISK 1.0 /dev/sdc
>
> # btrfs su create /btrfs/sv1
> Create subvolume '/btrfs/sv1'
> ERROR: cannot create subvolume - Input/output error
>
> # echo "scsi add-single-device 1 0 0 0" > /proc/scsi/scsi
>
> # lsscsi
> [0:0:0:0] disk ATA VBOX HARDDISK 1.0 /dev/sda
> [1:0:0:0] disk ATA VBOX HARDDISK 1.0 /dev/sdd <---
> [2:0:0:0] disk ATA VBOX HARDDISK 1.0 /dev/sdc
>
> The same disk comes back as /dev/sdd
>
> (the issue is same if disk is mounted as an ext4 fs)
That has been called a feature for several years now.
You (and any program that tries to track such things)
should be using the Device Identification VPD page
(e.g. see 'sg_vpd -i <device>').
And if the "VBOX HARDDISK" doesn't have that page
containing a unique identifier then you need to speak
to Oracle.
Linux could be more helpful and make those identifiers
available in sysfs; then lsscsi might display those
identifiers. The udev infrastructure tracks down some
of those identifiers, see the /dev/disk folder.
Doug Gilbert
prev parent reply other threads:[~2012-12-10 7:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <50C223B4.8050301@oracle.com>
2012-12-10 4:00 ` [Bug] Remove and add a mounted device gets a new dev path Anand Jain
2012-12-10 7:51 ` Douglas Gilbert [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50C59494.5020103@interlog.com \
--to=dgilbert@interlog.com \
--cc=anand.jain@oracle.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox