SLUG Mailing List Archives
Re: [SLUG] hot swapping hard drives
- To: slug@xxxxxxxxxxx
- Subject: Re: [SLUG] hot swapping hard drives
- From: Daniel Pittman <daniel@xxxxxxxxxxxx>
- Date: Sat, 16 May 2009 18:19:13 +1000
- Organization: I know I put it down here, somewhere.
- User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.60 (gnu/linux)
Tony Sceats <tony.sceats@xxxxxxxxx> writes:
>>> The CLI command "umount" does this within the Linux / Unix OS.
>> That should have the filesystem flush data, but doesn't actually push
>> out dirty pages for the device — if you accessed it raw at any point
>> this will not be sufficient.
>> (Also, lower layers such as LVM, software RAID, etc, might not flush
>> their data during the unmount process.)
>>> The "sync" command/programming API call is another way to do this
>> That will flush raw blocks from the device also.
>>> That is all that is required.
>> Those are necessary, but not sufficient, steps, I fear.
> so if our raw partitions are up-to-date and the file systems are also,
> thanks to the 'sync' and 'umount' commands done before device removal,
> what else are you implying would be necessary before the drive is
> safely pulled?
Didn't I already answer this in the text you cut?
Your controller needs to support SATA hotplug sanely. Your controller
needs to report the event to the driver. The driver needs to handle the
> (obviously I'm referring only to on the hot un-plug side, the hot-plug
> side obviously involves a different sequence of events, or is that
> what you're referring to with 'not sufficient'?)
No, I mean specifically that what you listed is necessary, but not
sufficient, to have function hot-unplug of SATA devices under Linux.