[[Email protected]/]# fdisk-l
disk/dev/sda:322.1 GB, 322122547200 bytes
255 heads, Sectors/track, 39162 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk Identifier:0x00097ff5
Device Boot Start End Blocks Id System
/DEV/SDA1 * 1 204800 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 28072 225280000 Linux
/dev/sda3 28072 32152 32768000, Linux Swap/solaris
/DEV/SDA4 32152 39163 56318976 5 Extended
/dev/sda5 32152 33427 10240000-up Linux
/dev/sda6 33427 34702 10240000-up Linux
/DEV/SDA7 34702 35976 10240000-up Linux
/dev/sda8 35977 39163 25594880-up Linux
Disk
/dev/sdb:32.2 GB, 32212254720 bytes----------not mounted
Heads, Sectors/track, 30720 cylinders
Units = Cylinders of 2048 * 1048576 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000
[[Email protected]:weihu]# fdisk/dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF Disklabel
Building a new DOS disklabel with disk identifier 0X810D5E15.
Changes'll remain in memory only, until the decide to write them.
After that, of course, the previous content won ' t is recoverable.
Warning:invalid flag 0x0000 of partition Table 4 would be a corrected by W (rite)
Warning:dos-compatible mode is deprecated. It ' s strongly recommended to
Switch off the mode (command ' C ') and change display units to
Sectors (Command ' u ').
Command (M for help):
m
Command Action
A toggle a bootable flag
b Edit BSD Disklabel
C Toggle the DOS compatibility flag
D Delete a partition
L list known partition types
M Print this menu
n Add a new partition
o Create a new empty DOS partition table
P Print the partition table
Q Quit without saving changes
s create a new empty Sun Disklabel
t change a partition ' s system ID
U Change display/entry units
V Verify the partition table
W Write table to disk and exit
X Extra functionality (experts only)
Command (M for help):
N
Command Action
E Extended
P primary partition (1-4)
1
Invalid partition number for type ' 1 '
Command Action
E Extended
P primary partition (1-4)
P
Partition number (1-4):
1
First cylinder (1-30720, default 1):
Using Default value 1
Last cylinder, +cylinders or +size{k,m,g} (1-30720, default 30720):
Using Default Value 30720
Command (M for help):
P
disk/dev/sdb:32.2 GB, 32212254720 bytes
Heads, Sectors/track, 30720 cylinders
Units = Cylinders of 2048 * 1048576 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk IDENTIFIER:0X810D5E15
Device Boot Start End Blocks Id System
/DEV/SDB11 30720 31457264 Linux---EXT4 partition with ID 83
Command (M for help): W
The partition table has been altered!
Calling IOCTL () to re-read partition table.
Syncing disks.
[[Email protected]:weihu]#
Partprobe/dev/sdb
[[Email protected]:weihu]#
mkfs-v-T ext4-c/dev/sdb1
MKFS (Util-linux-ng 2.17.2)
Mkfs.ext4-c/DEV/SDB1
MKE2FS 1.41.12 (17-may-2010)
à upholding Huan Fei tares æ identify =
Neptunium brand Workspace Fei tares: Linux
鍧 楀 ぇ hao 4096 (log=2)
Arrival Ricoh 潡 澶 Heaven size =4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1966080 inodes, 7864316 blocks
393215 blocks (5.00%) reserved for the Super user
Quilted Dress Juan 暟 is 潡 =0
Maximum filesystem blocks=4294967296
Block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000
Checking for Bad blocks (read-only test): Yue 屾 Yao
Shu e saving kernel down mitsu inode fully yue 屾 Yao
Creating Journal (32768 blocks): Yue 屾 Yao
Writing Superblocks and filesystem accounting information: Yue 屾 Yao
This filesystem would be automatically checked every mounts or
Whichever comes first. Use Tune2fs-c or-i to override.
[[Email protected]:weihu]#
MKDIR/MNT/SDB1
[[Email protected]:weihu]#
MOUNT/DEV/SDB1/MNT/SDB1
[[Email protected]:weihu]# df-th
Filesystem Type Size used Avail use% mounted on
/dev/sda5 ext4 9.5G 5.7G 3.4G 64%/
Tmpfs tmpfs 16G 72K 16G 1%/DEV/SHM
/DEV/SDA1 ext4 190M 34M 146M 19%/boot
/dev/sda8 ext4 24G 44M 23G 1%/data
/dev/sda2 ext4 212G 4.0G 197G 2%/Home
/dev/sda6 ext4 9.5G 576M 8.5G 7%/opt
/dev/sda7 ext4 9.5G 227M 8.8G 3%/var
/DEV/SDB1 ext4 30G 44M 28G 1%/mnt/sdb1
[[Email protected]:weihu]# more/etc/fstab
#
#/etc/fstab
# Created by Anaconda on Fri 8 17:04:47 2015
#
# Accessible filesystems, by reference, is maintained under '/dev/disk '
# See mans Pages Fstab (5), Findfs (8), mount (8) and/or Blkid (8) for more info
#
UUID=4FC3C61C-35D0-420B-B6D7-F64E5024E564/EXT4 Defaults 1 1
Uuid=978a98e0-7c14-4dd4-94cb-8c4c98652b00/boot EXT4 Defaults 1 2
Uuid=11f6d932-e0c2-4484-bd2e-ab001c736581/data EXT4 Defaults 1 2
Uuid=77a86bb0-335e-49b4-9be7-5fcb568b04b2/home EXT4 Defaults 1 2
Uuid=b5a201c2-8b44-4194-96fa-adebe93c9a9f/opt EXT4 Defaults 1 2
Uuid=f4734300-3968-4560-8f1d-9f9b4ef51ea7/var EXT4 Defaults 1 2
UUID=79805C84-9A35-47FD-B439-6300CF1A48C6 swap swap defaults 0 0
TMPFS/DEV/SHM TMPFS Defaults 0 0
Devpts/dev/pts devpts gid=5,mode=620 0 0
Sysfs/sys Sysfs Defaults 0 0
PROC/PROC proc Defaults 0 0
[[Email protected]:weihu]# DF-LH
Filesystem Size used Avail use% mounted on
/dev/sda5 9.5G 5.7G 3.4G 64%/
Tmpfs 16G 72K 16G 1%/DEV/SHM
/DEV/SDA1 190M 34M 146M 19%/boot
/dev/sda8 24G 44M 23G 1%/data
/dev/sda2 212G 4.0G 197G 2%/Home
/dev/sda6 9.5G 576M 8.5G 7%/opt
/dev/sda7 9.5G 227M 8.8G 3%/var
/DEV/SDB1 30G 44M 28G 1%/mnt/sdb1
[[Email protected]:weihu]#
[[Email protected]:weihu]# umount/dev/sdb1----Uninstall
[[Email protected]:weihu]#
[[Email protected]:weihu]#
[[Email protected]:weihu]#
[[Email protected]:weihu]# DF-LH
Filesystem Size used Avail use% mounted on
/dev/sda5 9.5G 5.7G 3.4G 64%/
Tmpfs 16G 72K 16G 1%/DEV/SHM
/DEV/SDA1 190M 34M 146M 19%/boot
/dev/sda8 24G 44M 23G 1%/data
/dev/sda2 212G 4.0G 197G 2%/Home
/dev/sda6 9.5G 576M 8.5G 7%/opt
/dev/sda7 9.5G 227M 8.8G 3%/var
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
RedHat Linux disk partitioning, formatting, mounting, uninstalling