All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Greenslade <sean@seangreenslade.com>
To: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: RAID1 disk upgrade method
Date: Thu, 28 Jan 2016 15:41:49 -0500	[thread overview]
Message-ID: <20160128204149.GA11985@coach.student.rit.edu> (raw)
In-Reply-To: <CAJCQCtR=+H94a=6H4=RPSpFb8GWN1g26NMhrwat9bgLWHYuZiA@mail.gmail.com>

On Thu, Jan 28, 2016 at 01:24:07PM -0700, Chris Murphy wrote:
> >> How about something like:
> >>
> >> # hdparm -Y /dev/sdb
> >> # echo 1 /sys/block/sdb/device/delete
> >>
> >> Then physically disconnect the drive, assuming hot-plug is supported
> >> by all hardware?
> >>
> > That should safely disconnect the device, but you may still have to touch
> > some of the PM related stuff in the /sys/class/ directories for the disk
> > itself, and possibly do something to force it to flush the write cache
> > (toggling the write cache off then back on again usually does this).
> 
> Interesting, I figured a umount should include telling the drive to
> flush the write cache; but maybe not, if the drive or connection (i.e.
> USB enclosure) doesn't support FUA?
> 
> I wonder what the kernel sends to the device on restart/poweroff?

Yes, I did neglect to mention that. Wherever I said eject, I meant "send
1 to /sys delete, wait for drive to spin down, then remove." I also
unmount all partitions that are on that disk.

It's not an enclosure, it's hot-swap sata ports on the motherboard.

--Sean


  reply	other threads:[~2016-01-28 20:41 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-22  3:45 RAID1 disk upgrade method Sean Greenslade
2016-01-22  4:37 ` Chris Murphy
2016-01-22 10:54 ` Duncan
2016-01-23 21:41   ` Sean Greenslade
2016-01-24  0:03     ` Chris Murphy
2016-01-27 22:45       ` Sean Greenslade
2016-01-27 23:55         ` Sean Greenslade
2016-01-28 12:31           ` Austin S. Hemmelgarn
2016-01-28 15:37             ` Sean Greenslade
2016-01-28 16:18               ` Chris Murphy
2016-01-28 18:47                 ` Sean Greenslade
2016-01-28 19:37                   ` Austin S. Hemmelgarn
2016-01-28 19:46                     ` Chris Murphy
2016-01-28 19:49                       ` Austin S. Hemmelgarn
2016-01-28 20:24                         ` Chris Murphy
2016-01-28 20:41                           ` Sean Greenslade [this message]
2016-01-28 20:44                           ` Austin S. Hemmelgarn
2016-01-28 23:01                             ` Chris Murphy
2016-01-29 12:14                               ` Austin S. Hemmelgarn
2016-01-29 20:27                                 ` Henk Slager
2016-01-29 20:40                                   ` Austin S. Hemmelgarn
2016-01-29 22:06                                     ` Henk Slager
2016-02-01 12:08                                       ` Austin S. Hemmelgarn
2016-01-29 20:41                                 ` Chris Murphy
2016-01-30 14:50                                 ` Patrik Lundquist
2016-01-30 19:44                                   ` Chris Murphy
2016-02-04 19:20                                   ` Patrik Lundquist
2016-01-28 19:39                   ` Chris Murphy
2016-01-28 22:51                     ` Duncan
2016-02-14  0:44                   ` Sean Greenslade
2016-01-22 14:27 ` Austin S. Hemmelgarn

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=20160128204149.GA11985@coach.student.rit.edu \
    --to=sean@seangreenslade.com \
    --cc=linux-btrfs@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 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.