mark/delete device.

dormando dormando at rydia.net
Thu Jun 15 23:16:55 UTC 2006


Thanks Mark, Brad :)

Our mogile instance had its first failure and upgrade recently. It's 
handled everything great so far but I need to go mark the old device as 
'dead' like you said. Looking forward to the new improvments!

-Dormando

Brad Fitzpatrick wrote:
> You can re-use the same device id if you're sure you got all the files.
> But if it "failed", there's a nice possibility you lost some files, so
> it's easier to just mark that device as 'dead' and let Mogile replicate
> files from good disks to the new (empty) replacement disk.
> 
> There will be an fsck/verifier job in a future release that just takes its
> idle time to walk around and re-check all the fids/replication
> policies/locations.  Once you had that, it'd be a little less scary to
> throw in a restored disk into the mix.
> 
> 
> 
> On Thu, 15 Jun 2006, dormando wrote:
> 
>> Cool, thanks.
>>
>> On a related/unrelated note. When a device fails under mogilefs, are you
>> supposed to replace the the drive and bring the same device back up, or
>> create a new device id for the replacement drive?
>>
>> -Dormando
>>
>> Brad Fitzpatrick wrote:
>>> Yeah, totally unrelated.  Nothing regarding the protocol is changing, just
>>> internals.
>>>
>>>
>>> On Thu, 15 Jun 2006, dormando wrote:
>>>
>>>> Is it safe to patch mogadm with the rest of the updates going on to mogile?
>>>>
>>>> Brad Fitzpatrick wrote:
>>>>> Yes, mogadm needs work.  Patches welcome.
>>>>>
>>>>> That said, I don't think there should be a way to delete a device.  It's
>>>>> very important you never re-use device numbers, so all I want to allow is
>>>>> marking a disk dead.
>>>>>
>>>>>
>>>>> On Thu, 15 Jun 2006, Jay Buffington wrote:
>>>>>
>>>>>> It's my understanding that mogadm is a work in progress.  There are
>>>>>> several functions that aren't implemented.
>>>>>>
>>>>>> You're right, you'd need to add both MogileFS::Admin::delete_device
>>>>>> and cmd_device_delete.
>>>>>>
>>>>>> Jay
>>>>>>
>>>>>> On 6/15/06, komtanoo.pinpimai at livetext.com
>>>>>> <komtanoo.pinpimai at livetext.com> wrote:
>>>>>>> >From the cvs, in mogadm, I notice that cmd_device_mark and
>>>>>>> cmd_device_delete are doing nothing, which means if a parition dies, we
>>>>>>> can't remove it without typing in mysql directly. cmd_device_mark should
>>>>>>> works in the similar way of cmd_host_mark but calls change_device_state in
>>>>>>> MogileFS::Admin instead. But cmd_device_delete is not that easy, becuase
>>>>>>> there is no MogileFS::Admin::delete_device. So I wonder if I need to write
>>>>>>> it myself ? Why the two functions are blank ?
>>>>>>>
>>



More information about the mogilefs mailing list