Add and Mount logical partitions in linux (manual and automatic)
Source: Internet
Author: User
1. view the new disk [root @ brief top61desktop] fdisk-culdevsdcDiskde I. view the new disk
[Root @ mongotop61 Desktop] # fdisk-cul/dev/sdc
Disk/dev/sdc: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders, total 41943040 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 identifier: 0x00000000
2. add logical partitions
[Root @ mongotop61 Desktop] # fdisk-cu/dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x740491c5.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w (rite)
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)
E ---------------> select extended partition
Partition number (1-4): 2
First sector (2048-41943039, default 2048 ):
Using default value 2048
Last sector, + sectors or + size {K, M, G} (2048-41943039, default 41943039): 10G
Value out of range.
Last sector, + sectors or + size {K, M, G} (2048-41943039, default 41943039): + 10G
Command (m for help): N
Command action
L logical (5 or over)
P primary partition (1-4)
L -----------------> select logical partition
First sector (4096-20973567, default 4096 ):
Using default value 4096
Last sector, + sectors or + size {K, M, G} (4096-20973567, default 20973567): + 5G
Command (m for help): N
Command action
L logical (5 or over)
P primary partition (1-4)
L -------------------> select logical partition
First sector (10491904-20973567, default 10491904 ):
Using default value 10491904
Last sector, + sectors or + size {K, M, G} (10491904-20973567, default 20973567): + 5G
Value out of range.
Last sector, + sectors or + size {K, M, G} (10491904-20973567, default 20973567 ):
Using default value 20973567
Command (m for help): P ---------------> print the partition list
Disk/dev/sdc: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders, total 41943040 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 identifier: 0x740491c5
Device Boot Start End Blocks Id System
/Dev/sdc2 2048 20973567 10485760 5 Extended
/Dev/sdc5 4096 10489855 5242880 83 Linux
/Dev/sdc6 10491904 20973566 5240831 + 83 Linux
Automatically named Logical Partition: sdc5 sdc6
Command (m for help): w ------------------> save and exit
The partition table has been altered!
This filesystem will be automatically checked every 38 mounts or
180 days, whichever comes first. Use tune2fs-c or-I to override.
2sdc6
[Root @ shorttop61 Desktop] # mkfs. ext4/dev/sdc6
Mke2fs 1.41.12 (17-May-2010)
Filesystem label =
OS type: Linux
Block size = 4096 (log = 2)
Fragment size = 4096 (log = 2)
Stride = 0 blocks, Stripe width = 0 blocks
327680 inodes, 1310207 blocks
65510 blocks (5.00%) reserved for the super user
First data block = 0
Maximum filesystem blocks = 1342177280
40 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768,983 04, 163840,229 376, 294912,819 200, 884736
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.