LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-05-2011, 01:10 AM   #1
domz
LQ Newbie
 
Registered: May 2010
Posts: 22

Rep: Reputation: 0
Fstab - Server won't restart


I made a software RAID 0. It works fine, but when I add it to fstab and reboot the server, I can't restart the server.

Code:
# 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-sda5         swap                    swap    defaults        0 0
/dev/md0                /vz                     ext3    defaults        0 0
When I go to rescue mode and delete /dev/md0 from fstab, I can restart, but I get this when I try to mount it again:

Code:
mount: you must specify the filesystem type
So I try to make it to a ext3

Code:
# mkfs.ext3 /dev/md0
mke2fs 1.39 (29-May-2006)
mkfs.ext3: Device size reported to be zero.  Invalid partition specified, or
        partition table wasn't reread after running fdisk, due to
        a modified partition being busy and in use.  You may need to reboot
        to re-read your partition table.
#fdisk /dev/md0

Unable to read /dev/md0

I don't know what to do?
 
Old 05-05-2011, 01:42 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Well start by taking the mke2fs error message seriously. What is md0 made of? "mdadm --detail /dev/md0" will show what it thinks it's comprised of.

Last edited by acid_kewpie; 05-05-2011 at 01:43 AM.
 
Old 05-05-2011, 06:12 AM   #3
domz
LQ Newbie
 
Registered: May 2010
Posts: 22

Original Poster
Rep: Reputation: 0
I get this:
Quote:
mdadm --detail /dev/md0
mdadm: md device /dev/md0 does not appear to be active.
*note: This is after a reboot and deletion of /dev/md0 /vz ext3 defaults 0 0 from fstab.

Code:
#fdisk -l

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          13      104391   83  Linux
/dev/sda2   *          14        2703    21600666   83  Linux
Partition 2 does not end on cylinder boundary.
/dev/sda3            2703      119301   936580194   83  Linux
/dev/sda4          119302      121601    18474750    5  Extended
/dev/sda5          119302      121601    18474718+  82  Linux swap / Solaris

Disk /dev/sdb: 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/sdb1               1      121601   976760001   83  Linux

Disk /dev/sdc: 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/sdc1               1      121601   976760001   83  Linux

Disk /dev/sdd: 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/sdd1          121601      121601        8032+  83  Linux
mdadm --detail /dev/md0 suppose to equal /dev/sda3, /dev/sdb1, /dev/sdc1, /dev/sdd1
 
Old 05-05-2011, 06:37 AM   #4
domz
LQ Newbie
 
Registered: May 2010
Posts: 22

Original Poster
Rep: Reputation: 0
It seemed that Raid stop working after reboot. So I recreated it:
Code:
# mdadm --create /dev/md0 --chunk=4 --level=0 --raid-devices=4 /dev/sda3 /dev/sdb1 /dev/sdc1 /dev/sdd1
mdadm: /dev/sda3 appears to contain an ext2fs file system
    size=-1404859392K  mtime=Thu May  5 15:38:17 2011
mdadm: /dev/sda3 appears to be part of a raid array:
    level=raid0 devices=4 ctime=Thu May  5 07:13:38 2011
mdadm: /dev/sdb1 appears to be part of a raid array:
    level=raid0 devices=4 ctime=Thu May  5 07:13:38 2011
mdadm: /dev/sdc1 appears to be part of a raid array:
    level=raid0 devices=4 ctime=Thu May  5 07:13:38 2011
mdadm: /dev/sdd1 appears to be part of a raid array:
    level=raid0 devices=4 ctime=Thu May  5 07:13:38 2011
Continue creating array? yes
mdadm: array /dev/md0 started.
and made it ext3
Code:
# mkfs.ext3 /dev/md0
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
361267200 inodes, 722526976 blocks
36126348 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
22050 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
        102400000, 214990848, 512000000, 550731776, 644972544

Writing inode tables: 10728/22050
But when I restart, it will not work anymore.
 
Old 05-05-2011, 07:31 AM   #5
domz
LQ Newbie
 
Registered: May 2010
Posts: 22

Original Poster
Rep: Reputation: 0
Problem solved!
Quote:
mdadm --examine --scan > /etc/mdadm.conf
and added it to fstab again!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bind9 won't restart and12345 Linux - Server 6 04-24-2021 01:26 PM
Testing fstab without restart? centosfan Linux - General 4 01-07-2011 01:24 PM
server startup error: "cannot find / in /etc/fstab or /etc/mtab"; /etc/fstab readonly knee-co Linux - Newbie 8 09-12-2010 05:37 PM
Suse won't boot after fstab changes - fstab not editable baking-a-77 Linux - Newbie 10 06-02-2007 10:51 AM
apache 2 won't restart after it was shut down Lorend Linux - Server 2 08-13-2006 01:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration