Category Archives: Configurations

In this tutorial we are going to clone a CentOS server created with XFS partitions. Our Backup software r1soft do not support XFS partitions. So we are going to clone the server in a different server with rsync and EXT4 partitions. a) Create all the partions on the new server with cfdisk ( try to keep all the partitions with the same order and the same size) sda 8:0 0 20G 0 disk —-> sda1 8:1 0 517.7M 0 part /boot —-> sda2 8:2 0 19.5G 0 part / sdb 8:16 0 10G 0 disk —-> sdb1 8:17 0 2G 0 part [SWAP] —-> sdb2 8:18 0 8G 0 part /home sr0 11:0 1 1024M 0 rom b) Disable Selinux on the original server and reboot it c) Stop the database on the original machine (in case you have one) d) Create the following path in which we are going to mount out system and give format to the new partitions mkswap /dev/sdb1 mkfs.ext4 /dev/sda1 mkfs.ext4 /dev/sda2 mkfs.ext4 /dev/sdb2 mkdir -p /mnt/centos e) Mount the partitions mount /dev/sda2 /mnt/centos/ mkdir -p {/mnt/centos/boot,/mnt/centos/dev,/mnt/centos/sys,/mnt/centos/proc,/mnt/centos/tmp,/mnt/centos/home} mount /dev/sda1 /mnt/centos/boot mount /dev/sdb2 /mnt/centos/home/ f) Rsync everything from the original sever via ssh. The 192.168.1.115 is Continue reading CentOS 7 cloned XFS to EXT4→

Live CD project 1) Step one Set a virtual machine and load the live CD “livedvd-amd64-multilib-20140826.iso” Get the gentoo live cd from # cd ~ # wget https://bouncer.gentoo.org/fetch/gentoo-20140826-livedvd/amd64/wgethttps://ftp.snt.utwente.nl/pub/os/linux/gentoo/releases/amd64/20140826/livedvd-amd64-multilib-20140826.iso Characteristics of my Virtual Machine are below. You can modify those setting according to your host machine resources Load the Virtual Machine using the default option once you are inside of the VM, there are three things that you have to change 1) Active the sshd # sudo /etc/init.d/sshd start 2) Change the roort password # sudo passwd root 3) Get your ip # ifconfig # emerge -av squashfs-tools <—- help to create the Filesystem later *From now, you can access the virtual machine from your favorite terminal (I’m using Debian), if you are in windows, use putty. Once you get inside of your live cd, you can type # lsblk As you can see, I created a 40G HD NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT fd0 2:0 1 4K 0 disk sda 8:0 0 40G 0 disk <——Here! sr0 11:0 1 2.8G 0 rom /mnt/cdrom loop0 7:0 0 2.6G 1 loop /mnt/livecd Well, in order to access those 40G and build our customized LiveCD, we have to create a partition Continue reading Customized Linux CD/USB→

We have done some work about creating iSCSI targets (disks) on FreeBSD 10. If you haven’t checked my tutorial go ahead and click here. So now we are going to learn how to simplify things by using the FreeNAS interface in order to create targets. We are going to need a few things: Portal: It is the socket in which FreeNAS is going to be receiving all connections from the clients Extent: It is the dataset that you are going to share. You also need to specify the size Initiators: add permissions to your sharing Target: name your target (name, ip, port, Lun) Target/ Extents: You are going to associate your dataset to you target. So let me create a target as an example. 1. – Once you get access to your FreeNAS interface, go to the following path Services àiSCSIàPortalà Add Portal 2. – Create an Extent by clicking on “Add Extent” (Even if you did not create “centos” directory previously, don’t worry FreeNAS will create the dataset for you automatically. 3. – It is time to set our initiator (you might want to add your network address or you might also want to add “ALL” Continue reading Diskless Machines (iPXE &iSCSI)→

iSCSI Create a dataset on my zfs pool # sudo zfs create -V 30G tank/windows If you want to delete a dataset for any circumstances you can run the following command # sudo zfs destroy tank/windows Alternatively you can create a disk image if you are not using ZFS as file system with the following command Note: This step is not necessary if you have created a zfs dataset. Also if you decided to create a disk image, do not forget to change the path on you istgt.conf configuration file # sudo dd if=/dev/zero of=/home/windows.img bs=1M count=30000 # count is the size in megabytes Install iSCSi software on the FreeBSD server # cd /usr/ports/net/istgt # sudo make install clean (everything by default) As a root run the following command in order to enable the service # echo ‘istgt_enable=”YES”‘ >> /etc/rc.conf Let’s create our configurations files # cd /usr/local/etc/istgt/ There are three configuration files that we have to create istgt.conf auth.conf istgtcontrol.conf We create the first file under the path /usr/local/etc/istgt # sudo vi istgt.conf Copy and paste the following lines into the file # cat istgt.conf [Global] Comment “Global section” NodeBase “vhostfbsd.2014-04.mrwhitebp.com” Continue reading iSCSI on FreeBSD→