[Email protected] desktop]# mkfs.ext3/dev/sdcmke2fs 1.41.12 (17-may-2010)/DEV/SDC is entire device, not just one partiti on! Proceed anyway? (y,n) Yfilesystem label=os type:linuxblock size=4096 (log=2) Fragment size=4096 (log=2) stride=0 blocks, Stripe width=0 blo cks61054976 inodes, 244190646 blocks12209532 blocks (5.00%) reserved for the Super Userfirst data block=0maximum Filesyste M blocks=42949672967453 block groups32768 blocks per group, 32768 fragments per group8192 inodes per groupsuperblock backu PS stored on blocks:32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 2 0480000, 23887872, 71663616, 78675968, 102400000, 214990848Writing inode tables:done Creating Journal (32768 blocks) : donewriting superblocks and filesystem accounting information: #这里要卡一会 because the disk is 1T
Writing superblocks and filesystem accounting information:donethis filesystem would be automatically checked every Moun TS or180 days, whichever comes first. Use Tune2fs-c or-i to override.
Partition the disk below:
[[email protected] desktop]# fdisk/dev/sdcdevice contains neither a valid DOS partition table, nor Sun, SGI or OSF D Isklabelbuilding a new DOS disklabel with disk identifier 0xd907b092. 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 (Comman d ' u '). Command (M for help): Mcommand action A toggle a bootable flag B edit BSD Disklabel c toggle the DOS Compatibi Lity 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 NE W 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 functional Ity (experts only) Command (M-help):
Command (M for help): Ncommand action E Extended P primary partition (1-4) ppartition number (1-4): 1First cylinder (1-121601, default 1): Using default value 1Last cylinder, +cylinders or +size{k,m,g} (1-121601, default 121601): 30400Co Mmand (M for help): Ncommand action E Extended P primary partition (1-4) ppartition number (1-4): 2First Cylinder ( 30401-121601, default 30401): Using default value 30401Last cylinder, +cylinders or +size{k,m,g} (30401-121601, default 12 1601): 60800Command (M for help): N Command action E extended P primary partition (1-4) p partition number (1-4): 3 First cylinder (60801-121601, default 60801): Using default value 60801Last cylinder, +cylinders or +size{k,m,g} (60801-12 1601, default 121601): 91200Command (M for help): Ncommand action E Extended P primary partition (1-4) eselected PA Rtition 4First Cylinder (91201-121601, default 91201): Using default value 91201Last cylinder, +cylinders or +size{k,m,g} (91201-121601, default 121601): Using default value 121601Command (M for help): Wthe partition table have been altered! Calling IOCTL () to re-read partition table. Syncing disks.
disk/dev/sdc:1000.2 GB, 1000204886016 bytes255 heads, sectors/track, 121601 cylindersunits = cylinders of 16065 * 512 = 8225280 bytessector Size (logical/physical): bytes/512 bytesi/o size (minimum/optimal): bytes/512 bytesDisk IDENTIFIER:0X447D7CDE Device Boot Start End Blocks Id system/dev/sdc1 1 30400 244187968+ linux/dev/sdc2 30401 60800 244188000 60801 91200 244188000 linux/dev/sdc4 91201 121601 244196032+ 5 Extended
[[email protected] desktop]# fdisk/dev/sdcwarning:dos-compatible mode is deprecated. It ' s strongly recommended to switch off the mode (command ' C ') and change display units to sectors (Comman d ' u '). Command (M for help): Mcommand action A toggle a bootable flag B edit BSD Disklabel c toggle the DOS Compatibi Lity 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 NE W Empty Sun Disklabel t change a partition ' s system ID u change display/entry units v Verify the Partition tab Le W write table to disk and exit X extra functionality (experts only) Command (M-help): Nfirst Cylinder (91201 -121601, default 91201): Using default value 91201Last cylinder, +cylinders or +size{k,m,g} (91201-121601, default 121601) : Using Default Value 121601Command (M for help): Wthe partition table has been altered! Calling IOCTL () to re-read partition table. Syncing disks. [[email protected] desktop]# fdisk-ldisk/dev/sda:500.1 GB, 500107862016 bytes255 heads, sectors/track, 60801 CY Lindersunits = Cylinders of 16065 * 8225280 bytessector size (logical/physical): bytes/4096 bytesi/o size (min Imum/optimal): 4096 bytes/4096 bytesdisk identifier:0x000dcf9e Device Boot Start End Blocks Id S YSTEM/DEV/SDA1 * 1 512000 linuxpartition 1 does not end on cylinder BOUNDARY./DEV/SDA2 60802 487873536 8e Linux lvmdisk/dev/sdc:1000.2 GB, 1000204886016 bytes255 heads, sectors/ Track, 121601 cylindersunits = cylinders of 16065 * MB = 8225280 bytessector size (logical/physical): bytes/512 byt ESI/O size (minimum/optimal): bytes/512 bytesdisk identifier:0x447d7cde Device Boot Start End B Locks Id SYSTEM/DEV/SDC1 1 30400 244187968+ linux/dev/sdc2 30401 60800 244188000 60801 91200 244188000 linux/dev/sdc4 91201 121601 244196032+ 5 extended/dev/sdc5 91201 121601 244196001 linuxdisk/dev/mapper/vg_ok-lv_root:53.7 GB, 53687091200 bytes255 heads, Sectors/track, 6 527 cylindersunits = cylinders of 16065 * MB = 8225280 bytessector size (logical/physical): bytes/4096 BytesI/O siz E (minimum/optimal): 4096 bytes/4096 bytesdisk identifier:0x00000000disk/dev/mapper/vg_ok-lv_swap:3841 MB, 3841982464 bytes255 heads, sectors/track, 467 cylindersunits = cylinders of 16065 * = 8225280 bytessector size (logical/physi CAL): bytes/4096 bytesi/o size (minimum/optimal): 4096 bytes/4096 Bytesdisk identifier:0x00000000
To format:
[Email protected] desktop]# MKFS.EXT4/DEV/SDC1 mke2fs 1.41.12 (17-may-2010) warning:208 blocks unused. Filesystem label=os type:linuxblock size=4096 (log=2) Fragment size=4096 (log=2) stride=0 blocks, Stripe width=0 blocks152 91504 inodes, 61046784 blocks3052349 blocks (5.00%) reserved for the Super Userfirst data block=0maximum filesystem blocks =42949672961863 block groups32768 blocks per group, 32768 fragments per group8208 inodes per groupsuperblock backups Store D on blocks:32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872Writing inode tables:done Creating Journal (32768 blocks): donewriting superblocks and filesystem accounting Information:donethis filesystem would be automatically checked every-mounts or180 days, whichever comes first. Use Tune2fs-c or-i to override.
Similarly:
MKFS.EXT4/DEV/SDC2 MKFS.EXT4/DEV/SDC3 mkfs.ext4/dev/sdc5[[email protected] Desktop]# fdisk-ldisk/dev/sda:500. 1 GB, 500107862016 bytes255 heads, sectors/track, 60801 cylindersunits = cylinders of 16065 * 8225280 Bytessector Size (logical/physical): bytes/4096 bytesi/o size (minimum/optimal): 4096 bytes/4096 Bytesdisk identifier:0x000d cf9e Device Boot Start End Blocks Id system/dev/sda1 * 1 64 512000 83 Linuxpartition 1 does not end on cylinder boundary./dev/sda2 60802 487873536 8e Linux lvmdisk/ dev/sdc:1000.2 GB, 1000204886016 bytes255 heads, sectors/track, 121601 cylindersunits = cylinders of 16065 * 512 = 822 5280 bytessector Size (logical/physical): bytes/512 bytesi/o size (minimum/optimal): + bytes/512 Bytesdisk ident IFIER:0X447D7CDE Device Boot Start End Blocks Id system/dev/sdc1 1 30400 244 187968+ LINUX/DEV/SD30401 60800 244188000 C2 linux/dev/sdc3 60801 91200 244188000 C4 91201 121601 244196032+ 5 extended/dev/sdc5 91201 121601 244196001 /dev/mapper/vg_ok-lv_root:53.7 GB, 53687091200 bytes255 heads, $ sectors/track, 6527 cylindersunits = cylinders of 1606 5 * 8225280 bytessector size (logical/physical): bytes/4096 bytesi/o size (minimum/optimal): 4096 bytes/4096 Bytesdisk identifier:0x00000000disk/dev/mapper/vg_ok-lv_swap:3841 MB, 3841982464 bytes255 heads, sectors/track, 467 Cylindersunits = Cylinders of 16065 * 8225280 bytessector size (logical/physical): bytes/4096 bytesi/o Size ( Minimum/optimal): 4096 bytes/4096 bytesdisk identifier:0x00000000disk/dev/mapper/vg_ok-lv_home:442.1 GB, 44205028147 2 bytes255 heads, Sectors/track, 53742 cylindersunits = cylinders of 16065 * = 8225280 bytessector size (logical/ph ysical): bytes/4096 BYTESI/O size (minimum/optimal): 4096 bytes/4096 Bytesdisk identifier:0x00000000
[[email protected] desktop]# cd/mnt/[[email protected] mnt]# ls[[email protected] mnt]# mkdir Dir{1,2,3,5}[[email Protect Ed] mnt]# lsdir1 dir2 dir3 dir5[[email protected] mnt]# Mount/dev/sdc1/mnt/dir1[[email protected] mnt]# Mount/dev/sdc2/mnt/dir2[[email protected] mnt]# mount/dev/sdc3/mnt/dir3[[email protected] mnt]# mount/dev/sdc5/mnt/d Ir5
[Email protected] mnt]# df-hfilesystem Size used Avail use% mounted on/dev/mapper/vg_ok-lv_root 50G 11G 37G 22%/tmpfs 1.8G 328K 1.8G 1%/dev/shm/dev/sda1 477M 85M 368M 19%/boot/dev/mapper/vg_ok-lv_home 406G 110G 275G 29%/home/dev/sdc1 230G 60M 218G 1%/mnt/dir1/dev/sdc2 230G 60M 218G 1%/mnt/dir2/dev/sdc3 230G 60M 218G 1%/mnt/dir3/dev/sdc5 230G 60M 218G 1%/MNT/DIR5
USB format ext3 EXT4