Category Archives: Linux

May '22 05

Build loopback raid md

Create Loop devices Create the Array Add 3rd Disk as Spare Convert Raid1 to Raid5 (reshape). Grow Filesystem to suit. Notice the Array and Used size changes after conversion. Cleanup Loopback interfaces / md devices

May '22 05

Linux Grub rescue mode

Error happens when /boot/grub/i386-pc/ is empty grub rescue> ls grub rescue> set root=(md/0) grub rescue> set prefix=(md/0)/usr/lib/grub grub rescue> insmod normal grub rescue> normal grub> set root=(md/0) grub> linux /boot/vmlinuz-4.19.0-20-amd64 root=/dev/md0 grub> initrd /boot/initrd.img-4.19.0-20-amd64 grub> boot blockdev –flushbufs /dev/* grub-install … Continue reading

Mar '22 27

Replace Failed disk on Linux

cat /proc/mdstatsudo fdisk -l /dev/sdbsudo fdisk /dev/sdasudo fdisk -l /dev/sdasudo mdadm –manage /dev/md0 –remove /dev/sda1sudo mdadm –manage /dev/md0 –add /dev/sda1sudo mdadm –detail /dev/md0cat /proc/mdstatsudo grub-install /dev/sda sudo zdbls -l /dev/disk/by-id/sudo zpool statussudo zpool offline rpool /dev/disk/by-id/ata-Hitachi_HDS5C3020ALA632_ML0220F31K832N-part2sudo zpool replace rpool /dev/disk/by-id/ata-Hitachi_HDS5C3020ALA632_ML0220F31K832N-part2 … Continue reading

Aug '14 27

Move ZFS filesystem between pools

I’m migrating my data around between my different raid groups (Mirror and RaidZ1). I Found a good post on how to do it with zfs send/receive and snapshots. Use Pipe Viewer (pv) to monitor progress Create a snapshot on source use … Continue reading

Jul '14 15

ZFS on Linux

I’ve been looking at ZFS on Linux for some time now, mainly due to silent corruption on my EXT4 file-system. One of the big benefits for me is data/meta checksums, on data corruption is fetched from parity, and a data scrub picks … Continue reading

Sep '13 09

iptraf for Monitoring Bandwidth

I’ve used iptraf for years, but never been able to get the filter to work properly to exclude the ssh sessions. I found a good post about filtering ssh on iptraf, and when used with ip traffic on all interfaces … Continue reading

May '13 13

Serial via Network Bridge

I had a requirement for a Serial Bridge, eg: serial->Network->serial, I found a nice page with some options,  socat to be good enough for what I needed. Server (Listening Side connected to end device) socat -v -d -d tcp-l:54321,reuseaddr,fork file:/dev/ttyS0,nonblock,raw,echo=0,waitlock=/tmp/ttyS0.lock Client … Continue reading

Oct '12 03

Verify Linux MD device

Yet another faulty disk with bad blocks has me wondering how to check the MD array for consistancy, found a good post about it. sudo bash -c “echo check > /sys/block/md0/md/sync_action” sudo bash -c “echo repair >/sys/block/md0/md/sync_action” cat /sys/block/md1/md/mismatch_cnt