Archive

Archive for the ‘Filesystems’ Category

RAID (mdadm) add/remove faulty drive

/dev/sda3 -> faulty device.

root@makeitweb ~ # cat /proc/mdstat 
Personalities : [raid1] 
md3 : active raid1 sda4[0] sdb4[1]
      1843414335 blocks super 1.2 [2/2] [UU]
 
md2 : active raid1 sda3[0](F) sdb3[1]
      1073740664 blocks super 1.2 [2/1] [_U]
 
md1 : active raid1 sda2[0] sdb2[1]
      524276 blocks super 1.2 [2/2] [UU]
 
md0 : active raid1 sda1[0] sdb1[1]
      12581816 blocks super 1.2 [2/2] [UU]
 
unused devices: <none>
mdadm --manage /dev/md2 --fail /dev/sda3
mdadm --manage /dev/md2 --remove /dev/sda3
mdadm --manage /dev/md2 --add /dev/sda3
root@makeitweb ~ # cat /proc/mdstat 
Personalities : [raid1] 
md3 : active raid1 sda4[0] sdb4[1]
      1843414335 blocks super 1.2 [2/2] [UU]
 
md2 : active raid1 sda3[0] sdb3[1]
      1073740664 blocks super 1.2 [2/1] [_U]
      [>....................]  recovery =  0.1% (1565952/1073740664) finish=319.5min speed=55926K/sec
 
md1 : active raid1 sda2[0] sdb2[1]
      524276 blocks super 1.2 [2/2] [UU]
 
md0 : active raid1 sda1[0] sdb1[1]
      12581816 blocks super 1.2 [2/2] [UU]
 
unused devices: <none>
Categories: Apache, backup, bash, Filesystems Tags:

Quick Tip: formatting hard drive partition with ext3

mke2fs -j /dev/hdc1

или

mkfs -t ext3 /dev/hdc1

Където /dev/hdc1 е partition-a, който искаме да форматираме

Categories: Cent OS, Debian, Filesystems, Linux, Quick Tips Tags: