Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a centos 5.5 dedicated server. Today for some reason the server stops working. I can login via ssh, but ls and find give me no files. What can I do to fix this or at least backup my data? Thank you!

[root@www server]# touch /home/www/test touch: cannot touch `/home/www/test': Read-only file system

[root@www server]# ls -l /etc/redhat-release -rw-r--r-- 1 root root 27 Apr 25 2010 /etc/redhat-release

[root@www server]# ls -l /etc total 0

[root@www server]# cat /etc/fstab LABEL=/ /
ext3 defaults 1 1 LABEL=/boot /boot
ext3 defaults 1 2 tmpfs
/dev/shm tmpfs
defaults 0 0 devpts
/dev/pts devpts gid=5,mode=620 0 0 sysfs
/sys sysfs
defaults 0 0 proc
/proc proc
defaults 0 0 LABEL=SWAP-sda3
swap swap
pri=0,defaults 0 0 /dev/sdb1
/hdd1 ext3
defaults 0 0

[root@www server]# /sbin/fdisk -l

Disk /dev/sda: 251.0 GB, 251059544064 bytes 255 heads, 63 sectors/track, 30522 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System /dev/sda1 *
1 13 104391 83 Linux /dev/sda2 14 30391 244011285 83 Linux /dev/sda3
30392 30522 1052257+ 82 Linux swap / Solaris

Disk /dev/sdb: 251.0 GB, 251000193024 bytes 255 heads, 63 sectors/track, 30515 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

[root@www server]# /sbin/e2label /dev/sda1 /boot

[root@www server]# /sbin/e2label /dev/sda2 /sbin/e2label: Bad magic number in super-block while trying to open /dev/sda2 Couldn't find valid filesystem superblock.

[root@www server]# /sbin/e2label /dev/sda3 /sbin/e2label: Bad magic number in super-block while trying to open /dev/sda3 Couldn't find valid filesystem superblock.

share|improve this question

1 Answer 1

You will need to drop into rescue mode since your file system is RO.

fsck -fy -C /dev/sda1
share|improve this answer
    
...and if you don't already have backups, you may be stuffed –  symcbean Jan 21 '11 at 11:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.