Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- ##-========================================================================-##
- ## [+] Create A Ext4 Filesystem, specifying a block size of 4096-byte blocks:
- ##-========================================================================-##
- mkfs.ext4 -b 4096 -O metadata_csum /dev/sde1
- ##-========================================================================-##
- ## [+] Create a journal of size 512MB:
- ##-========================================================================-##
- tune2fs -j -J size=512 /dev/sda1
- ##-========================================================================-##
- ## [+] Create a journal file on a different device
- ## (here, /dev/hdb2) with this:
- ##-========================================================================-##
- mke2fs -O journal_dev /dev/sdb2
- ##-========================================================================-##
- ## [+]
- ##-========================================================================-##
- tune2fs -O ^has_journal /dev/sde1
- ##-========================================================================-##
- ## [+] Create a journal for an ext2 filesystem is as follows:
- ##-========================================================================-##
- tune2fs -j /dev/sda1
- tune2fs -c 0 /dev/sda1
- ##-========================================================================-##
- ## [+] et the number of mounts between checks to 0
- ##-========================================================================-##
- ##-========================================================================-##
- ## [+] Create a journal of size 512MB:
- ##-========================================================================-##
- tune2fs -j -J size=512 /dev/sda1
- ##-========================================================================-##
- ## [+] Create a journal file on a different device
- ## (here, /dev/hdb2) with this:
- ##-========================================================================-##
- mke2fs -O journal_dev /dev/sdb2
- ##-========================================================================-##
- ## [+] Ise this external journal file:
- ##-========================================================================-##
- tune2fs -j -J device=/dev/sdb2 /dev/sda1
- ##-========================================================================-##
- ## [+] Mount a partition read-only
- ##-========================================================================-##
- mount -t ext3 -o ro /dev/sdb1 /mnt/tmp
- ##-========================================================================-##
- ## [+] Remount /dev/sdb1 as read/write,
- ##-========================================================================-##
- mount -t ext3 -o remount,rw /dev/sdb1
- ##-====================================================================-##
- ## [+] Clone a partition from physical disk /dev/sda, partition 1,
- ## to physical disk /dev/sdb, partition 1 with e2image, run
- ##-========================================================================-##
- e2image -ra -p /dev/sda1 /dev/sdb1
- ##-========================================================================-##
- ## [+] Count ext4 events for the entire system, for 10 seconds:
- ##-========================================================================-##
- perf stat -e 'ext4:*' -a sleep 10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement