General NAS-Central Forums

Welcome to the NAS community
It is currently Mon Nov 20, 2017 3:38 pm

All times are UTC




Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Thu Jan 21, 2010 8:57 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
Quote:
Still i'm having problems writing in the password in /etc/shadow.
cp /etc/shadow /path/to/ftpshare/shadow
ftp
edit
ftp
mv /etc/shadow etc/shadow.backup
cp /path/to/ftpshare/shadow /etc/shadow
Quote:
can you help me with the meaning of this?
uuid All devices in a raidarray can have some global unique identifier, something like 9cb23d0b:ca6a5699:7bedca49:a0a9019c. Could be that this is your problem. If the uuid of one of the partitions is damaged, the raidarray is not started. A raid1 array could be started degraded, but raid0 or linear not.
extra_options could be anything
'> /dev/null 2>&1' means redirect output (both stdout and stderr) to /dev/null, which is a disposal device.
Quote:
and ... it exists a way for me to see the content of this variables?
When you have shell access, yes.
Create a scriptfile which only calls startMd_User:
Code:
#!/bin/sh

. /oldroot/etc/libraid

startMd_User
Umount and stop the raidarray. Start the script with 'sh -x myscript'. It will printout all commands it executes.


Top
 Profile  
 
PostPosted: Fri Jan 22, 2010 12:39 am 
Offline

Joined: Wed Dec 16, 2009 9:57 pm
Posts: 134
Mijzelf,

Big problem probably due to newbies commands.

During my tests one of the partitions of sdx7 deleted is superblock.

in mdadm --examine in my computer appers as "Removed" to the other disk of the array.

I think think this is the partition that boot the lacie... Now the lacie doen't start (the blue lights are there but i can't acess nothing)

I saw in some pages that you con recover the superblock with mdadm --create without losing data in that raid system. Is this true? Do you know what is the command?

Best regards,
andreus


Top
 Profile  
 
PostPosted: Fri Jan 22, 2010 8:18 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
Connect both drives to your computer. First make a backup of the current partitions:
Code:
dd if=/dev/sdx7 | gzip > /some/storage/directory/partition7a.gz
dd if=/dev/sdy7 | gzip > /some/storage/directory/partition7b.gz
It doesn't hurt to backup sdx6 and sdx8 as well. You never know.
Then find out which one is damaged:
Code:
mdadm --assemble /dev/md0 /dev/sdx7 --run
will assemble a degraded array, when /dev/sdx7 is still valid. Check if the contents are still ok:
Code:
mount /dev/md0 /some/mountpoint -o ro
# have a look
umount /dev/md0
fschk /dev/md0
If everything is allright, you can add the other device:
Code:
mdadm --add /dev/md0 /dev/sdy7
The array will synchronize.


Top
 Profile  
 
PostPosted: Fri Jan 22, 2010 8:45 pm 
Offline

Joined: Wed Dec 16, 2009 9:57 pm
Posts: 134
Mijzelf, saved my life again!!

I follow your smart advice and have backuped sda7, sdb7, sda8, sdb8, sda9, sdb9.

And now i also have ssh access!

The only that separates me from full happiness now, is resolve the problem with the automatically assemble of the sdx2 (user data) raid using lacie script !

I tried ...
Quote:
Create a scriptfile which only calls startMd_User:
Code:
#!/bin/sh

. /oldroot/etc/libraid

startMd_User

Umount and stop the raidarray. Start the script with 'sh -x myscript'. It will printout all commands it executes.

And nothing happened...

If i mount it in the mountfsuser.i initiate file using...
Code:
mdadm --assemble /dev/md4 /dev/sda2 /dev/sdb2 --run --force > /dev/null 2>&1

or
Code:
mdadm --assemble /dev/md4 --uuid=d132e308:3632e52b:d2d672c2:6f6aca51 --run --force > /dev/null 2>&1

It works.

But the command from the lacie script
Code:
$MDADM --assemble $device ${NEW_COMPONENT_LIST} -u ${UUID} --run --force ${extra_options} > /dev/null 2>&1

Returns in the log
Code:
Jan 20 20:34:34 storage local1.notice mountuserfs: Starting md4 (User)
Jan 20 20:34:37 storage user.notice kernel: egiga0: link down
Jan 20 20:34:37 storage daemon.notice NetworkManager: <information>^Iegiga0: Device is fully-supported using driver 'MV518x-EGIGA'.
Jan 20 20:34:37 storage daemon.notice NetworkManager: <information>^Inm_device_init(): waiting for device's worker thread to start
Jan 20 20:34:37 storage daemon.notice NetworkManager: <information>^Inm_device_init(): device's worker thread started, continuing.
Jan 20 20:34:37 storage daemon.notice NetworkManager: <information>^INow managing wired Ethernet (802.3) device 'egiga0'.
Jan 20 20:34:37 storage daemon.notice NetworkManager: <information>^IDeactivating device egiga0.
Jan 20 20:34:38 storage local1.notice mountuserfs: Failure: Could not start md4
Jan 20 20:34:38 storage user.warn kernel: XFS: SB read failed
Jan 20 20:34:38 storage local1.notice mountuserfs: mount:
Jan 20 20:34:38 storage local1.notice mountuserfs: mounting /dev/md4 on /home failed
Jan 20 20:34:38 storage local1.notice mountuserfs:
Jan 20 20:34:38 storage local1.notice mountuserfs: WARNING, failed to mount
Jan 20 20:34:38 storage local1.notice InitNG: Service mountuserfs is up.


