DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2012-12-30 13:09:19

jfix
New member
Registered: 2012-12-30
Posts: 3

dying boot disk

Hi,

I have a DNS-323 that has been running without too much trouble for a couple of years now. But recently, the boot process hung because of a fsck that never finished ...

I have installed Debian following this guide: http://www.cyrius.com/debian/orion/d-li … stall.html

sda is a 500GB disk for both the system and for some data using ext2, and sdb is a 1TB disk for just data with ext3.

sda is dying slowly, but surely. I see the following in my dmesg, and running fsck or badblocks results in finding many dozens of errors until hanging the system ...

The system still starts up normally (if I manually cancel the fsck that gets triggered during boot), I can connect to it via serial console or ssh. Running fsck after boot and from single user mode takes ages and hangs after 70% or so.

Here's my question: What's the best way of replacing the faulty disk with a new one? Booting without the bad disk only gets me to the (initramfs) with no acess to the network or the other disk.

I guess the last resort would be to somehow restore the original firmware, and then reinstall debian from there.

I would be grateful for any ideas that would spare me these operations.

Thanks in advance.

The filesystem layout in case that's useful:

Code:

root@debian:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3       259M   93M  153M  38% /
tmpfs            30M     0   30M   0% /lib/init/rw
udev             10M     0   10M   0% /dev
tmpfs            30M     0   30M   0% /dev/shm
tmpfs            12M   72K   12M   1% /run
/dev/sda1       228M  4.2M  212M   2% /boot
/dev/sda9        38G  187M   36G   1% /home
/dev/sda8       368M   11M  339M   3% /tmp
/dev/sda5       4.6G  697M  3.7G  16% /usr
/dev/sda6       2.8G  1.3G  1.4G  50% /var
/dev/sdb2       916G  849G   68G  93% /mnt/media

Offline

 

#2 2012-12-30 16:01:43

FunFiler
Member
Registered: 2010-05-23
Posts: 577

Re: dying boot disk

Replace the disk then copy the data from a backup or install the failing disk in a USB enclosure and copy the data from there.


3 * (DNS-323 with 2 * 2TB) = 12TB Running FW v1.08 & FFP v0.5
Useful Links: Transmission, Transmission Remote, Automatic

Offline

 

#3 2012-12-31 01:04:02

jfix
New member
Registered: 2012-12-30
Posts: 3

Re: dying boot disk

thanks for your reply.

can I simply attach an external usb drive to the dns323 and have it recognized correctly, or do I need a specific driver. I thought the usb port was intended for printers only...

just to confirm: you suggest, I recreate the same partitions and then copy the files from the old to the new drive? or do you mean a byte-for-byte copy using dd or a similar tool?

i've move the actual data (photos, music, etc.) to the other drive. what I'm concerned with now is the recreation of /etc, /var, /boot etc.

thanks.

Last edited by jfix (2012-12-31 01:06:10)

Offline

 

#4 2013-01-01 00:59:36

bjby
Member
Registered: 2009-02-22
Posts: 265

Re: dying boot disk

Running true debian, disk via usb is no problem. There is a backuptool called fsarchiver. Have a look at it.  It can easily be installed via apt-get. 
This is the tool I would be using. You will be backing a live partion which is a bit dirty but in practice I think its fine.

Last edited by bjby (2013-01-01 01:00:43)

Offline

 

#5 2013-03-03 20:07:44

jfix
New member
Registered: 2012-12-30
Posts: 3

Re: dying boot disk

Hi, thanks for the feedback, just to close this issue I did decide to start over, do a fresh install using netboot.img, and that went quite well, I did move most of the data elsewhere in order to be able to wipe without too much data loss.

I did discover interesting tools thanks to you, like fsarchive or dd_rescue.

cheers.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB