Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is there an automated way to update my mtab and fstab? Or a command I can run so that I can copy the output into these files? I'm just nervous about tampering with these files because I know they are critical.

I previously had a md0 and md1 array but they "disappeared." Now my mtab and fstab is stale and it is giving me problems trying to run this automatic RAID utility, raider.

fstab

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/md0       /               ext3    errors=remount-ro 0       1
/dev/md1       none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0

mtab

/dev/md0 / ext3 rw,errors=remount-ro 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
udev /dev tmpfs rw,mode=0755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0

/proc/mounts

rootfs / rootfs rw 0 0
none /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
none /proc proc rw,nosuid,nodev,noexec,relatime 0 0
none /dev devtmpfs rw,relatime,size=1547340k,nr_inodes=215947,mode=755 0 0
none /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
/dev/sda1 / ext3 rw,relatime,errors=remount-ro,data=ordered 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid,relatime,mode=755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev,relatime 0 0

Here's what I think based on observation

My proposed update to fstab (should it be sda or sda1?)

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/sda1       /               ext3    errors=remount-ro 0       1
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0

My proposed update to mtab (should it be sda or sda1?)

/dev/sda1 / ext3 rw,errors=remount-ro 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
udev /dev tmpfs rw,mode=0755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0
share|improve this question
    
According to this, I shouldn't edit mtab bt elsewhere it says I should... still confused. serverfault.com/questions/518967/… –  jp24 Jul 27 '13 at 5:28
1  
sda is the whole disk, sda1 is the first partition, sda2 the second, etc. You deal with partitions in /etc/fstab. –  schaiba Oct 25 '13 at 18:13
add comment

1 Answer

I would start with figuring out what happened to the RAID devices md0 and md1. Did you recently updated any kernel module or the kernel itself? What is the output of following commands?

# cat /proc/mdstat
# mdadm --query /dev/md0

(Sorry, I haven't worked on RAID for quite sometime and you haven't mentioned what GNU/Linux distribution and version you are running.)

share|improve this answer
add comment

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.