Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Disk partition mount step

2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

To mount a disk

Partition-- > format-> mount

Fdisk-l # View the hard drive

Fdisk / dev/vdb # is / dev/vdb hard disk partition

Enter the meaning of the following letters

M # View help

P # list the partitions of the current disk

N # create a new disk partition

E extended # extended partition

P primary # primary partition

D # Delete partition

W # Save partition

Mkfs.ext4 / dev/sdb1 # formatting partitions

Mount / dev/sdb1 / mnt # to mount the disk

Df-h # View mount information

# Boot starts automatic mount

Echo "mount / dev/vdb1 / data/ > / dev/null 2 > & 1" > > / etc/rc.local

Echo "/ dev/vdb1 / data/ ext4 defaults 0" > > / etc/fstab

# stop service, stop database

# change / etc/my.cnf file to add optimization parameters

Long_query_time = 1

Datadir=/var/lib/mysql

Innodb_file_per_table=1

Innodb_buffer_pool_size = 2G

Socket=/var/lib/mysql/mysql.sock

Innodb_flush_log_at_trx_commit = 2

Log-slow-queries = / var/log/mariadb/slow.log

# pay attention to modify the data access file directory (mount directory)

# copy the file access directory of the previous database to the mount directory

Restart the database and start the service for testing.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report