Skip to content

Instantly share code, notes, and snippets.

@AshleyPinner
Created September 5, 2018 10:24
Show Gist options
  • Save AshleyPinner/4ef171888a15c645a789b4c2ee43bb30 to your computer and use it in GitHub Desktop.
Save AshleyPinner/4ef171888a15c645a789b4c2ee43bb30 to your computer and use it in GitHub Desktop.
sdb & sdb1
# fdisk -lu /dev/sdb
Disk /dev/sdb: 107.4 GB, 107374182400 bytes, 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 63 157276349 78638143+ 8e Linux LVM
# tune2fs -l /dev/sdb1
tune2fs 1.42.9 (28-Dec-2013)
Filesystem volume name: <none>
Last mounted on: /mnt/mysql
Filesystem UUID: 89267d4d-3099-418e-a162-a9e573e5f875
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super large_file
Filesystem flags: signed_directory_hash
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 9830400
Block count: 19659535
Reserved block count: 982976
Free blocks: 10861667
Free inodes: 9829615
First block: 0
Block size: 4096
Fragment size: 4096
Reserved GDT blocks: 1019
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 16384
Inode blocks per group: 512
Filesystem created: Tue Mar 24 12:19:31 2015
Last mount time: Wed Sep 5 10:56:58 2018
Last write time: Wed Sep 5 10:56:58 2018
Mount count: 1
Maximum mount count: 31
Last checked: Wed Sep 5 10:40:36 2018
Check interval: 15552000 (6 months)
Next check after: Mon Mar 4 09:40:36 2019
Lifetime writes: 2969 GB
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 128
Journal inode: 8
Default directory hash: tea
Directory Hash Seed: 660d534d-1809-4e6c-a397-c6df95c6d5c0
Journal backup: inode blocks
@AshleyPinner
Copy link
Author

AshleyPinner commented Sep 5, 2018

# fdisk -c=dos /dev/sdb

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (with command 'c').Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p

Disk /dev/sdb: 107.4 GB, 107374182400 bytes, 209715200 sectors
255 heads, 63 sectors/track, 13054 cylinders
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63   157276349    78638143+  8e  Linux LVM

Command (m for help): d
Selected partition 1
Partition 1 is deleted

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (63-209715199, default 63): 63
Last sector, +sectors or +size{K,M,G} (63-209715199, default 209715199):
Using default value 209715199
Partition 1 of type Linux and of size 100 GiB is set

Command (m for help): p

Disk /dev/sdb: 107.4 GB, 107374182400 bytes, 209715200 sectors
255 heads, 63 sectors/track, 13054 cylinders
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63   209715199   104857568+  83  Linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment