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 2010-09-17 04:27:54

ithrowpicks
Member
From: NE Ohio
Registered: 2008-02-29
Posts: 27

Need help with mdadm syntax (trying to e2fsck)

I am using e2fsck from Fonz's link and I am not sure what option I should use to check my RAID 0 DNS 323

the instructions show the following example

mdadm -A /dev/md0 /dev/sd[ab]2

What should I use?  I don't want to mess anything up

I have 2 Western Digital Green Drives in a RAID 0 but I think I have some bad blocks because when I tried to delete a few files I got an I/O cannot stat error


DNS 323 with FW 1.08 : FFP 0.5 : RAID 0 : 2 x Western Digital Caviar GP WD7500AACS 750GB

Offline

 

#2 2010-09-17 12:31:58

scaramanga
Member
Registered: 2010-08-04
Posts: 251

Re: Need help with mdadm syntax (trying to e2fsck)

You can, probably, find the answer in the mdadm manual page: http://linux.die.net/man/8/mdadm


DNS-323 HW Rev. C1 FW 1.10 fun-plug 0.5
2 x WD10EARS-00Y5B1 in Standard mode (LCC set to 5 min; Aligned to 4K)
Transmission with Transmission Remote GUI

Offline

 

#3 2010-09-17 13:35:18

ithrowpicks
Member
From: NE Ohio
Registered: 2008-02-29
Posts: 27

Re: Need help with mdadm syntax (trying to e2fsck)

I checked that before posting but it didn't mention how to determine the device letter that applies

I assume it would be this
mdadm -A /dev/md0 /dev/sda2

because it's the first SATA disk and second partition but I am not sure.  Fonz's example below from his e2fsck documentation
mdadm -A /dev/md0 /dev/sd[ab]2

Here is how I am looking at the command line
/dev/sd  <== means SATA drive
/dev/sda <== means first drive (my RAID 0)
/dev/sda2 <== means second partition because first partition is /boot?


DNS 323 with FW 1.08 : FFP 0.5 : RAID 0 : 2 x Western Digital Caviar GP WD7500AACS 750GB

Offline

 

#4 2010-09-17 13:38:26

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 709

Re: Need help with mdadm syntax (trying to e2fsck)

I have 2 Western Digital Green Drives in a RAID 0

because it's the first SATA disk and second partition but I am not sure.

Do you want to build an array of one single disk of a two disk array?

Offline

 

#5 2010-09-17 15:53:56

scaramanga
Member
Registered: 2010-08-04
Posts: 251

Re: Need help with mdadm syntax (trying to e2fsck)

ithrowpicks wrote:

/dev/sda2 <== means second partition because first partition is /boot?

/dev/sda1 is a swap partition. I use standard mode, but I imagine it's the same.


DNS-323 HW Rev. C1 FW 1.10 fun-plug 0.5
2 x WD10EARS-00Y5B1 in Standard mode (LCC set to 5 min; Aligned to 4K)
Transmission with Transmission Remote GUI

Offline

 

#6 2010-09-17 16:18:29

ithrowpicks
Member
From: NE Ohio
Registered: 2008-02-29
Posts: 27

Re: Need help with mdadm syntax (trying to e2fsck)

OK I think all we need to verify is whether I should use 'A' or 'B' in the command line.  I was thinking the first partition was boot but swap sounds like the better answer

So do you guys think I should use this?
mdadm -A /dev/md0 /dev/sda2

Mijzelf
Not trying to rebuild anything.. just trying to fix some bad blocks that is affecting a couple of files (I can't delete them)
I want to keep the same setup of both drives in RAID 0 so I can have 1.5TB storage


DNS 323 with FW 1.08 : FFP 0.5 : RAID 0 : 2 x Western Digital Caviar GP WD7500AACS 750GB

Offline

 

#7 2010-09-17 17:57:28

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 709

Re: Need help with mdadm syntax (trying to e2fsck)

It makes no sense to run mdadm -A on a single disk of a raid0 array. The array cannot be assembled from only one disk.

Offline

 

#8 2010-09-17 18:05:15

ithrowpicks
Member
From: NE Ohio
Registered: 2008-02-29
Posts: 27

Re: Need help with mdadm syntax (trying to e2fsck)

Mijzelf
So what do you suggest is the proper solution?

Should I run two commands?
mdadm -A /dev/md0 /dev/sda2
mdadm -A /dev/md0 /dev/sdb2


DNS 323 with FW 1.08 : FFP 0.5 : RAID 0 : 2 x Western Digital Caviar GP WD7500AACS 750GB

Offline

 

#9 2010-09-17 18:16:08

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 709

Re: Need help with mdadm syntax (trying to e2fsck)

If you want to check the filesystem, you'll have to assemble the array, by specifying both disks:

mdadm -A /dev/md0 /dev/sda2 /dev/sdb2

or

mdadm -A /dev/md0 /dev/sd[ab]2

After that you can run e2fsck on /dev/md0

Offline

 

#10 2010-09-17 20:09:39

ithrowpicks
Member
From: NE Ohio
Registered: 2008-02-29
Posts: 27

Re: Need help with mdadm syntax (trying to e2fsck)

Yes... that worked

The original example Fonz provided does not need any alteration.  I misunderstood the command line option


DNS 323 with FW 1.08 : FFP 0.5 : RAID 0 : 2 x Western Digital Caviar GP WD7500AACS 750GB

Offline

 

#11 2010-10-25 16:58:56

t332
Member
Registered: 2008-06-06
Posts: 8

Re: Need help with mdadm syntax (trying to e2fsck)

Do I understand correctly - for RAID1 I should perform the same command?
mdadm-A /dev/md0 /dev/sda2 /dev/sdb2 ?

Now, command cat /proc/mdstat say:

/bin $ cat /proc/mdstat
Personalities : [linear] [raid0] [raid1]
md0 : active raid1 sda2[0] sdb2[1]
      486544512 blocks [2/2] [UU]

Thank you very much!

Offline

 

#12 2010-10-26 10:42:50

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 709

Re: Need help with mdadm syntax (trying to e2fsck)

@t332: I don't understand the question. Yes, for raid1 the same command is used, but your /proc/mdstat tells it's already assembled. So reapplying the command won't do anything, or raise an error.

(BTW, in case of raid1 you can also build the array with only one disk. That's the power of mirroring.
mdadm -A /dev/md0 /dev/sda2 --run
When you do that with a healthy array, however, it's good practice to mount /dev/md0 read only. You don't want to write one half of a mirrored pair).

Offline

 

#13 2010-10-26 20:44:42

t332
Member
Registered: 2008-06-06
Posts: 8

Re: Need help with mdadm syntax (trying to e2fsck)

I tried to be brief, because my english is bad.
As a result, it is not clear explained.
First command - it was on working DNS-323 controlled by fun_plug.

And I wanted to learn how to properly mount RAID-1 after the file reload.sh

Thank you very much, now I understand this.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB