HOWTO: delete a failing GPFS disk from the share

I happily was playing around with my new GPFS storage share when one of the slow disks of it failed while doing a data transfer, rendering the whole share unusable.The systemctl shows this:

/local ## > systemctl status gpfs
* gpfs.service - General Parallel File System
Loaded: loaded (/usr/lib/systemd/system/gpfs.service;
enabled; vendor preset: disabled)
Active: active (running) since XXX; 2 weeks 6 days ago
Main PID: 1225 (runmmfs)
CGroup: /system.slice/gpfs.service
- 1225 /usr/lpp/mmfs/bin/mmksh /usr/lpp/mmfs/bin/runmmfs
- 4561 /usr/lpp/mmfs/bin/mmfsd

DATE computer mmfs[4561]: [N] Connecting to XXX
DATE computer mmfs[4561]: [E] Disk failure.
Volume local. rc = 5. Physical volume log02_sata02.

DATE computer mmfs[4561]: Error=MMFS_DISKFAIL, ID=0x9C6C05FA,
Tag=8545868: Disk failure. Volume local. rc = 5.
Physical volume log02_sata02

DATE computer mmfs[4561]: [X] File System local unmounted
by the system with return code 218,
reason code 0, at line 2332 in /XXX/mmfs/ts/lockmgr/ShHashS.C

DATE computer mmfs[4561]: Error=MMFS_SYSTEM_UNMOUNT,
ID=0xC954F85D, Tag=8545869: Unrecoverable file system operation error. Status code 218. Volume local


So let’s delete the physical volume log02_sata02 from the /local volume. Like this:

 ## > mmdeldisk local log02_sata02 
Deleting disks ...
Scanning file system metadata, phase 1 ...
100 % complete on DATE
Scan completed successfully.
...
Scanning file system metadata, phase 5 ...
100 % complete on DATE
Scan completed successfully.
Scanning user file metadata ...
30.92 % complete on DATE
( 120560 inodes with total 53221 MB data processed)
57.66 % complete on DATE
( 275416 inodes with total 99241 MB data processed)
100.00 % complete on DATE
( 500160 inodes with total 172479 MB data processed)
Scan failed on 4944 out of 339421 user or system files:
Some data are unavailable.
Too many disks are unavailable.
Check file 'XXX.interestingInodes.XX' on XX for inodes
with broken disk addresses or failures.
Attention: No disks were deleted, but some data was migrated.
The file system may no longer be properly balanced.
tsdeldisk completed.
mmdeldisk: tsdeldisk failed.
Verifying file system configuration information ...
mmdeldisk: File system local has some disks that are
in a non-ready state.
mmdeldisk: Propagating the cluster configuration data to all
affected nodes. This is an asynchronous process.
mmdeldisk: Command failed.
Examine previous error messages to determine cause.

It doesn’t seem to work. What now? We don’t have a spare, otherwise you could replace the disk directly. Something like mmrpldisk local log02_sata02 log05_spare01, supposing we call the spare log05_spare01. Then we try as suggested here for active (-a) GPFS systems

## > mmdeldisk local log02_sata02 -r -a
Verifying file system configuration information ...
mmdeldisk: File system local has some disks
...the same than above...
mmdeldisk: Command failed.
Examine previous error messages to determine cause.

So also fails. I don’t want to stop it because I want to keep working while replacing a broken disk. Somehow I manage like this:

## > mmdeldisk local log02_sata02 -p 
Verifying file system configuration information ...
mmdeldisk: File system local has some disks
that are in a non-ready state.
Deleting disks ...
Checking Allocation Map for storage pool system
6 % complete on DATE
...
100 % complete on DATE
Scanning file system metadata, phase 1 ...
100 % complete on DATE
...
Scanning file system metadata, phase 5 ...
100 % complete on DATE
Scan completed successfully.
Scanning user file metadata ...
0.02 % complete on DATE
( 0 inodes with total 0 MB data processed)
...
100.00 % complete on DATE
( 500160 inodes with total 173650 MB data processed)
Scan completed successfully.
Check file 'XXX.interestingInodes.12884901893' on XXX
for inodes with broken disk addresses or failures.
tsdeldisk completed.
mmdeldisk: Propagating the cluster configuration data
to all affected nodes.
This is an asynchronous process.

Now mmlsdisk local DONT show log02_sata02 (the broken disk) so I guess we are fine. I don’t restripe or anything, simply keep working as before. With one disk less…😁😁😁

HOWTO: purge all the Chrome information from your mac

The image from the very post.

As usual, I’m not going to tell you how to do something you shouldn’t do. Why do you want to remove all Chrome data? With all due respect, do you find Safari good enough for you? If so, can you please convince me? I’ve tried others but I keep coming back to Chrome.

