Jump to content

Data missing from a HD of a network computer


dude67
 Share

Recommended Posts

I encountered a problem this morning in my home network. I have a desktop computer acting as a network server (mainly storage, but it's also a printer server and media server for my PS3). This has a Mandriva 2010.0 Free and it's just a regular installation of it. I have a lot of photos, music, videos and documents in that server (hundreds of GBs).

 

Now this morning I tried to access one of the calc files on that server, but I couldn't. There was some sort of input/output error. I accessed the storage (it's mounted on my laptop as /home/networkstorage) with my file manager (dolphin) and saw that the main folders were there: /music, /documents, /photos etc., but there was nothing in these folders! I then opened up the vnc connection (kdrc) to the server and got the same situation. I really didn't have time before work, but I still checked the server itself and plugged it into a display. There I saw the same situation with dolphin and double checked it in konsole: nothing seems to be under the folders. I rebooted the server, but nothing changed.

 

This is where I had to leave it for the day. I'll have to check how it is when I get back from work.

 

Does anyone have any clue what the problem might be? I should add that the server HD is 1,5 TB RAID1 (identical HDs).

 

 

[moved from Software by spinynorman]

Link to comment
Share on other sites

I hope your files were not deleted by some malicious hacker. If you check the timestamp on the empty directories you might see the time of the file deletions. Maybe it's only some kind of weird file system error but the files are actually still there. You could run e2fsck with -f (force checking even if the file system seems clean).

Link to comment
Share on other sites

I started to think if this has something to do with the RAID1 I have in this server.

 

I ran cat /proc/mdstat and it gave me this:

$ cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sdc1[0] sdb1[1]
 	200704 blocks [2/2] [uU]

md1 : active raid1 sdc5[0] sdb5[1]
 	1464935104 blocks [2/2] [uU]

unused devices: <none>

 

So where is the other disk?

But then again, if one HD fails in RAID1 mode, the other one should work independently and should not lose any data. So what has happened? And how can I check if one of the drives has really had it?

 

I've formatted the partitions as XFS and the drive is LVM; does that make any difference

Link to comment
Share on other sites

Hey...! Some progress! I went to the MCC and had a look at my partitioning there. I checked the LVMs there and they seem to be there. They report all data in there. AND when I chose any of the LVM partitions and clicked View (the button on the right) it opened up a file manager / a dialog (maybe nautilus) and shows me everything that I have there!

 

:D Oh yeah, the data seems to be there, but I cannot access it. Is that something to do with the RAID1? And more importantly, how can I fix the problem. :unsure:

Link to comment
Share on other sites

The weird stuff continues... With my winXP (home) installation in another computer I can access the network drives! But I'm still unable to connect the that same network drive with my Mandriva systems. I unmounted the drive in my laptop Mandriva 2010.1 and was unable to mount it again. I get this:

# mount /home/networkstorage/videos
mount error(88): Socket operation on non-socket
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Link to comment
Share on other sites

I'm assuming you had an md2 array for the two disks. So you need to use the mdadm command to assemble this (assemble parameter) and will build the array, and then mount the array in the usual manner.

 

My post on my website covers this:

 

http://www.linuxsolutions.org/index.php?option=com_content&task=view&id=25&Itemid=26

 

lower down you will find:

 

mdadm --assemble --scan

 

providing of course you have a correct /etc/mdadm.conf.

Link to comment
Share on other sites

It's all fun to play with the installation when the system doesn't have data on it, but when I'm trying to rescue precious files from it, I try to be very careful.

 

So I thought I'd have a look at the /etc/mdadm.conf file before doing what you suggested. Should that read also the information of the md2 disk? This is what it currently looks like:

DEVICE /dev/sdc1 /dev/sdb1 /dev/sdc5 /dev/sdb5
ARRAY /dev/md0 UUID=b2cdaf23:90dcfb95:04894333:532a878b auto=yes
ARRAY /dev/md1 UUID=88034630:c35fb792:04894333:532a878b auto=yes

I'm a bit confused here. I thought it should say md2 as well...

 

Then I had a look at the LVM setup in MCC it says e.g. for the first LVM partition:

Mount point: /music
Device: networkstorage/1
Volume label: music
Type: Journalised FS: XFS
Size: 195GB (13%)
Mounted

Then on the raid sheet it shows only two parts: the first is the /boot partition (md0 with 196MB) and the rest is for raid. For the big chunk it says:

Device: md1
Type: Linux Logical Volume Manager
Size: 1.3TB
Not formatted
LVM networkstorage
Used physical extent 186904 / 357650
Level 1
Chunk size 64 KiB
RAID-disks sdc5, sdb5

 

Finally on the /etc/fstab file it says only the md0 and the LVM partitions I've named:

/dev/networkstorage/root / xfs relatime 1 1
/dev/md0 /boot ext4 relatime 1 2
/dev/networkstorage/home /home xfs relatime 1 2
/dev/networkstorage/3 /pictures xfs relatime 1 2
/dev/cdrom /media/cdrom auto umask=0,users,iocharset=utf8,noauto,ro,exec 0 0
# Entry for /dev/sda1 :
UUID=1870AFF570AFD830 /media/win_c ntfs-3g defaults,umask=000 0 0
# Entry for /dev/sda2 :
UUID=C480B30F80B306C8 /media/win_d ntfs-3g defaults,umask=000 0 0
/dev/networkstorage/1 /music xfs relatime 1 2
none /proc proc defaults 0 0
/dev/networkstorage/2 /files xfs relatime 1 2
/dev/networkstorage/tmp /tmp xfs relatime 1 2
/dev/networkstorage/usr /usr xfs relatime 1 2
/dev/networkstorage/var /var xfs relatime 1 2
/dev/networkstorage/4 /videos xfs relatime 1 2
# Entry for /dev/sda6 :
UUID=306e5196-7b43-11dc-82a0-2b86f7e532aa swap swap defaults 0 0
/dev/networkstorage/swap swap swap defaults 0 0

 

Now, what does that all mean? Should there be a disk md2?

Edited by dude67
Link to comment
Share on other sites

It's working! I can again access all the directories and files in the server HDs. :thumbs:

 

What I don't understand is what happened. I didn't execute anything, I just read some of the files mentioned above and did not do anything to fix the situation. But all of a sudden all files were again there! I can find them with my server or with any of the home network computers.

 

I need to figure out a way to get a decent backup of all my stuff. I used Areca, but I could never make it work automatically (through cron) or make any more than the original backups; no incremental or differential backups. Perhaps I need to study Areca some more. Or if you have any better solutions for backups. I need to be able to trust the server making backups (incremental or differential) automatically.

 

Anyway, it all seems to work now! Thanks for your support!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...