* [Bug] Remove and add a mounted device gets a new dev path
@ 2012-12-07 17:13 Anand Jain
2012-12-10 4:00 ` Anand Jain
0 siblings, 1 reply; 3+ messages in thread
From: Anand Jain @ 2012-12-07 17:13 UTC (permalink / raw)
To: linux-btrfs
# 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)
Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug] Remove and add a mounted device gets a new dev path
2012-12-07 17:13 [Bug] Remove and add a mounted device gets a new dev path Anand Jain
@ 2012-12-10 4:00 ` Anand Jain
2012-12-10 7:51 ` Douglas Gilbert
0 siblings, 1 reply; 3+ messages in thread
From: Anand Jain @ 2012-12-10 4:00 UTC (permalink / raw)
To: linux-scsi
# 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)
Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Bug] Remove and add a mounted device gets a new dev path
2012-12-10 4:00 ` Anand Jain
@ 2012-12-10 7:51 ` Douglas Gilbert
0 siblings, 0 replies; 3+ messages in thread
From: Douglas Gilbert @ 2012-12-10 7:51 UTC (permalink / raw)
To: Anand Jain; +Cc: linux-scsi
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-12-10 7:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-07 17:13 [Bug] Remove and add a mounted device gets a new dev path Anand Jain
2012-12-10 4:00 ` Anand Jain
2012-12-10 7:51 ` Douglas Gilbert
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.