Foo

From LinuxReviews
Jump to: navigation, search

dagens prosjekt. :D

      Disk Drive: /dev/sdb
                                        Size: 500107862016 bytes, 500.1 GB
                               Heads: 255   Sectors per Track: 63   Cylinders: 60801
          Disk Drive: /dev/sdc
                                        Size: 500107862016 bytes, 500.1 GB
                               Heads: 255   Sectors per Track: 63   Cylinders: 60801

PRI 120 PRI 490000 PRI 9988.10

== MAKE SURE KERNEL HAS STUFF, EMREGE MDADM

emerge mdadm

Contents

[edit] CREATE BOOT

mdadm --create /dev/md0 --level=1 --raid-devices=3 --metadata=0.90 missing /dev/sdb1 /dev/sdc1

[edit] CREATE MAIN SYSTEM RAID ARRAY

mdadm --create /dev/md1 --level=1 --raid-devices=3 missing /dev/sdb2 /dev/sdc2


[edit] CREATE CCACHE AND PORTAGE TEMP DIRECTORY?

mdadm --create /dev/md2 --level=0 --raid-devices=3 missing /dev/sdb1 /dev/sdc1

[edit] GRUB2

http://wiki.gentoo.org/wiki/GRUB2_Quick_Start#Gentoo_GRUB_Legacy_.280.97.29_to_GRUB2_Migration_Guide

emerge --ask sys-boot/grub:2

grub2-install /dev/sdb grub2-install /dev/sdc grub2-install /dev/md0 <- not right way to do it I guess

http://wiki.gentoo.org/wiki/DM-Crypt_LUKS

[edit] SETUP / MAKE THE CRYPT THING

cryptsetup luksFormat /dev/md1 -ctwofish-xts-plain:wd256 -s 256

(cryptsetup -y --cipher aes-cbc-essiv:sha256 --key-size 256 luksFormat /dev/md2)

[edit] MOUNT CRYPT THING

cryptsetup luksOpen /dev/md1 encVol

will create /dev/mapper/encVol

[edit] CREATE LVM

https://wiki.gentoo.org/wiki/LVM#LVM_on_root

pvcreate /dev/mapper/encVol

 Physical volume "/dev/mapper/encVol" successfully created


The following command creates a Volume Group (VG) named vg0 on two previously initialized Physical Volumes (PV) named /dev/sdX1 and /dev/sdY1:

root # vgcreate vg0 /dev/mapper/encVol Volume group "vg0" successfully created

lvcreate -L 14G -n lvol1 vg0 lvcreate -L 442.2G -n lvol2 vg0

[edit] WE NOW HAVE LVM "HARDDRIVES"

rodan ~ # ls /dev/vg0/ lvol1 lvol2

e2fsck -f /dev/vg0/lvol1

[edit] FORMAT LVM HARDDRIVE

mkfs.ext4 /dev/vg0/lvol2


[edit] FORMAT LVM HARDDRIVE

mkfs.ext4 /dev/vg0/lvol2


[edit] REMOVE DRIVE

root # umount /dev/vg0/lvol1 && lvchange -a n /dev/vg0/lvol1

The following command removes the LV named lvol1 from VG named vg0: root # lvremove /dev/vg0/lvol1

-- umount /dev/vg0/lvol2 && lvchange -a n /dev/vg0/lvol2


--- http://www.carrier-lost.org/blog/fully-encrypted-gentoo-system-with-lukscryptsetup-and-lvm

title Gentoo Linux 2.6.34-r1 root (hd0,0) kernel /boot/kernel-genkernel-x86_64-2.6.34-gentoo-r1 root=/dev/ram0 crypt_root=/dev/vg1/root init=/linuxrc splash=silent dolvm initrd /boot/initramfs-genkernel-x86_64-2.6.34-gentoo-r1


[edit] deactivate LV

You can deactivat a LV with the following command: root # umount /dev/vg0/lvol1 root # lvchange -a n /dev/vg0/lvol1

You will not be able to mount the LV anywhere before it got reactivated: root # lvchange -a y /dev/vg0/lvol1

-- performance tips. http://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html

Personal tools
hardware tests
Categories
Privacy policy
linux events
ipv6
Networking
IPv6

Search:

linux newz | random page | poetry | free blog