General NAS-Central Forums

Welcome to the NAS community
It is currently Sat Nov 18, 2017 7:41 pm

All times are UTC




Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Wed Dec 16, 2009 10:07 pm 
Offline

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

My Lacie 2Big isn't reconizinhg my RAID 0 Concatenation 2x750GB disks.

I have access to the admin webpage and i allready reseted the lacie to factory (version 2.0.6) and it still does'nt work.

I think my drive is trying to read the disks in raid 1???

Need help, please!! I need to recover my data.

Parts of the log file

Dec 15 23:27:09 storage user.warn kernel: Intergrated Sata device found
Dec 15 23:27:09 storage user.info kernel: scsi0 : Marvell SCSI to SATA adapter
Dec 15 23:27:09 storage user.info kernel: scsi1 : Marvell SCSI to SATA adapter
Dec 15 23:27:09 storage user.notice kernel: Vendor: SAMSUNG Model: HD753LJ Rev: 1AA0
Dec 15 23:27:09 storage user.notice kernel: Type: Direct-Access ANSI SCSI revision: 03
Dec 15 23:27:09 storage user.notice kernel: Vendor: SAMSUNG Model: HD753LJ Rev: 1AA0
Dec 15 23:27:09 storage user.notice kernel: Type: Direct-Access ANSI SCSI revision: 03
Dec 15 23:27:09 storage user.notice kernel: SCSI device sda: 1465149168 512-byte hdwr sectors (750156 MB)
Dec 15 23:27:09 storage user.notice kernel: SCSI device sda: drive cache: write back
Dec 15 23:27:09 storage user.notice kernel: SCSI device sda: 1465149168 512-byte hdwr sectors (750156 MB)
Dec 15 23:27:09 storage user.notice kernel: SCSI device sda: drive cache: write back
Dec 15 23:27:09 storage user.info kernel: sda: sda1 < sda5 sda6 sda7 sda8 sda9 sda10 > sda2
Dec 15 23:27:09 storage user.notice kernel: Attached scsi disk sda at scsi1, channel 0, id 0, lun 0
Dec 15 23:27:09 storage user.notice kernel: SCSI device sdb: 1465149168 512-byte hdwr sectors (750156 MB)
Dec 15 23:27:09 storage user.notice kernel: SCSI device sdb: drive cache: write back
Dec 15 23:27:09 storage user.notice kernel: SCSI device sdb: 1465149168 512-byte hdwr sectors (750156 MB)
Dec 15 23:27:09 storage user.notice kernel: SCSI device sdb: drive cache: write back
Dec 15 23:27:09 storage user.info kernel: sdb: sdb1 < sdb5 sdb6 sdb7 sdb8 sdb9 sdb10 > sdb2
Dec 15 23:27:09 storage user.notice kernel: Attached scsi disk sdb at scsi0, channel 0, id 0, lun 0
Dec 15 23:27:09 storage user.notice kernel: Attached scsi generic sg0 at scsi1, channel 0, id 0, lun 0, type 0
Dec 15 23:27:09 storage user.notice kernel: Attached scsi generic sg1 at scsi0, channel 0, id 0, lun 0, type 0

....

