If you want to setup a raid1 system will modern mdadm programs on debian/ubuntu on a new/zeroed disk automatically set the type to Oxdm ?
Fred.
root@maples-server:~# cat /etc/mdadm/mdadm.conf # mdadm.conf # # Please refer to mdadm.conf(5) for information about this file. # # by default (built-in), scan all partitions (/proc/partitions) and all # containers for MD superblocks. alternatively, specify devices to scan, using # wildcards if desired. #DEVICE partitions containers DEVICE /dev/sdb1 /dev/sdc1 # 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/md0 metadata=1.2 UUID=032e4ab2:53ac5db8:98806abd:420716a5 devices=/dev/sdb1,/dev/sdc1
root@maples-server:~# cat /proc/mdstat Personalities : [raid0] md127 : active raid0 sdc1[1] sdb1[0] 488016896 blocks super 1.2 512k chunks unused devices: <none>
root@maples-server:~# ls -l /dev/md* brw-rw---- 1 root disk 9, 127 May 2 20:17 /dev/md127 /dev/md: total 0 lrwxrwxrwx 1 root root 8 May 2 20:17 maples-server:0 -> ../md127
root@maples-server:~# mdadm --detail --scan ARRAY /dev/md/maples-server:0 metadata=1.2 name=maples-server:0 UUID=032e4ab2:53ac5db8:98806abd:420716a5
Personalities : [raid1] md1 : active (auto-read-only) raid1 sdb2[1] sda2[0] 3909620 blocks super 1.2 [2/2] [UU] md0 : active raid1 sda1[0] 972849016 blocks super 1.2 [2/1] [U_] unused devices: <none>
/dev/md0: Version : 1.2 Creation Time : Tue Jun 21 21:31:58 2011 Raid Level : raid1 Array Size : 972849016 (927.78 GiB 996.20 GB) Used Dev Size : 972849016 (927.78 GiB 996.20 GB) Raid Devices : 2 Total Devices : 1 Persistence : Superblock is persistent Update Time : Tue Jun 2 02:21:12 2015 State : clean, degraded Active Devices : 1 Working Devices : 1 Failed Devices : 0 Spare Devices : 0 Name : UUID : Events : 3678064 Number Major Minor RaidDevice State 0 8 1 0 active sync /dev/sda1 2 0 0 2 removed
/dev/md1: Version : 1.2 Creation Time : Tue Jun 21 21:32:09 2011 Raid Level : raid1 Array Size : 3909620 (3.73 GiB 4.00 GB) Used Dev Size : 3909620 (3.73 GiB 4.00 GB) Raid Devices : 2 Total Devices : 2 Persistence : Superblock is persistent Update Time : Sat May 16 15:17:56 2015 State : clean Active Devices : 2 Working Devices : 2 Failed Devices : 0 Spare Devices : 0 Name : UUID : Events : 116 Number Major Minor RaidDevice State 0 8 2 0 active sync /dev/sda2 1 8 18 1 active sync /dev/sdb2
Disk /dev/sda (Sun disk label): 255 heads, 63 sectors, 60801 cylinders Units = cylinders of 16065 * 512 bytes Device Flag Start End Blocks Id System /dev/sda1 0 60795 488335837+ 83 Linux native /dev/sda2 u 60795 60801 48195 82 Linux swap /dev/sda3 0 60801 488384032+ 5 Whole disk
# cat /proc/mdstat Personalities : [raid1] md127 : active (auto-read-only) raid1 sdc[1] sdb[0] 52396032 blocks super 1.2 [2/2] [UU] unused devices: <none>
# mdadm --stop --force /dev/md127 mdadm: Cannot get exclusive access to /dev/md127:Perhaps a running process, mounted filesystem or active volume group?
# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 15G 3.5G 11G 26% / tmpfs 376M 0 376M 0% /dev/shm /dev/sda2 4.7G 9.8M 4.5G 1% /others /dev/sda3 2.9G 133M 2.6G 5% /var
# pvdisplay --- Physical volume --- PV Name /dev/md127 VG Name data PV Size 49.97 GiB / not usable 4.00 MiB Allocatable yes PE Size 4.00 MiB Total PE 12791 Free PE 5111 Allocated PE 7680 PV UUID IJ2br8-SWHW-cf1d-89Fr-EEw9-IJME-1BpfSj # vgdisplay --- Volume group --- VG Name data System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 19 VG Access read/write VG Status resizable MAX LV 0 Cur LV 2 Open LV 0 Max PV 0 Cur PV 1 Act PV 1 VG Size 49.96 GiB PE Size 4.00 MiB Total PE 12791 Alloc PE / Size 7680 / 30.00 GiB Free PE / Size 5111 / 19.96 GiB VG UUID 982ay8-ljWY-kiPB-JY7F-pIu2-87uN-iplPEQ # lvdisplay --- Logical volume --- LV Path /dev/data/home LV Name home VG Name data LV UUID OAQp25-Q1TH-rekd-b3n2-mOkC-Zgyt-3fX2If LV Write Access read/write LV Status available # open 0 LV Size 10.00 GiB Current LE 2560 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:0 --- Logical volume --- LV Path /dev/data/backup LV Name backup VG Name data LV UUID Uq6rhX-AvPN-GaNe-zevB-k3iB-Uz0m-TssjCg LV Write Access read/write LV Status available # open 0 LV Size 20.00 GiB Current LE 5120 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:1