[+] raid1 - znikn

Ogólne pytania dotyczące systemu
sethiel
Junior Member
Posty: 762
Rejestracja: 28 stycznia 2008, 11:50
Lokalizacja: Wrocław

[+] raid1 - zniknął po restarcie

Post autor: sethiel »

Debian Squeeze.

Utworzyłem nową macierz raid1.

Kod: Zaznacz cały

fdisk /dev/sdg 
(n) /dev/sdg1 - ID:fd (Linux raid autodetect)
fdisk /dev/sdh 
(n) /dev/sdh1 - ID:fd (Linux raid autodetect)

 mdadm --create /dev/md2 --level=1 --raid-devices=2  /dev/sdg1 /dev/sdh1
mkfs.ext4 /dev/md2

fstab:
UUID=b1b0f721-924e-4d67-8797-7d03dfd8e097 /virtual/datastore1 ext4    noatime         0       2

Kod: Zaznacz cały

Disk /dev/sdg: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x09f14668

   Device Boot      Start         End      Blocks   Id  System
/dev/sdg1               1      121602   976762552+  fd  Linux raid autodetect

Disk /dev/sdh: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x09f14668

   Device Boot      Start         End      Blocks   Id  System
/dev/sdh1               1      121602   976762552+  fd  Linux raid autodetect
Zamontowałem, umieściłem tam dane. Zrobiłem restart i md2 zniknęło.

Kod: Zaznacz cały

# cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4]
md1 : active raid5 sdd1[0] sdf1[2] sde1[1]
      3907025920 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]

md0 : active (auto-read-only) raid1 sdb1[0] sdc1[1]
      732571512 blocks super 1.2 [2/2] [UU]

unused devices: <none>

/etc/mdadm/mdadm.conf

Kod: Zaznacz cały

# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default, scan all partitions (/proc/partitions) for MD superblocks.
# alternatively, specify devices to scan, using wildcards if desired.
DEVICE partitions

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# instruct the monitoring daemon where to send mail alerts
MAILADDR root

# definitions of existing MD arrays
ARRAY /dev/md/0 metadata=1.2 UUID=9487290b:ccc031dc:956cec0b:4f118d31 name=bacula5:0
ARRAY /dev/md/1 metadata=1.2 UUID=d8b217ed:e18d338b:675654c5:51524187 name=bacula5:1

# This file was auto-generated on Thu, 11 Aug 2011 14:37:50 +0200
# by mkconf 3.1.4-1+8efb9d1

blkid

Kod: Zaznacz cały

/dev/sdc1: UUID="9487290b-ccc0-31dc-956c-ec0b4f118d31" LABEL="bacula5:0" TYPE="linux_raid_member"
/dev/sda1: UUID="41e25ed0-5dde-4a21-ad35-f250bd5aed6c" TYPE="ext4"
/dev/sda2: UUID="1ecf87fe-87bc-41ec-93c6-75c647fb93f2" TYPE="swap"
/dev/sda3: UUID="30bc21e5-8e03-4481-9013-c321c8330a18" TYPE="ext4"
/dev/sda4: UUID="02887739-ef3e-4567-a4e6-9b34ef3c7173" TYPE="ext4"
/dev/md1: UUID="4ffb2b8f-935e-426e-9bc4-9bdfcff56800" TYPE="ext4"
/dev/sdb1: UUID="9487290b-ccc0-31dc-956c-ec0b4f118d31" LABEL="bacula5:0" TYPE="linux_raid_member"
/dev/sdf1: UUID="d8b217ed-e18d-338b-6756-54c551524187" LABEL="bacula5:1" TYPE="linux_raid_member"
/dev/sdd1: UUID="d8b217ed-e18d-338b-6756-54c551524187" LABEL="bacula5:1" TYPE="linux_raid_member"
/dev/sde1: UUID="d8b217ed-e18d-338b-6756-54c551524187" LABEL="bacula5:1" TYPE="linux_raid_member"
/dev/md0: UUID="0bebd693-5906-416f-8dd8-cc7b7b901b96" TYPE="ext4"
/dev/sdg1: UUID="909177e0-ef13-46d5-b1a4-3ed064e8e20d" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdh1: UUID="909177e0-ef13-46d5-b1a4-3ed064e8e20d" TYPE="ext3"
Jak odzyskać utworzonego (wczoraj) RAIDa?
Ale się zdziwiłem...


Edycja:

Kod: Zaznacz cały

root@bacula5:/etc/mdadm# mdadm --examine /dev/sdg1
/dev/sdg1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : c5683e67:63a863a2:7b059563:28befb7f
           Name : bacula5:2  (local to host bacula5)
  Creation Time : Tue Jun 11 13:19:57 2013
     Raid Level : raid1
   Raid Devices : 2

 Avail Dev Size : 1953523057 (931.51 GiB 1000.20 GB)
     Array Size : 1953522784 (931.51 GiB 1000.20 GB)
  Used Dev Size : 1953522784 (931.51 GiB 1000.20 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
          State : active
    Device UUID : 866203fc:bbc30591:01f9df0a:2ff10738

    Update Time : Tue Jun 11 17:24:09 2013
       Checksum : bb240b1a - correct
         Events : 9

/etc/mdadm/mdadm.conf

Kod: Zaznacz cały

ARRAY /dev/md/2 metadata=1.2 UUID=c5683e67:63a863a2:7b059563:28befb7f name=bacula5:1
Działa. Czemuż aż czemuż nie robi tego automat.
ODPOWIEDZ