removing AHCI SATA devices
removing AHCI SATA devices
am 22.02.2011 17:05:43 von Simon McNair
hi all,
Whilst I am aware that with AHCI and SATAII I can just unplug a HDD at
will what is the correct process for doing a 'clean' dismount ?
Since MD is a layer over the top of the physical device how can you
ensure with certainty that all data has been flushed and the device
removal is clean ?
The advice I was given was that if I unmount the filesystem it'll be
fine, but I don't like the messages I get in dmesg:
ata5: exception Emask 0x10 SAct 0x0 SErr 0x4090000 action 0xe frozen
ata5: irq_stat 0x00400040, connection status changed
ata5: SError: { PHYRdyChg 10B8B DevExch }
ata5: hard resetting link
ata5: SATA link down (SStatus 0 SControl 300)
ata5: hard resetting link
ata5: SATA link down (SStatus 0 SControl 300)
ata5: limiting SATA link speed to 1.5 Gbps
ata5: hard resetting link
ata5: SATA link down (SStatus 0 SControl 310)
ata5.00: disabled
ata5: EH complete
ata5.00: detaching (SCSI 5:0:0:0)
scst: Detached from scsi5, channel 0, id 0, lun 0, type 0
sd 5:0:0:0: [sdd] Synchronizing SCSI cache
sd 5:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
sd 5:0:0:0: [sdd] Stopping disk
sd 5:0:0:0: [sdd] START_STOP FAILED
sd 5:0:0:0: [sdd] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
do I need to do:
echo 1 > /sys/block/sdd/device/delete
or follow:
http://tldp.org/HOWTO/archived/SCSI-Programming-HOWTO/SCSI-P rogramming-HOWTO-4.html
(Dynamically insert and remove SCSI devices)
or something else completely ? (or just put up with it ?)
Some advice would be appreciated.
regards
Simon
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: removing AHCI SATA devices
am 22.02.2011 22:36:20 von Jeff Garzik
On 02/22/2011 11:05 AM, Simon Mcnair wrote:
> hi all,
> Whilst I am aware that with AHCI and SATAII I can just unplug a HDD at
> will what is the correct process for doing a 'clean' dismount ?
>
> Since MD is a layer over the top of the physical device how can you
> ensure with certainty that all data has been flushed and the device
> removal is clean ?
Simply unplugged the hard drive's SATA cable should be fine.
Jeff
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: removing AHCI SATA devices
am 23.02.2011 09:27:47 von Simon McNair
thanks Jeff. It just seems like a hit and miss solution (no way of
knowing all data has been written to and that the device has been
unmounted from all filesystems). I kinda expected some kind of 'it is
safe to remove /dev/sdb' in dmesg.
cheers
Simon
On 22/02/2011 21:36, Jeff Garzik wrote:
> On 02/22/2011 11:05 AM, Simon Mcnair wrote:
>> hi all,
>> Whilst I am aware that with AHCI and SATAII I can just unplug a HDD at
>> will what is the correct process for doing a 'clean' dismount ?
>>
>> Since MD is a layer over the top of the physical device how can you
>> ensure with certainty that all data has been flushed and the device
>> removal is clean ?
>
> Simply unplugged the hard drive's SATA cable should be fine.
>
> Jeff
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: removing AHCI SATA devices
am 23.02.2011 11:54:36 von hansBKK
Just check it yourself before pulling the drive.
If you have lots of volumes mounted:
mount | grep sdN
On Wed, Feb 23, 2011 at 3:27 PM, Simon McNair w=
rote:
> thanks Jeff. =A0 It just seems like a hit and miss solution (no way o=
f knowing
> all data has been written to and that the device has been unmounted f=
rom all
> filesystems). =A0I kinda expected some kind of 'it is safe to remove =
/dev/sdb'
> in dmesg.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: removing AHCI SATA devices
am 23.02.2011 12:19:27 von John Robinson
On 23/02/2011 08:27, Simon McNair wrote:
> thanks Jeff. It just seems like a hit and miss solution (no way of
> knowing all data has been written to and that the device has been
> unmounted from all filesystems). I kinda expected some kind of 'it is
> safe to remove /dev/sdb' in dmesg.
I think `eject /dev/sdb` will do what you want - if it's safe to pull,
it'll exit immediately and silently, but if it or any of its partitions
are still associated with any filesystem or md device, and the drive
can't safely be ejected/unplugged, it'll complain.
Cheers,
John.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: removing AHCI SATA devices
am 23.02.2011 17:21:32 von Roberto Spadim
i fail disk with mdadm, remove the from computer, insert again add
disk to md array, and continue using
2011/2/23 John Robinson :
> On 23/02/2011 08:27, Simon McNair wrote:
>>
>> thanks Jeff. It just seems like a hit and miss solution (no way of
>> knowing all data has been written to and that the device has been
>> unmounted from all filesystems). I kinda expected some kind of 'it i=
s
>> safe to remove /dev/sdb' in dmesg.
>
> I think `eject /dev/sdb` will do what you want - if it's safe to pull=
, it'll
> exit immediately and silently, but if it or any of its partitions are=
still
> associated with any filesystem or md device, and the drive can't safe=
ly be
> ejected/unplugged, it'll complain.
>
> Cheers,
>
> John.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid"=
in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at =A0http://vger.kernel.org/majordomo-info.html
>
--=20
Roberto Spadim
Spadim Technology / SPAEmpresarial
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html