And i can't printout the contents of those variables to see what is wrong. Do you have any idea or any other suggestions?

Thankx
andreus


Top
 Profile  
 
PostPosted: Fri Jan 22, 2010 9:43 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
You can remove the '> /dev/null 2>&1', which will make mdadm more verbose, I think. Further you can put an echo before the line:
Code:
echo $MDADM --assemble $device ${NEW_COMPONENT_LIST} -u ${UUID} --run --force ${extra_options}
Then you can see the exact command.


Top
 Profile  
 
PostPosted: Fri Jan 22, 2010 11:04 pm 
Offline

Joined: Wed Dec 16, 2009 9:57 pm
Posts: 134
Mijzelf,

I think i finally discovered the problem

I used your inscrutions and was able to see all the script with the variables.

So, the problem is this:

At some point the script does this
Code:
/sbin/md_eeprog -g /dev/md4
with returns
UUID=132e308:3632e52b:d2d672c2:6f6aca51


and then compares to the UUID of the raid partitions that is d132e308:3632e52b:d2d672c2:6f6aca51
Exactly the same but with one more "d" at the start! And then stops the assemble and tries to repair the array. But since it is linear array it can't be repair and gives the message 'Failure: Could not start md4'.

I checked de other md uuid's
Code:
md4 (sdx2) d132e308:3632e52b:d2d672c2:6f6aca51 [userdata]
md3 (sdx5) 28b51f20:4971b586:f9bf9d67:ff5c652a [swap]
md2 (sdx9) b99514f8:6353c72a:b9147367:a1f0e6ed [snap (config)]
md1 (sdx8) 703dd259:3783e771:db01e23a:57dae9e0 [root]
md0 (sdx7) 2c8978d4:152afb36:ac1f3801:5b1867d5 [boot]

Exacly the same number of caracters so, i think the command "/sbin/md_eeprog -g /dev/md4" is returning the uid wrong! It's not an array problem!

Then i google it ... and found that you can use
Code:
/sbin/md_eeprog -s {UUID} /dev/md4 #to set the UUID in the memory of the lacie
so i did
/sbin/md_eeprog -s d132e308:3632e52b:d2d672c2:6f6aca51 /dev/md4 #in ssh shell


And finally!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! SUCESS!!!!!!

By the way
Code:
$MDADM --assemble $device ${NEW_COMPONENT_LIST} -u ${UUID} --run --force ${extra_options} > /dev/null 2>&1
is
/sbin/mdadm --assemble /dev/md4  /dev/sda2 /dev/sdb2 --uuid=d132e308:3632e52b:d2d672c2:6f6aca51 --run --force > /dev/null 2>&1
with was returning an error because of the bad uuid


THANK YOU FOR ALL YOUR HELP! WITHOUT YOU I NEVER WOULD DONE IT.

I hope this helps another users with the same problem.

andreus


Top
 Profile  
 
PostPosted: Sat Jan 23, 2010 9:38 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
You are welcome.

In imitation of you I also googled on /sbin/md_eeprog, and google found only this (very nice blog, by the way), so I suppose this is the source of your wisdom.
george states that the uuids are stored in eeprom, and read/written by md_eeprog. So somehow the eeprom on your box was corrupted. Any idea how you did that?


Top
 Profile  
 
PostPosted: Sat Jan 23, 2010 11:20 am 
Offline

Joined: Wed Dec 16, 2009 9:57 pm
Posts: 134
Yes, that blog is the only page in google that has that keyword. I forget to mention his blog in the with the fuss!
It's better latter then never so i found this solution in "Steppenwolf blog" http://www.steppen-wolf.eu/blog/2009/11/18/lacie-2big-network-hack-telnet-openssh-ntpd-cups-and-more/ (use google translate from italian to english)

Yes, i have an idea. Stupidity! :?

I have have a friend that as a lacie like mine, but is lacie sufferd from a power failure and doesn't even start (it's dead - no lights at all).
So he called me in dispair (as you can imagine) if i can recover his data.
I went to his home with my lacie, take my disks off, and put his disks in.
Started the lacie, go to admin page and access to the lacie admn page (with is configuration) but not to the disks.
After several hours of dispair from my friend who was only thinking in recovering is data i came up with a stupid idea: Make and update to the lacie to version 2.2.3 with is disks in the lacie!
But my friend's NAS was in version 2.0.6 and mine in 2.0.7 so i could update the lacie, coun't recovered the data, and damaged my lacie too!!

Now that i have recovered my data and lacie i will try to connect his disks to my computer and finally recover his data!

Best regards,
andreus


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group