Dec 15 23:27:09 storage user.info kernel: edmini_power 1.0 initialised
Dec 15 23:27:09 storage user.info kernel: i2c /dev entries driver
Dec 15 23:27:09 storage user.info kernel: md: linear personality registered as nr 1
Dec 15 23:27:09 storage user.info kernel: md: raid0 personality registered as nr 2
Dec 15 23:27:09 storage user.info kernel: md: raid1 personality registered as nr 3
Dec 15 23:27:09 storage user.info kernel: md: md driver 0.90.1 MAX_MD_DEVS=256, MD_SB_DISKS=27
Dec 15 23:27:09 storage user.info kernel: device-mapper: 4.4.0-ioctl (2005-01-12) initialised: dm-devel@redhat.com
Dec 15 23:27:09 storage user.info kernel: NET: Registered protocol family 2
Dec 15 23:27:09 storage user.info kernel: IP: routing cache hash table of 512 buckets, 4Kbytes
Dec 15 23:27:09 storage user.warn kernel: TCP established hash table entries: 4096 (order: 3, 32768 bytes)
Dec 15 23:27:09 storage user.warn kernel: TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
Dec 15 23:27:09 storage user.info kernel: TCP: Hash tables configured (established 4096 bind 4096)
Dec 15 23:27:09 storage user.info kernel: NET: Registered protocol family 1
Dec 15 23:27:09 storage user.info kernel: NET: Registered protocol family 17
Dec 15 23:27:09 storage user.info kernel: NET: Registered protocol family 5
Dec 15 23:27:09 storage user.info kernel: Loading I2C based RTC driver device interface.
Dec 15 23:27:09 storage user.info kernel: Found TWSI adapter with id: 0
Dec 15 23:27:09 storage user.info kernel: Found I2C RTC rs5c372 @ 0x32
Dec 15 23:27:09 storage user.info kernel: Freeing init memory: 648K
Dec 15 23:27:09 storage user.info kernel: md: md0 stopped.
Dec 15 23:27:09 storage user.info kernel: md: bind<sda7>
Dec 15 23:27:09 storage user.info kernel: raid1: raid set md0 active with 1 out of 2 mirrors
Dec 15 23:27:09 storage user.info kernel: kjournald starting. Commit interval 5 seconds
Dec 15 23:27:09 storage user.info kernel: EXT3-fs: mounted filesystem with ordered data mode.
Dec 15 23:27:09 storage user.info kernel: md: bind<sdb7>
Dec 15 23:27:09 storage user.warn kernel: RAID1 conf printout:
Dec 15 23:27:09 storage user.warn kernel: --- wd:1 rd:2
Dec 15 23:27:09 storage user.warn kernel: disk 0, wo:0, o:1, dev:sda7
Dec 15 23:27:09 storage user.warn kernel: disk 1, wo:1, o:1, dev:sdb7
Dec 15 23:27:09 storage user.warn kernel: .<6>md: syncing RAID array md0
Dec 15 23:27:09 storage user.info kernel: md: minimum _guaranteed_ reconstruction speed: 1000 KB/sec/disc.
Dec 15 23:27:09 storage user.info kernel: md: using maximum available idle IO bandwith (but not more than 200000 KB/sec) for reconstruction.
Dec 15 23:27:09 storage user.info kernel: md: using 128k window, over a total of 7936 blocks.
Dec 15 23:27:09 storage user.info kernel: md: md0: sync done.
Dec 15 23:27:09 storage user.warn kernel: RAID1 conf printout:
Dec 15 23:27:09 storage user.warn kernel: --- wd:2 rd:2
Dec 15 23:27:09 storage user.warn kernel: disk 0, wo:0, o:1, dev:sda7
Dec 15 23:27:09 storage user.warn kernel: disk 1, wo:0, o:1, dev:sdb7
Dec 15 23:27:09 storage user.info kernel: md: md1 stopped.
Dec 15 23:27:09 storage user.info kernel: md: bind<sda8>
Dec 15 23:27:09 storage user.info kernel: md: bind<sdb8>
Dec 15 23:27:09 storage user.info kernel: raid1: raid set md1 active with 2 out of 2 mirrors
Dec 15 23:27:09 storage user.warn kernel: md: mdadm(pid 422) used obsolete MD ioctl, upgrade your software to use new ictls.
Dec 15 23:27:09 storage user.info kernel: md: md2 stopped.
Dec 15 23:27:09 storage user.info kernel: md: bind<sdb9>
Dec 15 23:27:09 storage user.info kernel: md: bind<sda9>
Dec 15 23:27:09 storage user.info kernel: raid1: raid set md2 active with 2 out of 2 mirrors
Dec 15 23:27:09 storage user.warn kernel: md: mdadm(pid 493) used obsolete MD ioctl, upgrade your software to use new ictls.
Dec 15 23:27:09 storage user.info kernel: md: md3 stopped.
Dec 15 23:27:09 storage user.info kernel: md: bind<sdb5>
Dec 15 23:27:09 storage user.info kernel: md: bind<sda5>
Dec 15 23:27:09 storage user.info kernel: raid1: raid set md3 active with 2 out of 2 mirrors
Dec 15 23:27:09 storage user.warn kernel: md: mdadm(pid 552) used obsolete MD ioctl, upgrade your sof
Dec 15 23:27:09 storage user.info kernel: tware to use new ictls.
Dec 15 23:27:09 storage user.info kernel: EXT3-fs: mounted filesystem with ordered data mode.
Dec 15 23:27:09 storage user.info kernel: kjournald starting. Commit interval 5 seconds
Dec 15 23:27:09 storage user.info kernel: kjournald starting. Commit interval 5 seconds
Dec 15 23:27:09 storage user.info kernel: EXT3 FS on md2, internal journal
Dec 15 23:27:09 storage user.info kernel: EXT3-fs: mounted filesystem with ordered data mode.
Dec 15 23:27:09 storage user.info kernel: SGI XFS with ACLs, security attributes, no debug enabled
Dec 15 23:27:09 storage user.info kernel: SGI XFS Quota Management subsystem
Dec 15 23:27:09 storage user.info kernel: Initializing USB Mass Storage driver...
Dec 15 23:27:09 storage user.info kernel: usbcore: registered new driver usb-storage
Dec 15 23:27:09 storage user.info kernel: USB Mass Storage support registered.
Dec 15 23:27:09 storage user.info kernel: Adding 128376k swap on /dev/md3. Priority:-1 extents:1
Dec 15 23:27:09 storage local1.notice InitNG: System is starting up.