First read the article, then let me explain why I want to purge Chrome. I’m having mixed feelings now with respect to my MacBook. Sometimes it simply doesn’t react to my typing, and I’m not able to pinpoint the reason. I’m so lost that I’ve decided to try another hardware. And in the new hardware, first thing I try is usually installing Chrome. The tests were okay but they didn’t go over the annoyance of a full migration. Then I’m faced with the dilemma. Should I reinstall the whole OS or remove all the traces of my infidelity? I choose the last, but what I surprise I get when, after removing the Chrome.app and reinstalling it, I find out I’m still logged in and I can see all my bookmarks. That’s because uninstalling an app in a mac is not as easy as you’re told! You need admin rights or your playing will leave unexpected traces on the Library folder.

No problem if you are the admin. Just go as root on a Terminal, and, after uninstalling Chrome, cd to the Library and remove any Google folder. Note: on my macOS there are two Library folders, one under root (/Library/Application Support) and another under the user area, that is, on /Users/USERNAME/Library/Application Support. Be aware of it ❤️.

Shorts

There is a new virus that swaps the genre of those who get it. So if you get it as a male, you end up female. Some countries get crazy about, some of them simply ignore it.

The main character walks across a city, chasing a man. You don’t know why, also you don’t know where. The city has features from all the cities in the world. Actually it is all the cities in the world.

A young postdoc in marine biology discovers she can speak with the dolphins. The male she speak first tries to convince her to join him underwater. It’s a reverse “little mermaid” story.

Filebrowser, a docker web-based file explorer for your server

The logo of fiebrowser. Image taken from here.

I was asked to give access to some of the data stored in our servers in an easy way. First I thought on samba, then cifs share, but you know me, and sometimes I just want to use something nocode. An out-of-the-box working solution. Like a website to browse your files. Don’t tell me more, what we’re looking for is filebrowser. Here you have the installation procedure for all the possible platforms and a blog description of its usage. I have docker installed everywhere already, so what I try is directly to launch it on one of our servers:

$ docker run -d --name=Filebrowser --hostname=filebrowser -p 8086:80 -v /path/to/folder2share:/srv -e TZ="Europe/Madrid" filebrowser/filebrowser:latest

After that, I have what I want available on the intranet. Once I log in, I see only what’s below /path/to/folder2share and nothing else, which is nice. Anyway I create another user and give it only downloading rights using the web interface itself. So far so good. What if I want this to be exposed to the internet? I go for ngrok, that I already recommended here. Once I have my account ready and ngrok installed, I lauch the redirection like this:

#> ./ngrok config add-authtoken My-Personal-Ngrok-Token

#> ./ngrok http http://computername.domain.org:8086

And that’s it. If you don’t have enough have a look to the filebrowser github, but seriously, no need. One catch: if your ngrok account is free, the generated internet address will be up only for 8 hours. Which should be enough for most of the downloads 😉. Nothing else to say here, so have a nice day!

HOWTO: a simple website with upload files option and other not so simple solutions

There are two ways to do this: the easy one and the professional. At the end, I took the easy one from the classic w3schools, w3schools php file upload. A la nocode,

  1. Copy the code from the w3schools and save it on your /var/www/html/ as upload.php and indext.html.
  2. Edit the $target_dir = "uploads/";, so that it points to a directory the web user can write
  3. Restart systemctl restart httpd and test.

One note about checking file_uploads = On on CentOS 7.X. I had it on by default, but I didn’t know where was my php.ini. Solution: it’s on /etc/. Here is my dump of the concept:

