readlink /sys/block/sdd
../devices/pci0000:00/0000:00:1f.2/host3/target3:0:0/3:0:0:0/block/sdd
echo 1 > /sys/block/sdd/device/delete
[12811675.481503] scsi 3:0:0:0: Direct-Access ATA TOSHIBA DT01ACA2 MX4O PQ: 0 ANSI: 5
[12811675.481651] sd 3:0:0:0: Attached scsi generic sg3 type 0
[12811675.481663] sd 3:0:0:0: [sdd] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
[12811675.481667] sd 3:0:0:0: [sdd] 4096-byte physical blocks
[12811675.481694] sd 3:0:0:0: [sdd] Write Protect is off
[12811675.481696] sd 3:0:0:0: [sdd] Mode Sense: 00 3a 00 00
[12811675.481707] sd 3:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[12811675.481811] sdd:
[12811675.503100] sd 3:0:0:0: [sdd] Attached SCSI disk
if sdd still missing, so:
echo "- - -" > /sys/class/scsi_host/host1/scan
Monthly Archives: July 2016
modify vs change linux
There are 3 kind of “timestamps”:
Access – the last time the file was read
Modify – the last time the file was modified (content has been modified)
Change – the last time meta data of the file was changed (e.g. permissions)
linux find files edited today
find /directory_path -mtime -1 -ls
linux change ctime file
NOW=$(date) && date -s "2030-08-15 21:30:11" && touch file.txt && date -s "$NOW"
linux find files modified after day
touch -t 200901031231.43 /tmp/wotsit
find . -newer /tmp/wotsit -print
rm -f /tmp/wotsit
journal rollforward failed: journal out of sync with zone
named -g
To resolve this stop BIND, then remove the journal file for problem zone, these exist in the same directory as the zone files but end in “.jnl”. Once the file has been deleted BIND can be restarted and all will be back to normal.
If you have dynamic zones it is best to “freeze” them first before editing and “thaw” them after to avoid this problem in the first place. The commands for this are:
rndc freeze example.com
rndc thaw sxample.com
debconf: falling back to frontend: Readline
sed -i 's/^mesg n$/tty -s \&\& mesg n/g' /root/.profile
logger: command not found
apt-get --reinstall install bsdutils
ispconfig reset admin password
use dbispconfig;
UPDATE sys_user SET passwort = md5('admin') WHERE username = 'admin';
linux grep process by name and kill
ps -ef | grep installatron | grep -v grep | awk '{print $2}' | xargs kill -9
docker Failed to get D-Bus connection: Operation not permitted centos 7
sudo docker run --name test --privileged -d -ti docker.io/centos /usr/sbin/init
docker-storage-setup.service: Main process exited, code=exited, status=1/FAILURE
sudo dnf reinstall docker
OpenVZ directadmin An error has occurred Details Error with system Quotas setquota: Mountpoint (or device) / not found or has no quota enabled. setquota: Not all specified mountpoints are using quota. Debug Guide
openvz enable second level quota
vzctl stop CTID
vzctl set CTID --quotaugidlimit 100 --save
vzctl start CTID