2 TB disk formatting in Linux

Source: Internet
Author: User

2 TB disk formatting in Linux

View System Information
[Root @ localhost ~] # Cat/etc/RedHat-release
Red Hat Enterprise Linux Server release 5.5 (Tikanga)
[Root @ localhost ~] # Uname-r
2.6.18-194. el5
[Root @ localhost ~] # Uname-
Linux localhost. localdomain 2.6.18-194. el5 #1 SMP Tue Mar 16 21:52:43 EDT 2010 i686 i686 i386 GNU/Linux
[Root @ localhost log] # uname-r
2.6.18-194. el5 // the minimum value is 2.6.18.24.
View disk Information
[Root @ localhost ~] # Fdisk-l
Disk/dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Device Boot Start End Blocks Id System
/Dev/sda1*1 65 522081 83 Linux
/Dev/sda2 66 196 1052257 + 82 Linux swap/Solaris
/Dev/sda3 197 2610 19390455 83 Linux
Disk/dev/sdb: 2190.4 GB, 2190433320960 bytes // It is about 2 TB
255 heads, 63 sectors/track, 266305 cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Disk/dev/sdb doesn' t contain a valid partition table
[Root @ localhost ~] # Rpm-qf/sbin/parted // installation Toolkit
Parted-1.8.1-27.el5
[Root @ localhost ~] # Parted/dev/sdb // start operations on large-capacity Disks
[Root @ localhost ~] # Parted/dev/sdb
GNU Parted 1.8.1
Use/dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(Parted) print free // the information cannot be printed for the first time, because no
Error: Unable to open/dev/sdb-unrecognized disk tag.
(Parted) help // display help information
Check NUMBER do a simple check on the file system
Cp [FROM-DEVICE] FROM-number to-NUMBER copy file system to another partition
Help [COMMAND] prints general help, or help on COMMAND
Mklabel, mktable LABEL-TYPE create a new disklabel (partition table)
Mkfs NUMBER FS-TYPE make a FS-TYPE file system on partititon NUMBER
Mkpart PART-TYPE [FS-TYPE] start end make a partition
Mkpartfs PART-TYPE FS-TYPE start end make a partition with a file system
Move number start end move partition NUMBER
Name number name partition NUMBER as name
Print [free | NUMBER | all] display the partition table, a partition, or all devices
Quit exit program
Rescue start end rescue a lost partition near START and END
Resize number start end resize partition NUMBER and its file system
Rm NUMBER delete partition NUMBER
Select DEVICE choose the device to edit
Set number flag state change the FLAG on partition NUMBER
Toggle [NUMBER [FLAG] toggle the state of FLAG on partition NUMBER
Unit UNIT set the default unit to UNIT
Version displays the current version of GNU Parted and copyright information
(Parted) mklabel // change the partition table format
New disk tag type? Gpt // set to the partition format of gpt
(Parted) mkpart
Partition name? []? /Dev/sdb1 // enter the partition name
File System type? [Ext2]? Ext3 // enter the formatting type
Start Point? 0 // 0 indicates that it starts from the first track
End Point? -1 //-1 indicates the last track
(Parted) print free
Model: VMware, VMware Virtual S (scsi)
Disk/dev/sdb: 2190 GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt // change to gpt format
Number Start End Size File system Name flag
1 17.4kB 2190 GB 2190 GB/dev/sdb1
(Parted) quit // exit
2.6.24
[Root @ localhost ~] # Mkfs. ext3-B 8192/dev/sdb1
[Root @ localhost ~] # Mkfs. ext3-F/dev 'sdb1
[Root @ localhost ~] # Mount-t ext3/dev/sdb1/01
-F indicates force.
-B 8192 (8 M) is the size of the specified block. 8 M can only support 16 TB of space. If it is still relatively large, it is enough to specify multiple fixed points.
Formatting takes a long time
[Root @ localhost log] # mount-t ext3/dev/sdb1/01
Mount: wrong fs type, bad option, bad superblock on/dev/sdb1,
Missing codepage or other error
In some cases useful info is found in syslog-try
Dmesg | tail or so
[Root @ localhost log] # mkfs. ext3-F/dev/sdb1 // Add the-F parameter to solve this problem.
Mke2fs 1.39 (29-may-2006)
Filesystem label =
OS type: Linux
Block size = 4096 (log = 2)
Fragment size = 4096 (log = 2)
267386880 inodes, 534773751 blocks
26738687 blocks (5.00%) reserved for the super user
First data block = 0
Maximum filesystem blocks = 0
16320 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768,983 04, 163840,229 376, 294912,819 200, 884736,160 5632, 2654208,
4096000,796 2624, 11239424,204 80000, 23887872,716 63616, 78675968,
102400000,214 990848, 512000000
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 30 mounts or
180 days, whichever comes first. Use tune2fs-c or-I to override.
[Root @ localhost log] #


[Root @ localhost log] # mount-t ext3/dev/sdb1/01


[Root @ localhost log] # df-h
File System capacity used available % mount point
/Dev/sda3 18G 3.8G 14G 23%/
/Dev/sda1 494 M 17 M 453 M 4%/boot
Tmpfs 506 M 0 506 M 0%/dev/shm
/Dev/sdb1 2.0 T 199 M 1.9 T 1%/01


You can.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.