## > grep 'upload' php.ini
; Whether to allow HTTP file uploads.
; http://php.net/file-uploads
file_uploads = On
; Temporary directory for HTTP uploaded files (will use system default if not
; http://php.net/upload-tmp-dir
;upload_tmp_dir =
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 2M
; Maximum number of files that can be uploaded via a single request
max_file_uploads = 20
; Enable upload progress tracking in $_SESSION
; http://php.net/session.upload-progress.enabled
;session.upload_progress.enabled = On
; (i.e. upload completed).
; http://php.net/session.upload-progress.cleanup
;session.upload_progress.cleanup = On
; A prefix used for the upload progress key in $_SESSION
; Default Value: "upload_progress_"
; Development Value: "upload_progress_"
; Production Value: "upload_progress_"
; http://php.net/session.upload-progress.prefix
;session.upload_progress.prefix = "upload_progress_"
; containing the upload progress information
; http://php.net/session.upload-progress.name
;session.upload_progress.name = "PHP_SESSION_UPLOAD_PROGRESS"
; How frequently the upload progress should be updated.
; http://php.net/session.upload-progress.freq
;session.upload_progress.freq =  "1%"
; http://php.net/session.upload-progress.min-freq
;session.upload_progress.min_freq = "1"

You may need to change a lot of values on this file. Don’t forget to systemctl restart httpd when you are done with the changes.

Now that we have a working solution with php + html we can try another languages.

If you know Javascript, maybe this is for you.There’s Vanilla Javascript code to implement a drag-and-drop web. Does it work? Actually yes, you can grab the code form codepen and save it right away. The problem? You need a cloudinary account to have it working.

You can think about some fancy CSS-based solution. The css-tricks web has an interesting and clean drag-n-drop solution. I open the example at the end, right click to View Page Source and copy everything there to my web server. The problem? I don’t seem to manage to configure the final path for the saving of the files. Maybe you can?

On Hackito Ergo Sum they let you download a Java applet. Unfortunately the installation instructions are kind of dark, and after an unzip and start the jetty server I don’t manage to get the promised web working. And their 30 minutes of test are gone.

Can we do the same, maybe, with python? Yes of course! Here you have a working github solution. Do I want this? No, precisely because I don’t want to take care of an additional python process. But it deserves to be mentioned here, right?

I found a lot of React solutions. Here you have a working React Drag and Drop file uploader. Actually this solution (and the explanation) almost convinced me. You can find here quite some codesandbox working examples. But again, I’m sorry but it’s a killer for my problem.

As you know, I’m not a web developer but a simple “provider” of solutions, and my particular setup will be fine with the php + html code. The rest of the solutions, I’ll leave as an exercises to the reader 😉❤️.

FIX: RDP authentication error has occurred. The function requested is not supported. This could be due to CredSSP encryption.

Updates, updates, updates. From W.7 to W.10, from W.Server 2008 to Server 2012, from CentOS to Rocky. Always update, never go offline, never surrender. The error above appears when trying to connect to a Windows Server that in principle is online but doesn’t get any updates because updates sometimes break drivers and similar. The full error reads:

An authentication error has occurred. 
The function requested is not supported.
Remote Computer: 1.2.3.4
This could be due to CredSSP encryption oracle remediation.
For more information, see https://support.microsoft.com/fwlink/?linkid=866660'

The more information link, of course, doesn’t work. The changes on the setup of the network were minimal, except the upgrade of the W.7 computer to a W.10 OS. I don’t have any information about how the upgrade was done, but I know it was successful and the only thing that does not seem to work is the remote desktop connection. I found two descriptions of a similar issue. One by the San Diego University, and another by Microsoft itself, that I have reinterpreted below before giving my solution. From the Microsoft article I pay attention to the interoperability matrix for scenarios that cause operational failures between a Server and a Client… case one

Server
UpdatedForce updated clientsMitigatedVulnerable
ClientUpdatedAllowedBlocked 2AllowedAllowed
Force updated clientsBlockedAllowedAllowedAllowed
MitigatedBlocked 1AllowedAllowedAllowed
VulnerableAllowedAllowedAllowedAllowed
The matrix. As it comes from the source.

In that case the client has the CredSSP update installed, and Encryption Oracle Remediation is set to Mitigated. This client will not RDP to a server that does not have the CredSSP update installed. What to do then? I don’t want to update two computers, so I follow the San Diego University solution. In brief, on the W.10 PC, run gpedit.msc, on it, browse to Computer Configuration
-> Administrative Templates
-> System
-> Credentials Delegation in the navigation panel.
Then we change
Encryption Oracle Remediation policy –> to Enabled, and then
– Protection Level –> to Vulnerable.

After that we can connect happily to our Server. But a little bit less safely 😉.

Python regex symbols cheatsheet

I’ve decided to refresh my python knowledge, in a vain attempt to build up a collection of cheat sheets on all the programming languages I have ever used. I’ve adapted the below table from this book. Have a look to all of it, or even better, buy a printout, I believe it’s a funny one in addition to useful! So here you have it.

sequenceeffect
?matches zero or one of the preceding group
*matches zero or more of the preceding group
+matches one or more of the preceding group
{n}matches exactly n of the preceding group
{n,}matches n or more of the preceding group
{,m}matches 0 to m of the preceding group
{n,m}matches at least n and at most m of the preceding group
{n,m}? or *? or +? non-greedy match of the preceding group
^spamstring must begin with spam
spam$string must end with spam
.matches any character, except newline characters
\d, \w, and \smatch a digit, word, or space character
\D, \W, and \Smatch anything except a digit, word, or space character
[abc] matches any character between the brackets
[^abc]matches any character that isn’t between the brackets

Now an example. You don’t need it probably, but here it comes.

>>> atRegex = re.compile(r’.at’)
>>> atRegex.findall(‘The cat in the hat sat on the flat mat.’)
[‘cat’, ‘hat’, ‘sat’, ‘lat’, ‘mat’]

The example above is also from the same book. Automate the Boring Stuff with Python. I was expecting something else with that title, but anyway, it’s a very entertained reading. Seriously. Have a look even if you are not a python enthusiast 😉.

What to do when you are on home office without a warning

Short answer: script everything. Long answer: organise your tasks, and plan those without schedule. I can review my scripts and try new Front-Ends, maybe start up that project I was interested in and was not working because of the constant flow of customers. I don’t sell so I don’t need to give explanations, but as you, I like to have a clean and functional design, and this is definitely very difficult to achieve it you start with something, then you patch it because your feedback comes a month after the release, then a month later you patch the patch because of a bug that was not found before. So a good and modular design is very important, specially for you, or I would say, for me. Welcome to a fantastic world where you don’t have, or you don’t need, a business model, and where you are your own client, and the cleaner your product, the happier you are. I need to be transparent to myself, invisible to the others. But not so much, or they will forget about me 😁😁😁, if they didn’t already 😔.

And as a dessert, a positive

We are all vaccinated and somehow safe but last Friday my small one (7) returned with a wild coughing from a meeting his classmate, that in principle has “recovered” like a month ago. But it was apparently not enough, because on Saturday morning, when we use to perform an antigen test for the Japanese School, my small son scored a clear positive. The rest of us didn’t, though, but we need to now face the possibility of becoming positive any time soon also.

First thing I did wha to hug him, long and strong. I told him don’t worry, you are vaccinated, you are going to get ill for like 5 days, with coughing and fever, then you will be fine. Second thing I did was to tell him not to worry about passing it to us. After all, we are all supposed to be safe, and in the worst case scenario, I will score a positive and be asked by my employer to work from home for a week or two. Which I would love to do, since I’m definitely not in love with my current position.

He’s evolving fine so far. In the meantime just to minimise the risks we have established a new routine, moved some beds, and schedule frequent outings to breath fresh air and to ventilate the room. Fortunately the weather is not awful, we have like 15 C, and we can still enjoy an open window. We have by chance a good bunch of antigen tests so what we agreed is that we will test ourselves each time we feel bad, or each time we want to go out, and we will keep one person always with him. So far? It looks to me like a not so particular version of a flu, with coughing and fever (39), but maybe it’s because he already got the two doses recommended for children. I think we will pass it, and I think we will pass it happily. I’ll let you know how it ends! 😔

Let’s Catch Up a Bit

It’s been a while since my last update here, almost 3 weeks. I don’t know how interested you are on what’s going on with my life but I will write it up anyway. After my last post, I was busy closing up all the open issues I had at work before our Easter’s break – two weeks out of school here where we live. Of course that is not necessarily an issue to keep updating the blog if you are living in the First World, as we are, but somehow to loose the momentum was easier than before – I mean easier than other years when we were having school holidays. There were multiple reasons, or should I call them excuses. Allow me to elaborate.

In a typical day in my job I can count the number of people I meet, and sometimes even the number of words I say. I do have a lot of tasks and interactions, but if I want to avoid human interaction I can, having an office all only for me and my things. Before holidays I was in one of my antisocial periods, of course with shining moments, but antisocial after all. I didn’t want to explain the students how to do this or that. I sent emails instead. Then I arrive to my hometown and I can’t avoid people as in my working place, from the moment I hop off the plane I can understand, without even wanting it, everyone speaking around. And It’s beautiful. Conversations are no more white noise. And then my socialisation abilities take over my body. I want to go out and speak with everyone, not to sit in front of a computer and write, as I was doing before my holidays. The new environment that I find doesn’t help neither, I loose my desk to my big son, who uses it to do his spring break homework, and we have now two small cousins that want to play with me all the time. With me or with everything they can reach. So I had literally no place to sit with my computer and quietly describe this new experience of unclehood.

Did I have fun at least? Of course. I may even recommend you to leave your computer aside next time you go on holidays, specially if you use it in your daily routine. After arriving back at home, after our holidays, I looked at my laptop with completely different eyes. It’s a tool, not a friend. A communication tool, but it will never replace human interaction. And I started organising my new routine, where I forgot, for the moment, to include my approx ~ 30 minutes of writing time.

Does it mean that I will not write as frequently as before? Maybe… it looks like no one’s really reading daily a blog, mine or another, at least, not amongst my friends. Anyway, this is not only to log my feelings but also to remember me how to fix this or that, so I will keep writing up those. We’ll see. In any case, it’s glad to be back! And I’ll try to be a better blogger, I promise.