Просьба оставить комментарий





Если вам понравился или не понравился топик. Я что то забыл или не дописал, то вы можете оставить свой комментарий и я постараюсь исправить это в ближайшее время.

четверг, 19 августа 2021 г.

Решение проблемы emulator: ERROR: Running multiple emulators with the same AVD is an experimental feature.

Решение проблемы emulator: ERROR: Running multiple emulators with the same AVD is an experimental feature.

You would find the following 3files in /.andoroid/avd/(Your Device).avd of user root directory. Then, delete them.

cache.img
hardware-qemu.ini.lock
multiinstance.lock

 

воскресенье, 15 августа 2021 г.

Решение проблемы Error: EISDIR: illegal operation on a directory, read

 Решение проблемы Error: EISDIR: illegal operation on a directory, read

 Запустить команду

npm config list

проверить есть ли пункт

userconfig = "/home/<USER>/.npmrc"

Удалить его

npm config delete userconfig

среда, 11 августа 2021 г.

Пересобрать массив если один диск в статусе faulty

1. Mark the disk as failed


# mdadm --manage /dev/md0 --fail /dev/sdb1


To verify that the disk is failed, check /proc/mdstat:

# cat /proc/mdstat


Personalities : [linear] [multipath] [raid0] [raid1] [raid5] [raid4] [raid6] [raid10]
md0 : active raid1 sda1[0] sdb1[2](F)
      976773168 blocks [2/1] [U_]

md1 : active raid1 sda2[0] sdb2[1]
      976773168 blocks [2/2] [UU]
Failed disk will be marked as “(F)”.


 
2. Remove the disk by mdadm


# mdadm --manage /dev/md0 --remove /dev/sdb1


3. Replace the disk
Replace the faulty disk with new one.

4. Copy the partition table to the new disk
Copy the partition table to the new disk (Caution: This sfdisk command will replace the entire partition table on the target disk with that of the source disk – use an alternative command if you need to preserve other partition information):

# sfdisk -d /dev/sda | sfdisk /dev/sdb


5. Create mirror
Create the mirror of the disk:

# mdadm --manage /dev/md0 --add /dev/sdb1


6. Verify
To test the setup, enter the below command:

# /sbin/mdadm --detail /dev/md0


The following command will show the current progress of the recovery of the mirror disk:

# cat /proc/mdstat

воскресенье, 23 мая 2021 г.

Если закончилось место в линукс

 Вывод с сортировкой, что больше всего занимает

find / -mount -type f -ls 2> /dev/null | sort -rnk7 | head -10 | awk '{printf "%10d MB\t%s\n",($7/1024)/1024,$NF}'

понедельник, 19 апреля 2021 г.

вторник, 16 марта 2021 г.

Run fsck on a disk image or raw file

Вы можете запустить fsck на образе диска. При необходимости вы также можете использовать другой атрибут fsck, как показано ниже:

fsck.ext4 -fyC /somefile.raw

Не забудьте использовать двоичный файл fsck определенного раздела, здесь мы использовали двоичный файл ext4 для файловой системы ext4, загруженной в файл образа. Запуск программы badblock для файла изображения может быть плохим. Вы можете использовать -c (маленький c) для запуска проверки плохого блока с помощью fsck:

fsck.ext4 -C -fyc /somefile.raw

вторник, 9 марта 2021 г.

Сделать алиас в убунту

  ~/.bashrc

  Проверить есть ли файл ~/.bash_aliases

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi
В 20ой убунте эта проверка есть
Добавляем сам алиас в файл  ~/.bash_aliases
nano ~/.bash_aliases
alias cls='clear'
Применяем изменения
source ~/.bashrc
Проверяем при вводе комманды cls произойдет трансформация в комманду clear   

понедельник, 8 марта 2021 г.

Уменьшение размера lxc контейнера

 

proxmox: shrink lxc container
Proxmox 4.2
Container: 101
Storage: iSCSI with group "iscsi-lvm-group"
Current size: 20G
Needed size: 10G

    BACKUP FIRST!
    Stop VM
    lcx-stop -n 101
    Check disk
    e2fsck -f  /dev/iscsi-lvm-group/vm-101-disk-1
    (use tune2fs if "MMP check failed" error, and e2fsck again)
    Do your disk little smaller that you want
    resize2fs /dev/iscsi-lvm-group/vm-101-disk-1 9G
    Reduce LVM size to what you want
    lvreduce -L 10G /dev/iscsi-lvm-group/vm-101-disk-1
    Resize your disk without size parameter
    resize2fs /dev/iscsi-lvm-group/vm-101-disk-1
    Check disk
    e2fsck -f  /dev/iscsi-lvm-group/vm-101-disk-1
    (use tune2fs if "MMP check failed" error, and e2fsck again)
    Edit disk size in container config
    vi /etc/pve/lxc/101.conf
    Run the container