<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<br>
George,<br>
<br>
Your mirror is stale - look at the output. Mirroring in Lustre is currently a manual process, you have to manually resync a file after writing to it. lfs mirror resync is the lfs command.<br>
<br>
If your mirror is in sync, you should get the behavior you’re looking for.<br>
<br>
- Patrick<br>
<br>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> lustre-discuss <lustre-discuss-bounces@lists.lustre.org> on behalf of George Melikov <mail@gmelikov.ru><br>
<b>Sent:</b> Monday, October 1, 2018 6:17:44 AM<br>
<b>To:</b> Jian Yu; lustre-discuss<br>
<b>Subject:</b> Re: [lustre-discuss] lfs mirror create directory</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Thank you, Jian, it works this way.<br>
<br>
I want to read/write to Lustre even if one of OSTs with file is unavailable.<br>
<br>
But now if i unmount one of OSTs with file, I can't read/write from/to this file.<br>
<br>
Lustre v2.11.52<br>
<br>
Is this use case works in Lustre?<br>
<br>
# lfs getstripe ./1<br>
./1<br>
lcm_layout_gen: 3<br>
lcm_mirror_count: 2<br>
lcm_entry_count: 2<br>
lcme_id: 65537<br>
lcme_mirror_id: 1<br>
lcme_flags: init<br>
lcme_extent.e_start: 0<br>
lcme_extent.e_end: EOF<br>
lmm_stripe_count: 1<br>
lmm_stripe_size: 1048576<br>
lmm_pattern: raid0<br>
lmm_layout_gen: 0<br>
lmm_stripe_offset: 2<br>
lmm_objects:<br>
- 0: { l_ost_idx: 2, l_fid: [0x100020000:0x5:0x0] }<br>
<br>
lcme_id: 131074<br>
lcme_mirror_id: 2<br>
lcme_flags: init,stale<br>
lcme_extent.e_start: 0<br>
lcme_extent.e_end: EOF<br>
lmm_stripe_count: 1<br>
lmm_stripe_size: 1048576<br>
lmm_pattern: raid0<br>
lmm_layout_gen: 0<br>
lmm_stripe_offset: 0<br>
lmm_objects:<br>
- 0: { l_ost_idx: 0, l_fid: [0x100000000:0x44:0x0] }<br>
# umount /mnt/lustre/ost2<br>
# cat ./1<br>
...infinite wait...<br>
<br>
So I've unmounted OST with index 2 and can't even `cat` the file.<br>
<br>
<br>
<br>
28.09.2018, 20:17, "Jian Yu" <yujian@whamcloud.com>:<br>
> Hi George,<br>
><br>
> Please run "mkdir ./mirrored/" first, then run "lfs mirror create":<br>
><br>
> # mkdir ./mirrored/<br>
><br>
> # lfs mirror create -N2 ./mirrored/<br>
><br>
> # lfs getstripe ./mirrored/<br>
> ./mirrored/<br>
> lcm_layout_gen: 0<br>
> lcm_mirror_count: 2<br>
> lcm_entry_count: 2<br>
> lcme_id: N/A<br>
> lcme_mirror_id: N/A<br>
> lcme_flags: 0<br>
> lcme_extent.e_start: 0<br>
> lcme_extent.e_end: EOF<br>
> stripe_count: 1 stripe_size: 1048576 pattern: raid0 stripe_offset: -1<br>
><br>
> lcme_id: N/A<br>
> lcme_mirror_id: N/A<br>
> lcme_flags: 0<br>
> lcme_extent.e_start: 0<br>
> lcme_extent.e_end: EOF<br>
> stripe_count: 1 stripe_size: 1048576 pattern: raid0 stripe_offset: -1<br>
><br>
> --<br>
> Best regards,<br>
> Jian Yu<br>
><br>
> -----Original Message-----<br>
> From: lustre-discuss <lustre-discuss-bounces@lists.lustre.org> on behalf of George Melikov <mail@gmelikov.ru><br>
> Date: Friday, September 28, 2018 at 8:05 AM<br>
> To: lustre-discuss <lustre-discuss@lists.lustre.org><br>
> Subject: [lustre-discuss] lfs mirror create directory<br>
><br>
> Does `lfs mirror create` work for directories in 2.11?<br>
> Tried it, nope :(<br>
><br>
> # lfs mirror create -N2 ./mirrored/<br>
> lfs mirror create: cannot create composite file './mirrored/': Is a directory<br>
><br>
> But documentation says it's good to go...<br>
> > lfs mirror create <--mirror-count|-N[mirror_count]<br>
> > [setstripe_options|[--flags<=flags>]]> ... <filename|directory><br>
><br>
> ____________________________________<br>
> Sincerely,<br>
> George Melikov,<br>
><br>
_______________________________________________<br>
lustre-discuss mailing list<br>
lustre-discuss@lists.lustre.org<br>
<a href="http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org">http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org</a><br>
</div>
</span></font></div>
</body>
</html>