/etc/crypttab rm -fr /root/lukspsfile
[root@foundation164 Desktop]# vim /etc/fstab [root@foundation164 Desktop]# > /etc/crypttab [root@foundation164 Desktop]# rm -fr /root/lukspsfile[root@foundation164 Desktop]# fdisk /dev/vdb Welcome to fdisk (util-linux 2.23.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): p Disk /dev/vdb: 10.7 GB, 10737418240 bytes, 20971520 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x6793b4f9 Device Boot Start End Blocks Id System Command (m for help): n Partition type: p primary (0 primary, 0 extended, 4 free) e extended Select (default p): Using default response p Partition number (1-4, default 1): First sector (2048-20971519, default 2048): Using default value 2048 Last sector, +sectors or +size{K,M,G} (2048-20971519, default 20971519): +1g Unsupported suffix: 'g'. Supported: 10^N: KB (KiloByte), MB (MegaByte), GB (GigaByte) 2^N: K (KibiByte), M (MebiByte), G (GibiByte) Last sector, +sectors or +size{K,M,G} (2048-20971519, default 20971519): +1G Partition 1 of type Linux and of size 1 GiB is set Command (m for help): n Partition type: p primary (1 primary, 0 extended, 3 free) e extended Select (default p): Using default response p Partition number (2-4, default 2): First sector (2099200-20971519, default 2099200): Using default value 2099200 Last sector, +sectors or +size{K,M,G} (2099200-20971519, default 20971519): +1G Partition 2 of type Linux and of size 1 GiB is set Command (m for help): n Partition type: p primary (2 primary, 0 extended, 2 free) e extended Select (default p): Using default response p Partition number (3,4, default 3): First sector (4196352-20971519, default 4196352): Using default value 4196352 Last sector, +sectors or +size{K,M,G} (4196352-20971519, default 20971519): +1G Partition 3 of type Linux and of size 1 GiB is set Command (m for help): p Disk /dev/vdb: 10.7 GB, 10737418240 bytes, 20971520 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x6793b4f9 Device Boot Start End Blocks Id System /dev/vdb1 2048 2099199 1048576 83 Linux /dev/vdb2 2099200 4196351 1048576 83 Linux /dev/vdb3 4196352 6293503 1048576 83 Linux Command (m for help): wq The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. [root@foundation164 Desktop]# partprobe [root@foundation164 Desktop]# mdadm -C /dev/md0 -a yes -l 1 -n 2 -x 1 /dev/vdb{1..3} mdadm: Note: this array has metadata at the start and may not be suitable as a boot device. If you plan to store '/boot' on this device please ensure that your boot-loader understands md/v1.x metadata, or use --metadata=0.90 Continue creating array? Continue creating array? (y/n) y mdadm: Defaulting to version 1.2 metadata mdadm: array /dev/md0 started. [root@foundation164 Desktop]# mkfs.xfs /dev/md0 meta-data=/dev/md0 isize=256 agcount=4, agsize=65500 blks = sectsz=512 attr=2, projid32bit=1 = crc=0 data = bsize=4096 blocks=262000, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0 ftype=0 log =internal log bsize=4096 blocks=853, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 [root@foundation164 Desktop]# mount /dev/md0 /mnt [root@foundation164 Desktop]# [root@foundation164 Desktop]# watch -n 1 'cat /proc/mdstat;df -h /mnt' [root@foundation164 Desktop]# mdadm /dev/md0 /dev/md0: 1023.44MiB raid1 2 devices, 1 spare. Use mdadm --detail for more detail. [root@foundation164 Desktop]# mdadm /dev/md0 -f /dev/vdb2 mdadm: set /dev/vdb2 faulty in /dev/md0 [root@foundation164 Desktop]# mdadm /dev/md0 -r /dev/vdb2 mdadm: hot removed /dev/vdb2 from /dev/md0 [root@foundation164 Desktop]# mdadm /dev/md0 -a /dev/vdb2 mdadm: added /dev/vdb2 [root@foundation164 Desktop]# umount /mnt [root@foundation164 Desktop]# mdadm -S /dev/md0 mdadm: stopped /dev/md0 [root@foundation164 Desktop]# [root@foundation164 Desktop]# fdisk /dev/vdb Welcome to fdisk (util-linux 2.23.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): d Partition number (1-3, default 3): 1 Partition 1 is deleted Command (m for help): d Partition number (2,3, default 3): 2 Partition 2 is deleted Command (m for help): d Selected partition 3 Partition 3 is deleted Command (m for help): p Disk /dev/vdb: 10.7 GB, 10737418240 bytes, 20971520 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x6793b4f9 Device Boot Start End Blocks Id System Command (m for help): wq The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. [root@foundation164 Desktop]# partprobe [root@foundation164 Desktop]#