[ubuntu-it] Sostituire disco RAID1

Roby Pozzato roberto a robertopozzato.it
Dom 28 Mar 2010 23:35:06 BST


Non si può mai stare tranquilli. :-(

mdadm mi informa che uno dei due dischi del server di casa fa le bizze. 
Ok, lo cambieremo...


Primo problema (logico): quale dei due?


root a gretel:~# cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] 
[raid4] [raid10]
md0 : active raid1 sdd1[2] sdc1[0]
       976759936 blocks [2/1] [U_]
       [==>..................]  recovery = 12.2% (120119872/976759936) 
finish=302.7min speed=47164K/sec

unused devices: <none>


A vedere così mi sembra sdc


root a gretel:~# mdadm --detail /dev/md0
/dev/md0:
         Version : 00.90
   Creation Time : Sat Feb 20 20:06:54 2010
      Raid Level : raid1
      Array Size : 976759936 (931.51 GiB 1000.20 GB)
   Used Dev Size : 976759936 (931.51 GiB 1000.20 GB)
    Raid Devices : 2
   Total Devices : 2
Preferred Minor : 0
     Persistence : Superblock is persistent

     Update Time : Mon Mar 29 00:19:41 2010
           State : clean, degraded, recovering
  Active Devices : 1
Working Devices : 2
  Failed Devices : 0
   Spare Devices : 1

  Rebuild Status : 12% complete

            UUID : 40640377:8bf00ce3:f5dffc43:cc13a774
          Events : 0.140108

     Number   Major   Minor   RaidDevice State
        0       8       33        0      active sync   /dev/sdc1
        2       8       49        1      spare rebuilding   /dev/sdd1


A vedere questo invece sembra sdd. (Ma chi gliel'ha detto a quello lì di 
diventare "spare"? Boh...)

Avviando con la live 9.10 Palympsest dice anche lui sdc, quindi andando 
a maggioranza... ma non mi sembra un buon criterio, in questo caso.

Cos'è che non capisco?

Grazie.

(Poi seguiranno secondo e terzo quesito, ma una cosa per volta)

Se serve, seguono fdisk e mount -l


root a gretel:~# fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x35a135a0

    Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         243     1951866   83  Linux
/dev/sda2   *         244         304      489982+  83  Linux
/dev/sda3             305       19457   153846472+  83  Linux

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00019a28

    Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         243     1951866   83  Linux
/dev/sdb2             244         304      489982+  83  Linux
/dev/sdb3             305       19457   153846472+  83  Linux

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000d932a

    Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1      121601   976760001   fd  Linux raid 
autodetect

Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0006c291

    Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1      121601   976760001   fd  Linux raid 
autodetect

Disk /dev/md0: 1000.2 GB, 1000202174464 bytes
2 heads, 4 sectors/track, 244189984 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x08040000

Disk /dev/md0 doesn't contain a valid partition table


root a gretel:~# mount -l
/dev/mapper/sdb3_crypt on / type ext4 (rw,errors=remount-ro) [Root]
proc on /proc type proc (rw)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
/dev/sdb2 on /boot type ext2 (rw) [Boot]
/dev/mapper/md0_crypt on /var type ext4 (rw) [Var]


-- 
Roby

* http://www.sprazzidiluce.it




Maggiori informazioni sulla lista ubuntu-it