Replacement of a broken hard disk in Lacie Network space 2

Out of blue hard disk on my Lacie Network Space 2 failed completely. I’ve been using computers for 25 years and this was the first time I’ve had a complete hard disk failure. I mean standard recovery programs can’t find anything on the old hard drive and the hard drive makes noises which are more from a horror movie soundtrack than anything else.

I thought the easiest fix would be to get a new hard disk and carry out a factory reset to create partitions etc. and start using the NAS unit again. Furthermore I also thought why should I settle with a 1 TB drive when a 2 TB drive really doesn’t cost that much more. As usually, it wasn’t this easy. I hadn’t realized that the firmware was actually installed on the failed hard disk, so my plan really backfired.

Thankfully there is an active community around Lacie NASs so it was easy to find a walk through installation guide on how to install firmware on a new hard disk (available at http://lacie.nas-central.org/wiki/Installing_firmware_on_a_new_disk_(Network_space_2)). The only downside is that it is for replacing the hard disk with a 1 TB hard disk. I started realizing that something was wrong, when I started receiving “No space left on device” errors while populating the newly created partitions.

dd: writing to '/dev/sdb8' : No space left on device

After banging my head on the wall for an hour, I realized that the problem was that my partitions were actually too small and this was because the hard disk is of different capacity therefore e.g. 105 cylinders wasn’t enough for partition 8. After playing around with fdisk for a while, I reserved 270 cylinders for extended/logical drives as follows:

Disk /dev/sdb: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sdb1               1         270     2167751   5 Extended
/dev/sdb2             271      243201  1951343257+ 83 Linux
/dev/sdb5               1          33      263024+ 82 Linux swap
/dev/sdb6              34          35       15041  83 Linux
/dev/sdb7              36          37       15041  83 Linux
/dev/sdb8              38         150      906648+ 83 Linux
/dev/sdb9             151         260      882551  83 Linux
/dev/sdb10            261         266       47171  83 Linux

When adjusting these settings, the only important thing is that the amount of blocks is the same or higher than in the walk through guide (http://downloads.lacie.nas-central.org/Users/Mijzelf/Networkspace2/1.0.2/Partitiontable.txt).

After I had successfully populated partitions, I thought I was home free, but… The NAS did not boot because it appears that XFS partitions created with OpenSuse are not compliant with the ones that the NAS wants. Luckily this is a common problem and a solution was provided in the walk through. The only thing I messed up here was that while creating the public key, I copy pasted it from console, because I was too lazy to write the full path to cp command. I didn’t realize that it actually copied my key in four lines instead of one line, and it took me almost two hours to figure this out.

Finally, four hours after starting, the NAS was up and running again. Then I noted that the new firmware had and “SFTP” option, which I switched on. Really nice, but that also prevented me from logging in via SSH and after disabling this service, SSH was no longer available at all Again some head banging while I was wondering why settings under hdX8 are OK, but they don’t seem to have any effect on the unit. At one point I remember seeing a forum post where somebody was saying that once the NAS has been set up, it actually reads the settings from hdX9 so I was editing the correct file, but under wrong partition. After modifying sshd_config file under hdX9, SSH was up again and accepting key logins.

Once I had regained my shell access, I installed ipkg using tutorial found at http://lacie.nas-central.org/wiki/Category:2big_Network_2#Install_ipkg. Some additional programs, 24 hours of file transfers and Bob’s your uncle.

Knowing that the new drive will eventually fail, I think it would be cleaver to clone the non-storage partitions e.g. with Clonezilla, but I’m obviously too lazy to do that. What I know is that I will be cursing a lot when I’m installing yet another new hard drive in X years time and thinking “why was I too lazy to take the backup”. This time the only thing that was lost forever were all TV recordings. A small loss, but made me think maybe it would be time get a RAID 1 system and a NAS unit which natively supports e.g. NFS. Maybe I’ll just bite my lip and buy a QNAP TS-212 and another 2 TB drive.

12 thoughts on “Replacement of a broken hard disk in Lacie Network space 2

  1. Goodmorning thank you for publushing your work.
    What program did you use to format de hd.
    In gparted i cannot fill in de cil.amount.
    When powering on the drives gives red flashes all the time.
    Grt Willem Nieuwenhuizen , Netherlands

      1. Hi Mikko , thanks for comment. The disk is formatted, during startup the blue light keeps blinking every second and the disk is getting warm.
        Now trying an. 1 tb disk if it has the same problem. I let you know.
        Grt Willem

        1. Hallo Mikko, after using the 1 tb drive i’m having the same problem blue light blinking every second. I think thge drive’s are not the problem.
          Thinking of buying synology nas.
          Grt Willem

          1. It says in the tutorial “It is also possible that the NAS boots, but doesn’t show up in the network, and the blue led is blinking about once a second. In that case try a factory reset.”. A tutorial for factory reset is available at http://lacie.nas-central.org/wiki/Resetting_Network_Space_2

            I ditched the Network Space long time ago. I was also thinking about buying a Synology or QNAP NAS, but none were available right off the shelf so I got an Asustor 2-bay NAS, which is really good imho.

  2. followed the same guides as you but I am butting my head against a different problem.

    I can’t get pass the general settings where the admin password is set. No storage is showing either.

    Trying to get the ssh to work. I have set up the public key on the drive.

    when running

    samuel@SAIubi:~$ ssh 192.168.251.69 -v ls
    I get this results

    OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: /etc/ssh/ssh_config line 19: Applying options for *
    debug1: Connecting to 192.168.251.69 [192.168.251.69] port 22.
    debug1: Connection established.
    debug1: identity file /home/samuel/.ssh/id_rsa type -1
    debug1: identity file /home/samuel/.ssh/id_rsa-cert type -1
    debug1: identity file /home/samuel/.ssh/id_dsa type 2
    debug1: identity file /home/samuel/.ssh/id_dsa-cert type -1
    debug1: identity file /home/samuel/.ssh/id_ecdsa type -1
    debug1: identity file /home/samuel/.ssh/id_ecdsa-cert type -1
    debug1: identity file /home/samuel/.ssh/id_ed25519 type -1
    debug1: identity file /home/samuel/.ssh/id_ed25519-cert type -1
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
    debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1
    debug1: match: OpenSSH_5.1 pat OpenSSH_5* compat 0x0c000000
    debug1: SSH2_MSG_KEXINIT sent
    debug1: SSH2_MSG_KEXINIT received
    debug1: kex: server->client aes128-ctr hmac-md5 none
    debug1: kex: client->server aes128-ctr hmac-md5 none
    debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<3072<8192) sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
    debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
    debug1: Server host key: RSA 7b:cb:cd:a4:c5:52:34:e5:7c:13:5c:6c:51:c2:ff:0b
    debug1: Host '192.168.251.69' is known and matches the RSA host key.
    debug1: Found key in /home/samuel/.ssh/known_hosts:1
    debug1: ssh_rsa_verify: signature correct
    debug1: SSH2_MSG_NEWKEYS sent
    debug1: expecting SSH2_MSG_NEWKEYS
    debug1: SSH2_MSG_NEWKEYS received
    debug1: Roaming not allowed by server
    debug1: SSH2_MSG_SERVICE_REQUEST sent
    debug1: SSH2_MSG_SERVICE_ACCEPT received
    debug1: Authentications that can continue: publickey,password,keyboard-interactive
    debug1: Next authentication method: publickey
    debug1: Offering DSA public key: /home/samuel/.ssh/id_dsa
    debug1: Authentications that can continue: publickey,password,keyboard-interactive
    debug1: Trying private key: /home/samuel/.ssh/id_rsa
    debug1: Trying private key: /home/samuel/.ssh/id_ecdsa
    debug1: Trying private key: /home/samuel/.ssh/id_ed25519
    debug1: Next authentication method: keyboard-interactive
    debug1: Authentications that can continue: publickey,password,keyboard-interactive
    debug1: Next authentication method: password
    samuel@192.168.251.69's password:

    I did not set a password and can not get past here.

    Can anyone help?

    1. Sorry, but I don’t have the slightest idea. I’d probably try to remove Lacie’s hard drive and connect it directly to a laptop/desktop computer, and copy a working ssh configuration with password authentication (and maybe /etc/passwd and /etc/shadow) from another system to Lacie’s hard drive. If that I’d be then able to access remotely, I’d try to configure a key based authentication again. I no longer have a Lacie NAS so I can’t really try anything. Hope you’ll figure this out.

    2. Same problem here. I get the same -v ls output as you. Did you solve the problem back in the days? cheers

  3. Hi Mikko, I stumbled across your blog while searching for information on how to fix my failed Lacie Network Space 2 (Classic) NAS.

    I have tried everything but just not managed to get my new 1TB disk to boot. The main problem I keep encountering “dd: writing to ‘/dev/sdb8’ : No space left on device” and ‘/dev/sdb9 : No space left on device”

    I know this blog post is quite old but I was wondering if you might be able to shed any light.

    I am using the below partitioning but just can’t figure out which version of the firm ware did you use to get yours working?
    http://downloads.lacie.nas-central.org/Users/Mijzelf/Networkspace2/

    Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sda1 1 250 2008093+ 5 Extended
    /dev/sda2 251 121601 974751907+ 83 Linux (xfs)
    /dev/sda5 1 32 256977 82 Linux swap
    /dev/sda6 33 33 8001 83 Linux (raw)
    /dev/sda7 34 34 8001 83 Linux (ext3)
    /dev/sda8 35 140 851413+ 83 Linux (ext3)
    /dev/sda9 141 249 875511 83 Linux (ext3)
    /dev/sda10 250 250 8001 83 Linux (raw)

    Thanks,
    Mike

    1. Hi Mike, I don’t have my Network Space unit anymore so I can’t check the firmware version. I think you haven’t reserved enough blocks for sda8 and sda9. I’d try reserving a few additional blocks for sda8 and sda9. I remember I that did the trick for me. Even if you’d double the amount of reserved blocks, you’d only lose a few hundred megabytes.

      Also apologies to the guy whose comment I accidentally deleted a while ago.

      1. Thanks Mikko for your quick reply. Yes I saw you had increased the size of your sdb1 partition.

        I wasn’t sure if I was to increase the size of my sda1 extended partition beyond the 1-250 block the operating system might not like it. Okay I will also increase it to 270 blocks.

        One last question, you mentioned about creating a public key, is this something required to be done as part of the rebuild because I couldn’t find any information in the forums on this?

        Thanks

        1. I used an older version live CD of Ubuntu 5.10.

          Then followed all the wiki steps as mentioned and adjust the partition sizes for 2TB in my case.
          Skip the XFS format step, as this Ubuntu version automatically makes it XFS.
          Keep in mind that Ubuntu names it HDx instead of SDx, but you can see that when entering the CAT /PROC/PARTITIONS command.

          Put the HDD back in the NAS en do the factory reset.
          Worked for me…

Leave a Reply

Your email address will not be published. Required fields are marked *