See in the above that md1 is active on /dev/sdc1 while the other
> devices are all active in /dev/sdb{2,3,4}. This means you need to be
> careful which disk you do things to since you could wipe out the other
> disk if not careful. Three are one way and one is the other way.
>
> hmm i have taken the backup on external USB however, just learning my
challenge is not to loose the data :) becuase in other cases i may not
found the option of USB backup.
> > > You will need to know that information in order to proceed
> successfully.
> > > I would like to see the output of:
> > >
> > > mdadm --examine /dev/sdc2
> >
> > root@nasbox:~# mdadm --examine /dev/sdc2
> > mdadm: No md superblock detected on /dev/sdc2.
>
> That was an example from my system. For your system you would use these:
>
> mdadm --examine /dev/sdc1
> mdadm --examine /dev/sdb2
> mdadm --examine /dev/sdb3
> mdadm --examine /dev/sdb4
>
> Noting that the first is on sdc and the other three on sdb.
>
>
Thanks i got that!
> > root@nasbox:~# sfdisk -d /dev/sdb
> >
> > WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util
> sfdisk
> > doesn't support GPT. Use GNU Parted.
>
> Hmm... I am not a GPT expert. I haven't been using that partition
> table type. Yet. It is inevitably in the future. But that means my
> question was poorly written. Sorry.
>
yes agree and sorry for that incomplete or less comprehensive question.
however the limit was 2TB HD and finally i had to use GPT but this time i
baught 1.5TBx2 drives so this time i may not face the GBT difficulty and
thing can be worked out with Fdisk alone.
>
> > root@nasbox:~# sfdisk -d /dev/sdc
> > read: Input/output error
>
> That looks scary to me. You have an active partition on /dev/sdc1 but
> here /dev/sdc reported an I/O error? That seems very bad. At this
> point I would stop and look carefully at the drive. I would look at
> the SMART selftests from the drive. Here are some useful commands.
>
> as i said i messed up the first partition :( and loss all the data.
> smartctl -i /dev/sdc
> smartctl -l error /dev/sdc
> smartctl -t short /dev/sdc
> smartctl -l selftest
> # smartctl -i /dev/sdc smartctl
> 5.43 2012-05-01 r3539 [i686-linux-2.6.32-5-686] (local build)
> Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
>
> Vendor: /3:0:0:0
> Product:
> User Capacity: 600,332,565,813,390,450 bytes [600 PB]
> Logical block size: 774843950 bytes
> scsiModePageOffset: response length too short, resp_len=47 offset=50
> bd_len=46
> >> Terminate command early due to bad response to IEC mode page
> A mandatory SMART command failed: exiting. To continue, add one or more
> '-T permissive' options.
>
root@nasbox:/dev# smartctl -l error /dev/sdc
> smartctl 5.43 2012-05-01 r3539 [i686-linux-2.6.32-5-686] (local build)
> Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
>
> Short INQUIRY response, skip product id
> A mandatory SMART command failed: exiting. To continue, add one or more
> '-T permissive' options.
>
>
root@nasbox:/dev# smartctl -l selftest /dev/sdc
smartctl 5.43 2012-05-01 r3539 [i686-linux-2.6.32-5-686] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
Short INQUIRY response, skip product id
A mandatory SMART command failed: exiting. To continue, add one or more '-T
permissive' options.
> But if you are getting I/O errors from /dev/sdc then that probably
> explains why you were getting an invalid argument error from mdadm
> talking to that disk.
>
> > sfdisk: read error on /dev/sdc - cannot read sector 0
> > /dev/sdc: unrecognized partition table type
> > No partitions found
>
> I don't know what to think. How can the array be active on /dev/sdc1
> when /dev/sdc is giving I/O errors? Anyone else have any ideas? I
> think the disk may be failing. Hopefully the SMART selftests will
> confirm it.
>
>
> I am going to ignore the I/O errors for a moment and continue as if
> that didn't happen. But it did. So beware.
>
> Normally I would say that you need to clone your partition from one
> disk to the other. I would normally use 'sfdisk -d /dev/sdb | sfdisk
> /dev/sdc' to do it. But you are using GPT tables so that won't work.
> Plus you have an active array on /dev/sdc2 that you don't want to
> disrupt. So instead I can only say that you need to make sure that
> sdc2, sdc3, sdc4 is partitioned like sdb2, sdb3, sdb4 and that sdb1 is
> partitioned like sdc1. Then add them correct member back into the
> array. But I don't know how to clone GPT tables. Perhaps someone
> else will have help for that part. And I don't understand the I/O
> error and think that needs to be understood first.
>
i got your point and to decrease my paint of using GPT i have just baught
1.5 TB harddrives.
so i am creating another storage server. i have the backup and restoring
all the data to new fileserver
but the problem part is samba :( actually all users UID and GID would be
lost and i have to reassign
all the rights once again to all the folders that a paint.
do you or any one know, how can i map samba MAP correct UID and GID to new
users as the old users were using in my old Samba box.
i know there are some command line games but assigning individually a UID
or GID via command would be hell of a tough job.
> Good luck!
> Bob
>
Thanks for your help bob