Monday, August 22, 2016

Blogging This Tweet From Sen. Risa Hontiveros Whose Late Husband Was A Cop

The lives lost as of today, 22nd of August 2016, is at 1,800.

Thursday, August 18, 2016

Status of Logical Volumes After 30 Days



It's been a while since I created these logical volumes and extended my volume group (the only one) to include the newly grown raid5 array on a 2-2-1 TB device. Frown all you want as long as it works. When that 1 TB HDD shows some signs of failing or error, I'll replace it with a 2TB HDD. The raid array will then be a complete 2-2-2 TB raid5.

Here's the status of the raid array now:


I'm replacing the 1 TB HDD when it fails or errors, or when I need to increase the capacity of the array, whichever comes first. The present raid array size is 2 TB.
--
Donato Roque @desktop-ubuntu
mobile:0918-5721-710
I'm on twitter and facebook .
Web: Danny's Space
Consider using my pgp keys for privacy.

Wednesday, July 27, 2016

Lesson Learned On Logical Volume Management and RAID

The lesson is this; that just because you can doesn't mean you should.

I wiped off my RAID array and the data in it. It has around 300+G there, mostly downloaded, recoverable, and back-up'd to a CD/DVD content. I was trying to employ Logical Volume Management or LVM on an existing RAID array. After tackling RAID these couple of months, I figured I'm ready to face another monster. LVM is awesome because it can do partitioning, resizing, formatting, creating snapshots, while the system is online. You do not have to take it offline which to me is like magic.

Now that the data is gone, there really is no reason not to LVM the RAID. So after reinstalling my operating system (which is another long story), I reassemble RAID with:

#mdadm --assemble /dev/md0  /dev/sda  /dev/sdb  /dev/sdc

and checked the status of the array with:

#cat /proc/mdstat
or
#mdadm --detail /dev/md0

I checked the status of all the logical volumes with any of the following commands:

#pvdisplay     ;to check the physical volumes
#vgdisplay     ;to check the volume group
#lvdisplay      ;to check the logical volumes

I know that my home directory is going to need a lot of room for music and videos. I will have to create logical volumes for it to utilize the RAID which is now empty. I would leave some free space there for some flexibility.

To create logical volumes, I plan to extend the existing volume group first to include the newly assembled RAID. So I typed:

#vgextend ubuntu-vg /dev/md0

Then to create the logical volumes I need I typed:

#lvcreate -L size -n Musiclv ubuntu-vg
#mkfs.ext4 /dev/mapper/ubuntu-vg/Musiclv
#lvcreate -L size -n Videoslv ubuntu-vg
#mkfs.ext4 /dev/mapper/ubuntu-vg/Videoslv

I tested mounting them to home directory. I tried:

#mount /dev/mapper/ubuntu-vg/Musiclv /home/user/Music   ;since the Music folder already exist, I don't have to create them.
#mount /dev/mapper/ubuntu-vg/Videoslv /home/user/Videos     ;since the Videos folder already exist, I don't have to create them.

To check if they work, open the file manager, nautilus, and check out properties in particular. If you have trouble with permissions and ownerships of the files, then you should try:

#chmod 777 /home/user/Music
#chown user:user /home/user/Music
#chmod 777 /home/user/Videos
#chown user:user /home/user/Videos

These last series of commands will let you read and write your files and execute operations on them.

To make these changes more permanent so that even if you end your session and reboot they will stay, then we have to edit /etc/fstab file.

#gedit /etc/fstab

Put entries for each lv you created, something like:

                              
    filesystem       mount point        type         options        dump        pass

/dev/mapper/ubuntu-vg/Musiclv    /home/user/Music     ext4     defaults     0       0
/dev/mapper/ubuntu-vg/Videoslv   /home/user/Videos     ext4     defaults     0       0

As the names of the logical volumes imply, I plan to put music and videos on these folders.

Monday, July 25, 2016

Mina



July 2016 - San Mateo, Philippines
--
Donato Roque @ubuntu-16.04
mobile: 63-918-572-1710
and this is my blog.
Consider using my pgp keys for privacy.

Sunday, July 24, 2016

RAID: Added 1 x 2TB Hard drive

I talked about RAID in my system before here and here. My present set up is:
/dev/sda5      SSD      223GB   EXT4    /  
/dev/sdb1     HHD      2TB       Linux raid      /media/user
/dev/sdc1      HHD      1TB       Linux raid     /media/user

New:    
/dev/sdd1      HHD      2TB      unpartitioned - free space

RAID:
/dev/md0        2 devices    /dev/sdb1   /dev/sdc1


/dev/sdc1 is old. It has 27,500 hours of use according to smartctl. You can open the terminal and type:

#smartctl -a /dev/sdc

to get collected data from the device. Among other attributes see Power-on-hours to get the total hours this hard drive has been spinning. Also pay attention to 5 Attribute the allocated Sector Count. Any value you see other than 100 there, you should move your data somewhere else. 

I have a RAID5 which includes this device. So any warning notification I can fail and remove it. Replace it with a new hard drive. I am completing my RAID 5 array with a new hard drive today.

After installing the hard drive to your SATA cable and power cable. See if your computer detects it. Type:

#fdisk -l

Then partition the disk with fdisk.

#fdisk /dev/sdd

fdisk will create a new partition and create a partition table for you. 

-d     delete partition
-n     create new partition
-p     print new partition and details
-t      change to new type of filesystem
-l       list filesystem type 
-q      quit without saving
-w     write changes, and think first before typing enter


Once the new partition in the new hard drive is ready. I added the device to the RAID array.

Old RAID:
/dev/md0          2 devices         /dev/sdb1     /dev/sdc1

To add the new device to the RAID array:

#mdadm  -add /dev/md0 /dev/sdd1

Check the status of the array:

#cat /proc/mdstat

It will show that /dev/sdd1 is a spare. I have to grow the array to 3 devices.

#mdadm --grow --raid-devices=3  /dev/md0 

You can monitor the sync process of the array with:
#cat /proc/mdstat

 
--
Donato Roque @ubuntu-16.04
mobile: 63-918-572-1710
and this is my blog.
Consider using my pgp keys for privacy.

Monday, July 18, 2016

GNOME-terminal Rocks




Using Ubuntu 16.04 I was wondering if "avconv" is already installed. I am in fact curious if a bunch of packages are installed. I open GNOME-Terminal with Cntrl+Alt+T and type the name of the package. I get info and suggestions on how to install it. In the case of "avconv" it is called by another name. 

That's service and quite helpful.

--
Donato Roque @ubuntu-16.04
mobile: 63-9185721710
and this is my blog.
Consider using my pgp keys for privacy.

Sunday, July 17, 2016

Unpatched Software Is A Security Issue

Ubuntu Linux forum was hacked last July 14th. Canonical the company developing Ubuntu disclosed that the forum's database was hacked and data was compromised including hashed passwords of 2 Million users. The hackers used a known vulnerability in an unpatched software the forum is using in its servers. 

In the Linux world, the number one security isssue is updating the operating system and the software that we use with it. The first ones to violate this are the servers. Servers simply run old vulnerable software. 


--
Donato Roque @ubuntu-16.04
mobile: 63-9185721710
and this is my blog.
Consider using my pgp keys for privacy.