Monday, March 2, 2020

GROWING RAID+LVM


GROWING RAID+LVM


Step by step howto:




Add Drive
mdadm --add /dev/md0 /dev/sdb3


Tunning
echo 50000 > /proc/sys/dev/raid/speed_limit_min
echo 200000 > /proc/sys/dev/raid/speed_limit_max


Grow the Array
 mdadm --grow /dev/md0 --raid-devices=4


Resize PV
# pvresize /dev/md1
  Physical volume "/dev/md1" changed
  1 physical volume(s) resized or updated / 0 physical volume(s) not resized


Extend LV
# lvextend -L +400G -n /dev/XXXX00/LV-HOME
  Size of logical volume XXXX00/LV-HOME changed from 565.66 GiB (144809 extents) to 965.66 GiB (247209 extents).
  Logical volume XXXX00/LV-HOME successfully resized.


Grow filesystem
# resize2fs /dev/mapper/XXXX00-LV--HOME
resize2fs 1.44.5 (15-Dec-2018)
Filesystem at /dev/mapper/XXXX00-LV--HOME is mounted on /home; on-line resizing required
old_desc_blocks = 71, new_desc_blocks = 121
The filesystem on /dev/mapper/XXXX00-LV--HOME is now 253142016 (4k) blocks long.


Check
# df -h /home
Filesystem                   Size  Used Avail Use% Mounted on
/dev/mapper/XXXX00-LV--HOME  950G  431G  477G  48% /home



Wednesday, July 10, 2019

Linux: How do to permanently disable hard drives?

Linux: How do to permanently disable hard drives?



If the disks are SATA (the most normal thing; they are sda, sdb, etc. you can do that two ways:

  • After the boot, you can disable them. The "magic" is (as root)

echo 1 > /sys/block/sdx/device/delete

where sdx is your disk. This will make the device disappear. Notice however that if something triggers an update of udev the disks may reappear.
Note also that the 
sdx denomination is not completely fixed; it can change especially if you add/delete disks to the system.

  • At boot level, if you have a kernel with version 3.13 or newer. You need to identify the ATA address, which is a number like 4.00 
     you can use 

dmesg | grep ata
ata4.00: ATA-8: ST2000DM001-1CH164, CC24, max UDMA/133

and you can completely hide the disk with the boot parameter:

libata.force=4.00:disable

the disk will act as if it was not connected at all to the system.

  • Another option is using udev rules as explained (I did not test) here. The difference, in this case, is that the disk devices are still there, but the disks are not mounted. In 99% of the case, the result is the same, unless you are playing tricks with directly writing to the raw disk devices...

I do not own the copyright on this.

Tuesday, March 15, 2016

Onenote refuse to synch


using onenote behind a proxy, with multiple microsoft account:

I found a solution: telling winhttp to use ie proxy .... yes !

.... no..... i have a doubt... i had to check and come back edit this tiles

starting netsh and running following command:

netsh winhttp import proxy source =ie

One Note Started synching !


Hope this helps.

Thursday, August 6, 2015

My TIPS for p2p blocklist.

My TIPS for p2p blocklist.

So the legacy one:

I-Blocklist :

List name: level1
Author: Bluetack
Author's website: bluetack.co.uk
Author's description: 
Companies or organizations who are clearly involved with trying to stop filesharing.
Companies which anti-p2p activity has been seen from.
Companies that produce or have a strong financial interest in copyrighted material.
Government ranges or companies that have a strong financial interest in doing work for governments.
Legal industry ranges.
IPs or ranges of ISPs from which anti-p2p activity has been observed.

A Tuned / Customized :

Ultimate-Blocklist:

List name: Ultimate-Blocklist
Author: walshie4
Author's website: walshie4/Ultimate-Blocklist
Author's description: 
A super blocklist made from the most popular ones on the web!