Thanks
Andreus


Top
 Profile  
 
PostPosted: Thu Dec 17, 2009 9:18 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
This logfile doesn't contain information about your data raid array. The data partitions are sda2 and sdb2.

In your log I reconize
md0 (sdx7 rootfs Image)
md1 (sdx8 rootfs (Overlay) Image)
md2 (sdx9 Settings?)
md3 (sdx5 Swap)

So I suppose the data array should be md4. If you have shell access you can look if the array is created:
Code:
cat /proc/partitions
# and/or
cat /proc/mdstat
If you don't have shell access I think you should hook up the disks to a Linux PC (a PC booted from a Linux Live CD is fine), and assemble and mount the raid array.


Top
 Profile  
 
PostPosted: Sat Dec 19, 2009 8:20 pm 
Offline

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

Thankx for your help!

I allready installed Linux Live in a USB PEN Drive and manage to run it from boot.

But: How do i connect the disks?
I have a laptop with:
- 1 e-SATA coonection
- 2 USB coonections

I guess i need to buy some disk casset or some adapters.
Can you advise me to what to buy? Some links, some techinical requirements...

PS: Sorry for my english

Thankx,
Andreus


Top
 Profile  
 
PostPosted: Sat Dec 19, 2009 9:47 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
To be able to read the disks, you'll need to connect them both, on the same time. Doesn't matter if it's e-sata or usb. I would buy two usb-sata convertors like this, but two 3.5" usb enclosures like this will work too.
For the convertors the only requirements are: sata, usb2, powersupply.
For the enclosures there's one additional requirement; they should fit a 3.5" disk.

You should also think about where to store the data. I don't know how much data was on the LaCie, it could be more than 1 TB. Maybe you'll need an additional external disk. In that case an esata capable external disk could be handy, but an usb disk with an usb(2!) hub to solve the lack of usb ports is cheaper.

Is this enough information?


Top
 Profile  
 
PostPosted: Sun Dec 20, 2009 7:17 pm 
Offline

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

One more time, Thank you very much for your help!

I have just ordered two usb-sata convertors! I think they will arrive after xmas.

Meanwhile, can you confirm just this:
With the disks connected i can only run linux or the disks could be initialized by windows and some data lost. Am i correct?

I'm a newbie at linux so i think i will need additional help.

Merry Xmas Mijzelf and merry xmas to all of the forum team!
Andreus


Top
 Profile  
 
PostPosted: Sun Dec 20, 2009 7:54 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
Merry Christmas to you too.
Quote:
Meanwhile, can you confirm just this:
With the disks connected i can only run linux or the disks could be initialized by windows and some data lost. Am i correct?
I don't know. The partitions won't be recognized by Windows, due to the filesystem format. I can hardly imagine Windows will automagically do something with an unrecognized filesystem. I'd expect just a popup window with the question if the disks should be formatted. But to be safe you should never expose your precious data to an untrusted OS. :mrgreen:
Quote:
I'm a newbie at linux so i think i will need additional help.
Sure. We are here to help each other.
Depending on the distro on your pendrive it can automatically recognize and mount your raid array, when booted with the disks connected. In that case it will probably show some desktop icons which cover the raid arrays.
Maybe you'll have to assemble and mount the array manually. In that case open a console or terminal, and type
Code:
cat /proc/partitions
This will give a list of all partitions connected to the laptop. You'll have to find both parts of your data array. They are equal sized, and should contain about 750.000.000 blocks each. Further they both have a name in the form sdx2, where 'x' is a character a,b,c...z.
Let's say they are sdc2 and sdd2.
In that case you should assemble the array:
Code:
sudo mdadm --assemble /dev/md1 /dev/sdc2 /dev/sdd2
mount it readonly:
Code:
sudo mkdir /mnt/md1
sudo mount /dev/md1 /mnt/md1 -o ro
Now you can use the GUI to find your data in /mnt/md1.
Of course it's possible that this exact scenario won't work. Leave a message in that case.
(When it does work this way feedback is also appreciated ;) )


