Monday, March 16, 2009

Change the slot number of Raid 1 device by mdadm

The command gives the following results after one drive is removed from Raid 1:
mdadm --detail /dev/md1
Number Major Minor RaidDevice State
0 0 0 0 removed
1 8 17 1 active sync /dev/sdb1

What I wanted to do is to move the device /dev/sdb1 to slot 0 from slot 1. And I found I could do that by running mdadm in grow mode with the degraded Raid 1 array:
mdadm --grow --force -n 1 /dev/md1
mdadm --detail /dev/md1
Number Major Minor RaidDevice State
0 8 22 0 active sync /dev/sdb1
mdadm --grow --force -n 2 /dev/md1
mdadm --detail /dev/md1
Number Major Minor RaidDevice State
0 8 17 0 active sync /dev/sdb1
1 0 0 1 removed

Then add a new device into md1
mdadm /dev/md1 -a /dev/sda1
mdadm: hot added /dev/sda1

Now I can install Lilo to the drive with -H option

Sunday, March 8, 2009

Short file name error while saving old doc file as docx in word 2007

Today when I tried to save a doc file I received in email as docx file in word 2007, I got a weird error message:
Cannot save the file. 'any file name.docx'
is not a valid short file name (maximum eight characters, plus a three-character file extension). Type a valid file name, and then save the file again.
Saving the file in doc format is still fine though.
I did some investigation and ruled out the possibility that the complete file path is over the 255 character limit. Then I realized that this doc file was created in a MS Word version older than 97 so that it can't be saved as docx file before being converted to a compatible format. What I did to fix it is to click the Convert menu item (click the Office Button to show the menu when the file to be converted is open in word) as shown below(left) in word 2007 after I open the original doc file.
When the following dialog (right) pops up, I click the OK button and it's ready to be saved in docx format now without the annoying "short file name" error any more.