[20190301]簡單測試linux fsfreeze命令.txt
[20190301]簡單測試linux fsfreeze命令.txt
--//簡單測試學習linux的fsfreeze命令.
# man fsfreeze
FSFREEZE(8) System Administration FSFREEZE(8)
NAME
fsfreeze - suspend access to a filesystem (Linux Ext3/4, ReiserFS, JFS, XFS)
SYNOPSIS
fsfreeze -f mountpoint
fsfreeze -u mountpoint
DESCRIPTION
fsfreeze suspends and resumes access to an filesystem
fsfreeze halts new access to the filesystem and creates a stable image on disk. fsfreeze is intended to be used
with hardware RAID devices that support the creation of snapshots.
fsfreeze is unnecessary for device-mapper devices. The device-mapper (and LVM) automatically freezes filesystem
on the device when a snapshot creation is requested. For more details see the dmsetup(8) man page.
The mount-point argument is the pathname of the directory where the filesystem is mounted. The filesystem must
be mounted to be frozen (see mount(8)).
..
-f, --freeze
This option requests the specified a filesystem to be frozen from new modifications. When this is selected, all
ongoing transactions in the filesystem are allowed to complete, new write system calls are halted, other
calls which modify the filesystem are halted, and all dirty data,metadata, and log information are written to
disk. Any process attempting to write to the frozen filesystem will block waiting for the filesystem to be
unfrozen.
Note that even after freezing, the on-disk filesystem can contain information on files that are still in the process
of unlinking. These files will not be unlinked until the filesystem is unfrozen or a clean mount of the snapshot
is complete.
-u, --unfreeze
This option is used to un-freeze the filesystem and allow operations to continue. Any filesystem modifications
that were blocked by the freeze are unblocked and allowed to complete.
--//很簡單-f 凍結,-u 解凍.這樣可以在出現一些意外操作時臨時凍結檔案系統.
1.測試:
# dd if=/dev/zero of=image.10m count=1 bs=10M
1+0 records in
1+0 records out
10485760 bytes (10 MB) copied, 0.0483896 seconds, 217 MB/s
# mke4fs image.10m
mke4fs 1.41.12 (17-May-2010)
image.10m is not a block special device.
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
2560 inodes, 10240 blocks
512 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=10485760
2 block groups
8192 blocks per group, 8192 fragments per group
1280 inodes per group
Superblock backups stored on blocks:
8193
Writing inode tables: done
Creating journal (1024 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 38 mounts or
180 days, whichever comes first. Use tune4fs -c or -i to override.
# mount -o loop image.10m /mnt/backup/
# cd /mnt/backup
# echo 'this is a testcat '> test1.txt
2.測試:
--//凍結
# fsfreeze -f /mnt/backup/
# echo 'this is a testcat '>> /mnt/backup/test1.txt
--//... 掛起.不能寫入資訊
--//解凍:
# fsfreeze -u /mnt/backup/
--//檢視另外視窗:
# echo 'this is a testcat '>> test1.txt
# cat test1.txt
this is a test!!
this is a testcat
--//不知道在實際工作中是否有用.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2637261/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Linux的OOMkiller簡單測試LinuxOOM
- Linux簡單命令Linux
- [20160902]簡單探究linux的free命令.txtLinux
- Linux簡單命令(一)Linux
- mysql簡單效能測試MySql
- sql trace 簡單測試SQL
- [20190211]簡單測試埠是否開啟.txt
- Linux效能測試 pmap命令Linux
- Oracle logmnr簡單測試Oracle
- mysqlimport匯入簡單測試MySqlImport
- (一)Jmeter簡單介面測試JMeter
- Windows IO 效能簡單測試Windows
- Windows 10 TechPreview簡單測試WindowsView
- 簡單的 ping 測試
- Jmeter效能測試簡單使用JMeter
- try的簡單效能測試
- [20190211]簡單測試埠是否開啟(補充).txt
- linux簡單常用命令Linux
- Linux下history命令簡單原理Linux
- LInux簡單安裝和命令Linux
- 【PG效能測試】pgbench效能測試工具簡單使用
- 讓 API 測試變的簡單API
- Oracle RAC的TAF簡單測試Oracle
- index 包含null值得簡單測試IndexNull
- InnoSetup簡單教程一,安裝使用和簡單測試
- [20190423]簡單測試latch nowilling等待模式.txt模式
- Linux命令執行時間測試Linux
- linux下expect環境安裝以及簡單指令碼測試Linux指令碼
- 簡單說說linux關機命令Linux
- linux中的top命令簡單使用Linux
- Linux中ps命令的簡單使用Linux
- linux sed命令就是這麼簡單Linux
- linux中history命令的簡單使用Linux
- 一些“簡單”的linux命令Linux
- Linux 命令 及 簡單操作 學習Linux
- 簡單的神經網路測試神經網路
- ios最簡單的測試打包方式iOS
- MySQL Profile在5.7的簡單測試MySql