On 12 October 2011 09:22, huang jun <[email protected]> wrote:
> 2011/10/12 Damien Churchill <[email protected]>:
>> On 12 October 2011 02:22, huang jun <[email protected]> wrote:
>>> I use the UUID option to mount the btrfs disk,but i can not success.
>>> first, the disk is /dev/sdd1
>>> then, i pull out the disk
>>> and after mintues, pushed it again,at this time, it changes to /dev/sde1
>>> at this time, if we use /etc/init.d/ceph restart, it will failed, for
>>> the current mount option is likely "/dev/sd** "
>>> but the UUID didn't change.
>>> why i can not mount it successfuly?
>>> BTW, does ceph provides methods to resolve the condition like that?
>>>
>>> the starce file attached.
>>>
>>> thanks!
>>>
>>
>> Hi,
>>
>> I switched to use the symlinks created by udev in /dev/disk/by-id/
>> which contains the hard-disks serial number which will be completely
>> static, even if a new btrfs filesystem is created. This ensures that
>> the same partition on the same disk is always used.
>>
>> Regards,
>> Damien
>>
> can you mount successfully by using the /dev/disk/by-id/  instead of  
> /dev/sd**?
> and how to get the hard-disk serial number? I have tried "udevadm info
> -a -p $(udevadm info -q path -n $btrfs_devs)", but failed to get it.
> or you should  test the condition like that, pull out the disk first
> and then push it in after few minutes.
>

It's as simple as "ls -l /dev/disk/by-id". They point to the /dev/sd*
devices so just pick the correct one, at least that's how I did it.

Damien
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to