linux disk common operations

1, view the disk information, can view the slot
the lsscsi
2, modify the configuration file disk
echo 32> / proc / SYS / VM / dirty_ratio
echo 15> / proc / SYS / VM / dirty_background_ratio
echo 4096> / SYS / Block / $ {iSCSI open up the letter} / queue / max_sectors_kb first request data block number KB maximum support layer
analog kick plate
echo. 1> / SYS / block / SDB / Device / device_kicked
. 3, close the disk Cache
hdparm -W / dev / SDB query
hdparm -W0 / dev / sdb is closed,
hdparm -W1 / dev / sdb is open
hdparm -W / dev / sd * to query all disk cache

/b_iscsi/bin/write_cache.sh enable all turns on all disk cache
/b_iscsi/bin/write_cache.sh disable All Close all disk cache

/ SYS / Module1 / libsas_hik / Parameters / use_env
0: no transparent transmission sync
. 1: sync passthrough

To boot automatically mount the file system, configuration items can be written in the / etc / fstab in

Modified cache proportion:
echo. 5> / proc / SYS / VM / dirty_ratio
echo. 1> / proc / SYS / VM / dirty_background_ratio

Published 349 original articles · won praise 6 · views 9618

Guess you like

Origin blog.csdn.net/qq_23929673/article/details/95589725