Top
 Profile  
 
PostPosted: Tue Jan 12, 2010 4:21 pm 
Offline

Joined: Wed Dec 16, 2009 9:57 pm
Posts: 134
Hello again and Happy new year Mijzelf,

I have troubles with the package but finally arraived today.

I managed to connect the two disks via USB ports, run slax linux and followed your instructions:

Code:
cat /proc/partitions

You guess it. It was sdc2 and sdd2.

Code:
sudo mdadm --assemble /dev/md1 /dev/sdc2 /dev/sdd2

Were, i had problems with 'sudo' since slax, i don't know why doesn't have it activated. But i was acessing as root user so i thougt 'sudo' wasn't necessary. So i ran
Code:
mdadm --assemble /dev/md1 /dev/sdc2 /dev/sdd2
and everything ok.

Code:
sudo mkdir /mnt/md1

Here it gave an error. It said the dir was allready created so i went to next step.

Code:
sudo mount /dev/md1 /mnt/md1 -o ro

All ok

Then finally i go to the GUI and in /mnt/md1 my data was there!!!!
Thankx a lot! Finally, my heart can rest again!

But, and there is allways a but... when i tried to copy some info to other disk it give me a error in files and dirs that have latin caracters (like é, ç á, etc)

So i ask it there another way to copy an entire dir to another disk without the GUI?

And another question. If i now put my drives in the Lacie 2big they will be reconized?

Best regards
andreus


Top
 Profile  
 
PostPosted: Tue Jan 12, 2010 6:49 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
andreus wrote:
But, and there is allways a but... when i tried to copy some info to other disk it give me a error in files and dirs that have latin caracters (like é, ç á, etc)

