gacanepa

Resto de mdadm

Jan 29th, 2013
147
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. gacanepa@alumno:~$ ls -l
  2. total 76
  3. -rwxr-xr-x 1 root root 619 jul 18 2012 borrar.sh
  4. -rwxr-xr-x 1 root root 1790 jul 18 2012 choice.sh
  5. -rw-r--r-- 1 gacanepa gacanepa 10240 ene 7 11:54 cliente.tar
  6. drwxr-xr-x 2 gacanepa gacanepa 4096 ene 28 09:10 Desktop
  7. drwxr-xr-x 2 gacanepa gacanepa 4096 dic 20 16:29 Downloads
  8. -rw------- 1 gacanepa gacanepa 493 may 18 2012 mbox
  9. -rwxr-xr-x 1 root root 103 jul 18 2012 progressbar.sh
  10. drwxr-xr-x 2 gacanepa gacanepa 4096 dic 17 18:13 pruebas
  11. -rwxr-xr-x 1 root root 144 jul 18 2012 radiobutton.sh
  12. drwxr-xr-x 2 gacanepa gacanepa 4096 ene 28 12:34 raid1
  13. -rw------- 1 gacanepa gacanepa 573 nov 20 2006 reporte.css
  14. -rw-r--r-- 1 root root 451 may 28 2012 reporte.html
  15. drwxr-xr-x 3 gacanepa gacanepa 4096 dic 17 18:24 scripts
  16. -rwxr-xr-x 1 gacanepa gacanepa 541 ago 3 16:45 split.py
  17. -rwxr-xr-x 1 root root 3684 jul 18 2012 systeminfo.sh
  18. -rw-r--r-- 1 root root 1028 ene 29 10:40 system_report.html
  19. -rwxr-xr-x 1 root root 743 may 29 2012 system_report.sh
  20. gacanepa@alumno:~$ sudo mount /dev/md0 raid1
  21. gacanepa@alumno:~$ mount
  22. /dev/sda1 on / type ext3 (rw,errors=remount-ro)
  23. tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
  24. proc on /proc type proc (rw,noexec,nosuid,nodev)
  25. sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
  26. udev on /dev type tmpfs (rw,mode=0755)
  27. tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
  28. devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
  29. /dev/sdb1 on /mnt/1 type ext4 (rw)
  30. fusectl on /sys/fs/fuse/connections type fusectl (rw)
  31. nfsd on /proc/fs/nfsd type nfsd (rw)
  32. /dev/sr0 on /media/cdrom0 type iso9660 (ro,noexec,nosuid,nodev,user=gacanepa)
  33. /dev/md0 on /home/gacanepa/raid1 type ext3 (rw)
  34. gacanepa@alumno:~$ cp cliente.tar raid1
  35. cp: no se puede crear el fichero regular «raid1/cliente.tar»: Permiso denegado
  36. gacanepa@alumno:~$ sudo chown gacanepa:gacanepa raid1
  37. gacanepa@alumno:~$ cp cliente.tar raid1
  38. gacanepa@alumno:~$ cd raid1
  39. gacanepa@alumno:~/raid1$ ls
  40. cliente.tar lost+found
  41. gacanepa@alumno:~/raid1$ cd ..
  42. gacanepa@alumno:~$ sudo umount raid1
  43. gacanepa@alumno:~$ cd raid1
  44. gacanepa@alumno:~/raid1$ ls
  45. gacanepa@alumno:~/raid1$ cd ..
  46. gacanepa@alumno:~$ sudo mount /dev/md0 raid1
  47. gacanepa@alumno:~$ cd raid1
  48. gacanepa@alumno:~/raid1$ ls
  49. cliente.tar lost+found
  50. gacanepa@alumno:~/raid1$ cd ..
  51. gacanepa@alumno:~$ sudo mdadm --manage /dev/md0 --fail /dev/sdc
  52. mdadm: set /dev/sdc faulty in /dev/md0
  53. gacanepa@alumno:~$ cat /proc/mdstat
  54. Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
  55. md0 : active raid1 sdd[1] sdc[0](F)
  56. 7912436 blocks super 1.2 [2/1] [_U]
  57.  
  58. unused devices: <none>
  59. gacanepa@alumno:~$ sudo mdadm --manage /dev/md0 --remove /dev/sdc
  60. mdadm: hot removed /dev/sdc from /dev/md0
  61. gacanepa@alumno:~$ cat /proc/mdstat
  62. Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
  63. md0 : active raid1 sdd[1]
  64. 7912436 blocks super 1.2 [2/1] [_U]
  65.  
  66. unused devices: <none>
  67. gacanepa@alumno:~$ cd raid1
  68. gacanepa@alumno:~/raid1$ ls
  69. cliente.tar lost+found
  70. gacanepa@alumno:~/raid1$ df -h
  71. S.ficheros Size Used Avail Use% Montado en
  72. /dev/sda1 5,7G 2,8G 2,7G 51% /
  73. tmpfs 125M 0 125M 0% /lib/init/rw
  74. udev 120M 200K 120M 1% /dev
  75. tmpfs 125M 140K 125M 1% /dev/shm
  76. /dev/sdb1 198M 5,8M 182M 4% /mnt/1
  77. /dev/sr0 49M 49M 0 100% /media/cdrom0
  78. /dev/md0 7,5G 146M 7,0G 3% /home/gacanepa/raid1
  79. gacanepa@alumno:~/raid1$ sudo mdadm --manage /dev/md0 --add /dev/sdc
  80. mdadm: re-added /dev/sdc
  81. gacanepa@alumno:~/raid1$ cat /proc/mdstat
  82. Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
  83. md0 : active raid1 sdc[0] sdd[1]
  84. 7912436 blocks super 1.2 [2/1] [_U]
  85. [>....................] recovery = 0.1% (8320/7912436) finish=63.2min speed=2080K/sec
  86.  
  87. unused devices: <none>
  88. gacanepa@alumno:~/raid1$ ls
  89. cliente.tar lost+found
RAW Paste Data