[LU-2237] Customer Entered incorrect parameter when enabling quotas. System is down. Created: 25/Oct/12 Updated: 16/Feb/13 Resolved: 16/Feb/13 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.1.1 |
| Fix Version/s: | Lustre 2.4.0, Lustre 2.1.4 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Roger Spellman (Inactive) | Assignee: | nasf (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Lustre servers are running 2.6.32-220.el6, with Lustre 2.1.1.rc4. |
||
| Attachments: |
|
| Severity: | 1 |
| Rank (Obsolete): | 5295 |
| Description |
|
Customer's system is down. This is a very high priority issue. Summary: The customer's file system was running fine, and he wanted to add quotas. He added them with an invalid option, and was unable to mount clients. We tried to fix the problem, and have not been able to. Here are the details. ==================== STEP 1 ==================== Customer unmounted the file system, and ran the following command on each Lustre target. Note the addition of a dash before the letter u (i.e. the command should have said 'ug2', but it said '-ug2'.
Customer was able to mount the targets on the Lustre servers. However, he could not connect with a client. ==================== STEP 2 ==================== Once we noticed that the quota_type had the extra dash, we tried fixing the situation by running the command without the dash. The command we ran was:
tunefs.lustre showed that BOTH parameters were present. I.e. on an OST, we saw: checking for existing Lustre data: found CONFIGS/mountdata Read previous values: And with tunefs.lustre on the MDT/MGS, we saw: checking for existing Lustre data: found CONFIGS/mountdata Read previous values: Again, we could mount all the Lustre servers, but clients would not mount. ==================== STEP 3 ==================== Next, we thought that we could simply remove those parameters. So, for example, from the 2nd MDS (in an active-standby pair), customer ran:
The command and the output can be seen in the file first-try-tunefs.lustre.log.2. But, I put it here, because it shows that the mdt.quota_type parameter seems to be gone now. checking for existing Lustre data: found CONFIGS/mountdata Read previous values: Permanent disk data: Writing CONFIGS/mountdata We ran similar commands on each OST, e.g.
The output from these commands can be found in first-try-tunefs.lustre.log.3 and first-try-tunefs.lustre.log.4 (3 & 4 are the two OSSes; each OSS has 6 targets). At this point, customer was NOT ABLE to mount the MDT/MGS. ==================== STEP 4 ==================== So, we decided to run the command from the first MDS, as we normally format from there. So, we ran:
The output of this command was: checking for existing Lustre data: found CONFIGS/mountdata Read previous values: Permanent disk data: Writing CONFIGS/mountdata We ran similar commands on each OST, e.g.
The output from these commands can be found in second-try-tunefs.lustre.log.3 and second-try-tunefs.lustre.log.4. At this point, customer was STILL NOT ABLE to mount the MDT/MGS. ==================== STEP 5 ==================== Customer thought that the problem might be with MMP. So, customer removed and enabled MMP, i.e.
At this point, customer is STILL NOT ABLE to mount the MDT/MGS. ==================== LIST OF ATTACHED FILES ==================== messages.01.gz: gzipped /var/log/messages file from first MDS first-try-tunefs.lustre.log.2: tunefs command run from second MDS second-try-tunefs.lustre.log.1: tunefs command run from first MDS ==================== LOGs from MDS ==================== The log messages in /var/log/messages on the first MDS are: Oct 24 20:25:09 ts-xxxxxxxx-01 kernel: LDISKFS-fs (dm-4): mounted filesystem with ordered data mode. Opts: The file /var/log/messages.01 is from the first MDS. |
| Comments |
| Comment by Peter Jones [ 25/Oct/12 ] |
|
Niu is looking into this |
| Comment by Niu Yawei (Inactive) [ 25/Oct/12 ] |
"cound not connect with a client" means client can't be mounted? Is there any error message on client? The proper "quota_type" should be mdd.quota_type but not mdt.quota_type, and we usually should use "lctl conf_param" on MGS to configure quota. I'll look further into the server logs to see why the mds can't be mounted at the end. |
| Comment by Andreas Dilger [ 25/Oct/12 ] |
|
Roger, it appears the current problem with the MDT is that the "last_rcvd" file is missing or inaccessible: llo_local_objects_setup()) creating obj [last_rcvd] fid = [0x200000001:0xb:0x0] rc = -13 -13 == EACCESS. This should only ever be "0" for success, or -17 = -EEXIST (neither of which print an error message). You need to verify that the "last_rcvd" file in the MDT filesystem exists and does not have a strange permission - I believe it should be 0666, but cannot log into a test system right now to check. In the worst case, it should be possible to mount the MDT filesystem with ldiskfs, rename the existing file out of the way, unmount the MDT, and a new one will be created when it is again mounted with lustre. |
| Comment by Roger Spellman (Inactive) [ 26/Oct/12 ] |
|
Andreas, Here is the terminal session:
Please advise on how to proceed. Also, customer would like to know: Is it possible to back up the metadata information via ldiskfs since we were able to mount it that way? If so, is it possible to restore the metadata on a reformatted MDT? Is this a possible course of action? |
| Comment by Andreas Dilger [ 26/Oct/12 ] |
|
Roger, Unfortunately, in Lustre 2.1 it is NOT possible to do a file-level backup/restore of the MDT. This functionality is not restored until the 2.3 feature release. Only block device backups are supported for 2.1. |
| Comment by Andreas Dilger [ 26/Oct/12 ] |
|
I'm just getting on a plane, but if the previous suggestions do not work, please set full debugging (lctl set_param debug=-1" and then try mounting the MDS, and dump the debug log and attach it here. Hopefully someone will get a chance to loom at this while I'm flying. |
| Comment by Roger Spellman (Inactive) [ 26/Oct/12 ] |
|
messages file after updating last_rcvd |
| Comment by Roger Spellman (Inactive) [ 26/Oct/12 ] |
|
debug file after updating last_rcvd |
| Comment by Roger Spellman (Inactive) [ 26/Oct/12 ] |
|
I just attached two files from the customer. Here is his response: Andreas' suggestions did not work. It is now returning ESTALE. I tried creating an empty last_rcvd file and that caused ESTALE when mounting. I then created a new filesystem using loopback on another machine with the same file system name, pulled last_rcvd from it and continued to see ESTALE. |
| Comment by Andreas Dilger [ 26/Oct/12 ] |
|
Alex or Fan Yong, could you please take a look into this? It seems there is some strangeness happening with loading the last_rcvd file. The priority is to get the system up and working, then later to figure out how to avoid such a problem in the future. |
| Comment by nasf (Inactive) [ 27/Oct/12 ] |
|
We do not know the reason why the local file "last_recv" was lost, but we know why it prevented the MDT to be mounted. Because the FID mapping for the "last_recv" was added into the OI file. Although the "last_recv" file was lost, but its FID mapping still existed in the OI file. Then the OI lookup with the FID (for the "last_recv") can find the staled inode, which not only prevented the new "last_recv" to be created, but also failed to re-use some existing "last_recv". Such issue has been fixed by OI scrub in Lustre-2.3, and related patch will be back ported to Lustre-2.1 by Lsy. Currently, the back porting is not finished yet. This patch is a temporary solution to allow the customer to mount their system. |
| Comment by nasf (Inactive) [ 27/Oct/12 ] |
|
Roger, would you please to ask the customer to try above patch, and remount the MDT. It works locally for myself. Thanks! |
| Comment by Andreas Dilger [ 27/Oct/12 ] |
|
Fan Yong, thank you for the patch. Something similar is already included in Lustre 2.3, correct? Roger, there are RPMs for download at http://build.whamcloud.com/job/lustre-reviews/10115/ but they are against the tip of b2_1 (2.1.3+), while the customer is running 2.1.1 according to the bug. It will still be about 5h until the regression testing on Fan Yong's patch completes, but the first 3h of testing has passed, and I'd expect any change like this to show up problems fairly quickly. |
| Comment by nasf (Inactive) [ 27/Oct/12 ] |
|
Andreas, I do not know why the original "last_recv" file was lost. But it is known why the "last_recv" cannot be re-created, and why failed to re-use some existing "last_recv" file. The known issues have been fixed in OI scrub patches, and included into the Lustre-2.3 already. So as long as we back port OI scrub to Lustre-2.1, then it can fix them completely. Lsy is working on the back porting, but it is not finished yet. |
| Comment by nasf (Inactive) [ 28/Oct/12 ] |
|
This is the patch for new test cases for that: |
| Comment by Roger Spellman (Inactive) [ 28/Oct/12 ] |
|
I am getting errors running git. $ git fetch http://review.whamcloud.com/p/fs/lustre-release refs/changes/95/4395/2 && git checkout FETCH_HEAD Do I need to be on a certain branch? I have tried both the head and 2.1.1-RC4. Can you please post an exact set of commands to get this patch? |
| Comment by Andreas Dilger [ 28/Oct/12 ] |
|
The following commands check out a clean b2_1 branch, change to the 2.1.1 release branch (which is identical to 2.1.1-RC4), then applies just the patch from change 4395. The first two lines can be skipped if you already have a local clone of the lustre "master" or "b2_1" branch. git clone -b b2_1 http://git.whamcloud.com/fs/lustre-release.git lustre-2_1 cd lustre-2_1 git checkout 2.1.1 git fetch http://review.whamcloud.com/p/fs/lustre-release refs/changes/95/4395/2 && git cherry-pick FETCH_HEAD |
| Comment by Roger Spellman (Inactive) [ 29/Oct/12 ] |
|
Thanks. I tested this on my system by removing last_rcvd. I was unable to mount with the existing 2.1.1.rc4 code. I was able to mount with the new code. I will be giving this to the customer |
| Comment by nasf (Inactive) [ 01/Nov/12 ] |
|
Roger, any feedback from the customer? |
| Comment by Roger Spellman (Inactive) [ 02/Nov/12 ] |
|
The customer reported that he is back up and running, but without quotas. We would like to know if quotas are supported in this release (2.1.1.rc4). Can we use ug2? I.e. lctl conf_param mdd.xxxxx-MDT0000.quota_type=ug2 |
| Comment by Peter Jones [ 02/Nov/12 ] |
|
Roger Quotas are certainly supported in the 2.1.1 release itself and used in production at a number of sites. There may well be some added complications due to the newer kernel you are running for clients, but I will defer to an engineer to ascertain whether that is the case and to comment on the specific syntax you mention Peter |
| Comment by Niu Yawei (Inactive) [ 02/Nov/12 ] |
|
Hi, Roger You should use ug3. lctl conf_param xxxx-MDT0000.mdd.quota_type=ug3, and lctl conf_param xxxx-OSTxxxx.ost.quota_type=ug3. |
| Comment by Andreas Dilger [ 02/Nov/12 ] |
|
Niu, I think that part is clear. What is worthwhile to investigate is why this caused the MDS to explode, and how to prevent that in the future. Perhaps having the quota code ignore unknown quota types ("-" in this case)? |
| Comment by Peter Jones [ 22/Dec/12 ] |
|
Fanyong Fixes have been landed for 2.1.4 for this issue. Are equivalent fixes needed on master? Peter |
| Comment by nasf (Inactive) [ 29/Dec/12 ] |
|
There are two test related patches to be landed: For master: For b2_1: |
| Comment by nasf (Inactive) [ 17/Jan/13 ] |
|
When the patches for b2_1 can be landed? |