So i ask it there another way to copy an entire dir to another disk without the GUI?
Of course, there always is another way.
Code:
cp -rv /mnt/md1/* /path/to/other/disk
I don't know what this will do with those characters. You can also try rsync:
Code:
rsync -rv /mnt/md1 /path/to/other/disk


Quote:
And another question. If i now put my drives in the Lacie 2big they will be reconized?
I don't know. Nothing is changed. The datapartition is mounted readonly. Maybe you can look in the logfiles to find the reason why it didn't work? I *think* you can find the logs in sdx9/snaps/00/var/log
Code:
mdadm /dev/md2 /dev/sdc9 /dev/sdd9
mkdir /mnt/md2
mount /dev/md2 /mnt/md2


Top
 Profile  
 
PostPosted: Tue Jan 19, 2010 7:44 pm 
Offline

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

I successfully copied most of my files to another disk.
I resolved the problem with the characters buying a USB hub and direct connect the backup drive to linux.
The problem was that i was copying the files to a NTFS partition.

Now I'm in the second phase of the problem: Trying to bring life to my Lacie 2big NAS.

1. Webshell acess to the NAS:
I umount the automatically created drives and then mount the sdx8 (sdc8 & sdd8) partitions in RAID 1.
Code:
umount /dev/sdc8
umount /dev/sdd8
umount /mnt/lacie8
sleep 3
rmdir /mnt/lacie8
mdadm --assemble /dev/md8 /dev/sdc8 /dev/sdd8
sleep 3
mkdir /mnt/lacie8
mount /dev/md8 /mnt/lacie8 -text3


and then go to:
Code:
cd /mnt/lacie8/www/cgi-bin/public/


and created the script for the webshell with this code:
Code:
echo "Content-type: text/plain"
echo ""
echo $QUERY_STRING | sed s/"%20"/" "/g
eval `echo "$QUERY_STRING" | sed s/"%20"/" "/g`

Note: i had "g" in the end of the sed command to make changes globally

And then made it executable.

SUCESS! :D

2. Telnet or SSH access:
I was unable to do this, i consulted the forum but i need more detailed information.
Can you help me with this?

3. Try to assemble and mount the drives from webshell:

I disconnected the drives from the computer and then connected them to the NAS. Started the NAS and waited.
And then i used this URL's
http://<ip>/cgi-bin/public/run?mdadm --assemble /dev/md4 /dev/sdc2 /dev/sdd2
and then
http://<ip>/cgi-bin/public/run?mount /dev/md4 /home -o rw

And when i tried to use the NAS admin page "Explore" option the data was there!

But:
1. I can't access it from windows explorer
2. When i rebooted the NAS the md4 was not assemble again

I suspect that my NAS is trying to assemble the RAID on startup in RAID1 format and my data is in Linear format.
Do you know where i can change this in the NAS?

Note: I successively have access with the disks connected to the computer to sdx2, sdx7, sdx8 and sdx9.

Aditional information directely from webshell in NAS after disk assemble and mount
Code:
df -h

Filesystem                Size      Used Available Use% Mounted on
/dev/md0                  7.5M      6.1M      1.1M  85% /oldroot
/dev/md1                167.0M    142.0M     16.4M  90% /oldroot/var/original
/dev/md2                648.4M     18.7M    596.8M   3% /oldroot/snapshots
unionfs                 815.4M    160.6M    613.2M  21% /
/dev/md2                648.4M     18.7M    596.8M   3% /var
udev                     10.0M    100.0k      9.9M   1% /dev
/dev/md2                648.4M     18.7M    596.8M   3% /tmp
/dev/md4                  1.4T      1.2T    148.5G  89% /home


Code:
cat /proc/partitions

major minor  #blocks  name
   8     0  732574584 sda
   8     1          1 sda1
   8     2  731567970 sda2
   8     5     128457 sda5
   8     6       8001 sda6
   8     7       8001 sda7
   8     8     176683 sda8
   8     9     674698 sda9
   8    10       8001 sda10
   8    16  732574584 sdb
   8    17          1 sdb1
   8    18  731567970 sdb2
   8    21     128457 sdb5
   8    22       8001 sdb6
   8    23       8001 sdb7
   8    24     176683 sdb8
   8    25     674698 sdb9
   8    26       8001 sdb10
  31     0        512 mtdblock0
   9     0       7936 md0
   9     1     176576 md1
   9     2     674624 md2
   9     3     128384 md3
   9     4 1463135744 md4


Code:
cat /proc/mdstat

Personalities : [linear] [raid0] [raid1]
md4 : active linear sda2[0] sdb2[1]
      1463135744 blocks 64k rounding
     
md3 : active raid1 sda5[0] sdb5[1]
      128384 blocks [2/2] [UU]
     
md2 : active raid1 sda9[0] sdb9[1]
      674624 blocks [2/2] [UU]
     
md1 : active raid1 sda8[1] sdb8[0]
      176576 blocks [2/2] [UU]
     
md0 : active raid1 sdb7[1] sda7[0]
      7936 blocks [2/2] [UU]
     
unused devices: <none>


Best regards,
andreus


Top
 Profile  
 
PostPosted: Wed Jan 20, 2010 9:25 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
Quote:
SUCESS! :D
Congratulations! :D
Quote:
I suspect that my NAS is trying to assemble the RAID on startup in RAID1 format and my data is in Linear format.
It's stored in the array itself. You don't have to specify a format when assembling an array. Nor does the actual sequence of the devices matter. So normally it should just work. But in this thread it didn't. I really don't know why.
Quote:
1. I can't access it from windows explorer
Try to restart samba after assembling and mounting the array:
Code:
/sbin/ngc --stop samba
/sbin/ngc --start samba

Quote:
2. When i rebooted the NAS the md4 was not assemble again
Maybe a script can be added to initng (see below) to assemble and mount the data array, and restart samba, happily bypassing the LaCie problems.
Quote:
2. Telnet or SSH access:
I was unable to do this
sshd could be started by
Code:
/sbin/ngc --start sshd
This will cost some time, the first time, because it has to generate key pairs. When sshd is running you still can't login, I'm afraid, because you don't have a valid login. Post a dump of /etc/passwd and /etc/shadow to see if we can find a hole.

All LaCie's I have studied (partition content, I never had one in my hands), have the same boot sequence. uBoot and the kernel are loaded from sdx6, and the kernel runs sdx7/sbin/init.
This script creates an unionfs constising of sdx8 as ro layer, and (some parts of?) sdx9 as rw layer. After that it changes root to this unionfs, and call unionfs/sbin/init, which is a symlink to unionfs/sbin/initng.
This program is responsible for bringing the services up. It uses the file /etc/initng/runlevel/default-runlevel to know what to start. On the networkspace2 this file contains:
Code:
initial
dbus
udev
hald
clock
dhcdbd
syslogd
klogd
swap
modules
mountfs
mountuserfs
raid
usb
hostname
NetworkManager
http
unionfs
getty/1
#sshd
cron
unicorn
These strings point to scripts which are located in /etc/initng. I *think* on your system one of the scripts fail, and initng waits forever for it to finish, or doesn't start all scripts which are depending on it. (Each script has a list of 'needs')
So have a look in /var/log, to see if you can find any fails.


Top
 Profile  
 
PostPosted: Wed Jan 20, 2010 8:25 pm 
Offline

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

Here are my tests from your instructions.

Quote:
Quote:
I suspect that my NAS is trying to assemble the RAID on startup in RAID1 format and my data is in Linear format.

It's stored in the array itself. You don't have to specify a format when assembling an array. Nor does the actual sequence of the devices matter. So normally it should just work. But in this thread it didn't. I really don't know why.

But if i can assemble it and mount it, there is no problem with the array, correct?

Quote:
Quote:
1. I can't access it from windows explorer

Try to restart samba after assembling and mounting the array:
Code:
/sbin/ngc --stop samba
/sbin/ngc --start samba



Stoped and started, but no change. :(

Quote:
Quote:
2. When i rebooted the NAS the md4 was not assemble again

Maybe a script can be added to initng (see below) to assemble and mount the data array, and restart samba, happily bypassing the LaCie problems.

Since samba restart didn't work. I think this was to be resolved another way.

Quote:
Quote:
2. Telnet or SSH access:
I was unable to do this

sshd could be started by
Code:
/sbin/ngc --start sshd
This will cost some time, the first time, because it has to generate key pairs. When sshd is running you still can't login, I'm afraid, because you don't have a valid login. Post a dump of /etc/passwd and /etc/shadow to see if we can find a hole.


Results:
Code:
/sbin/ngc --start sshd
Service sshd is up.

cat /etc/passwd
root:x:0:0:root:/root:/bin/sh
bin:x:1:1:bin:/bin:/bin/false
daemon:x:2:2:daemon:/sbin:/bin/false
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
operator:x:11:0:operator:/var:/bin/sh
sshd:x:22:22:sshd:/dev/null:/bin/false
nobody:x:65534:65534:Nobody:/:/bin/false
anonymous:x:65534:65534:Nobody:/:/bin/false
messagebus:x:101:101::/dev/null:/bin/false
haldaemon:x:102:102::/dev/null:/bin/false
avahi:x:103:103::/dev/null:/bin/false
admin:x:500:100::/home:/bin/false

cat /etc/shadow
root:$1$$1RDUuTsVHjre9juUvuICX.:12542:0:99999:7:::
bin:*:12488:0:99999:7:::
daemon:*:12488:0:99999:7:::
sync:*:12488:0:99999:7:::
shutdown:*:12488:0:99999:7:::
halt:*:12488:0:99999:7:::
operator:*:12488:0:99999:7:::
nobody:*:12488:0:99999:7:::
anonymous::12488:0:99999:7:::
messagebus:!:12488:0:99999:7:::
haldaemon:!:12488:0:99999:7:::
avahi:!:12488:0:99999:7:::
admin:$1$JJlx5f89$gtxbZ27TQE2DrZbKsQuhI0:12488:0:99999:7:::

Tried SSH with Putty and asks for login and password.

Quote:
All LaCie's I have studied (partition content, I never had one in my hands), have the same boot sequence. uBoot and the kernel are loaded from sdx6, and the kernel runs sdx7/sbin/init.
This script creates an unionfs constising of sdx8 as ro layer, and (some parts of?) sdx9 as rw layer. After that it changes root to this unionfs, and call unionfs/sbin/init, which is a symlink to unionfs/sbin/initng.
This program is responsible for bringing the services up. It uses the file /etc/initng/runlevel/default-runlevel to know what to start. On the networkspace2 this file contains:
Code:
initial
dbus
udev
hald
clock
dhcdbd
syslogd
klogd
swap
modules
mountfs
mountuserfs
raid
usb
hostname
NetworkManager
http
unionfs
getty/1
#sshd
cron
unicorn
These strings point to scripts which are located in /etc/initng. I *think* on your system one of the scripts fail, and initng waits forever for it to finish, or doesn't start all scripts which are depending on it. (Each script has a list of 'needs')
So have a look in /var/log, to see if you can find any fails.


Results:
Code:
cat /etc/initng/runlevel/default.runlevel
initial
monitor
dbus
udev
hald
clock
dhcdbd
syslogd
klogd
swap
modules
mountfs
mountuserfs
usb
hostname
NetworkManager
http
unionfs
mdadm
edclients
getty/1
sshd
download_machine
Note: sshd and download_machine were putted there by me

cat /var/log/messages
...
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.
...



andreus


Top
 Profile  
 
PostPosted: Wed Jan 20, 2010 9:34 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
Quote:
But if i can assemble it and mount it, there is no problem with the array, correct?
AFAIK correct.
Quote:
Stoped and started, but no change.
What is the content of /etc/samba/smb.conf? And can you give the output of 'netstat -lp' on a freshly booted box to see if samba is already running?
Quote:
cat /etc/passwd <snip>
The hash of the root password is the same as on the networkspace2. That can mean that you can add the lines which gives shell access on that box:
to passwd:
new_root:x:0:0:Linux User,,,:/home:/bin/sh
to shadow:
new_root:$1$FfIsQ/hk$2ZB88Rs/Ebiz9OwXxLi7j1:12488:0:99999:7:::
This adds a user new_root with password new_root.
I don't know if these lines will survive your sed magic. Maybe you can copy passwd and shadow to an usbstick and edit them on another machine. (Make sure your editor supports unix line endings). Of course you can take the disks out to edit, but the unionfs nature can make it hard to find which incarnation of password and shadow have to edited.

Quote:
Jan 20 20:34:34 storage local1.notice mountuserfs: Starting md4 (User)
<snip network stuff>
Jan 20 20:34:38 storage local1.notice mountuserfs: Failure: Could not start md4
That doesn't explain much. It just fails. Does dmesg give any more info?


Top
 Profile  
 
PostPosted: Wed Jan 20, 2010 9:56 pm 
Offline

Joined: Wed Dec 16, 2009 9:57 pm
Posts: 134
Mijzelf wrote:
What is the content of /etc/samba/smb.conf? And can you give the output of 'netstat -lp' on a freshly booted box to see if samba is already running?


Code:
cat /etc/samba/smb.conf
[global]
   workgroup = Workgroup
   server string = LaCie 2big Network
   security = user
   map to guest = bad user
   guest account = nobody
   log file = /var/log/samba/log.%m
   max log size = 50
   log level = 1
   socket options = TCP_NODELAY
   dns proxy = no
   local master = yes
   os level = 20
   veto files = /lost+found/Network Trash Folder/TheVolumeSettingsFolder/Temporary Items/
   unix charset = UTF-8
   dos charset = CP437
   use sendfile = yes
   use mmap = yes
   wide links = no
   unix extensions = no


netstat -lp: Nothing

Quote:
The hash of the root password is the same as on the networkspace2. That can mean that you can add the lines which gives shell access on that box:
to passwd:
new_root:x:0:0:Linux User,,,:/home:/bin/sh
to shadow:
new_root:$1$FfIsQ/hk$2ZB88Rs/Ebiz9OwXxLi7j1:12488:0:99999:7:::
This adds a user new_root with password new_root.
I don't know if these lines will survive your sed magic. Maybe you can copy passwd and shadow to an usbstick and edit them on another machine. (Make sure your editor supports unix line endings). Of course you can take the disks out to edit, but the unionfs nature can make it hard to find which incarnation of password and shadow have to edited.


How can i had lines to a file from the webshell?

Quote:
Jan 20 20:34:34 storage local1.notice mountuserfs: Starting md4 (User)
<snip network stuff>
Jan 20 20:34:38 storage local1.notice mountuserfs: Failure: Could not start md4
That doesn't explain much. It just fails. Does dmesg give any more info?[/quote]

Nothing. But i can see the mountuserfs.i file

Code:
cat /etc/initng/mountuserfs.i
#!/sbin/itype
# This is a i file, used by initng parsed by install_service

service mountuserfs {
...
}


I think the problem in the startMd_User function
Code:
startMd_User()
{
...
}



andreus


Last edited by andreus on Thu Jan 21, 2010 12:14 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Wed Jan 20, 2010 10:13 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
Quote:
cat /etc/samba/smb.conf <snip>
Hm. The file has no exports. So either the file is damaged, or it is generated automatically on boot, and no share is added because the user partition isn't mounted.
Quote:
How can i had lines to a file from the webshell?
echo "line" >>/path/to/file
Quote:
cat /etc/initng/mountuserfs.i <snip>
Maybe the function startMd_User does the actual assembling, and maybe the code is located in script /oldroot/etc/libraid


Top
 Profile  
 
PostPosted: Wed Jan 20, 2010 10:20 pm 
Offline

Joined: Wed Dec 16, 2009 9:57 pm
Posts: 134
Mijzelf wrote:
Quote:
cat /etc/samba/smb.conf <snip>
Hm. The file has no exports. So either the file is damaged, or it is generated automatically on boot, and no share is added because the user partition isn't mounted.

I think it's generated automatically on boot.

Quote:
Quote:
How can i had lines to a file from the webshell?
echo "line" >>/path/to/file

Result on shell: %22line%22 %3E%3E aa. More problems with urlencoding like the %20 of white spaces
Improved code for the shell:
Code:
#!/bin/sh

echo "Content-type: text/plain"
echo ""
echo $QUERY_STRING | sed s/"%20"/" "/g | sed s/"%22"/"\""/g | sed s/"%3E"/">"/g
eval `echo "$QUERY_STRING" | sed s/"%20"/" "/g | sed s/"%22"/"\""/g | sed s/"%3E"/">"/g`


Still i'm having problems writing in the password in /etc/shadow.

Quote:
Quote:
cat /etc/initng/mountuserfs.i <snip>
Maybe the function startMd_User does the actual assembling, and maybe the code is located in script /oldroot/etc/libraid


Yes, it's true.
The sdx2 array (user data) is assembled in startMd_Device() (function called by startMd_User()) in /oldroot/etc/libraid [sdx7 /etc/libraid]

I Changed the function startMd_User() in /oldroot/etc/libraid to:
Code:
startMd_User()
{
   msg "Starting md${MD_USER} (User)"
   device="/dev/md${MD_USER}"
   if [ x"`isArrayInactive $device`" == x"yes" ]; then
      warn_msg "createMd3_User: Looks like $device is in INACTIVE state. Stopping $device before proceeding."
      stopMd_User
   fi
   startMd_Device "$device"
   if [ $? -ne 0 ]; then
      repairArray "/dev/md${MD_USER}"
      if [ $? -ne 0 ]; then
         fail_msg "Could not start md${MD_USER}"
/sbin/mdadm --assemble /dev/md4 /dev/sda2 /dev/sdb2
         return 1
      fi
   fi
   checkRecoverArray "$device"
}


I only inserted the /sbin/mdadm --assemble /dev/md4 /dev/sda2 /dev/sdb2 command after failing to assemble by normal methods. It assembles the array even after failing and permits all the process to continue.
This change made SAMBA & FTP WORK!!!!! :D

But i still get errors in the lacie admin page and probably not everything is working fine.
I have to explore further the startMd_Device() command that is returning an error to discover why and try to correct it.
Code:
$MDADM --assemble $device ${NEW_COMPONENT_LIST} -u ${UUID} --run --force ${extra_options} > /dev/null 2>&1

can you help me with the meaning of this?
I think that:
$MDADM=is "/sbin/mdadm"
$device= should be "/dev/md4"
${NEW_COMPONENT_LIST}= should be "/dev/sda2 /dev/sdb2"
-u=uuid of array to assemble. Devices which don't have this uuid are excluded
${UUID}=????
--run=Attempt to start the array even if fewer drives were given than are needed for a full array. Normally if not all drives are found and --scan is not used, then the array will be assembled but not started. With --run an attempt will be made to start it anyway.
--force=Assemble the array even if some superblocks appear out-of-date
${extra_options}=?????
> /dev/null 2>&1=?????

and ... it exists a way for me to see the content of this variables?

andreus


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 10 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