ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Red Hat Linux 5.2 14T大文件系统 分区过程

Red Hat Linux 5.2 14T大文件系统 分区过程

原创 Linux操作系统 作者:lenx2000 时间:2010-05-22 15:57:00 0 删除 编辑

<<< Log from 210.42.35.61 started 五月 22, 2010, 14:49:01 >>>
[root@Backup-ctgu /]# parted /dev/sdd                                                                                 
GNU Parted 1.8.1                                                                                                      
Using /dev/sdd                                                                                                        
Welcome to GNU Parted! Type 'help' to view a list of commands.                                                        
(parted) mklabel gpt                                                                                                  
Warning: The existing disk label on /dev/sdd will be destroyed and all data on this disk will be lost. Do you want to 
continue?                                                                                                             
Yes/No? yes                                                                                                           
New disk label type?  [gpt]?                                                                                          
(parted) print                                                                                                        

Model: IBM VirtualDisk (scsi)                                                                                         
Disk /dev/sdd: 14.0TB                                                                                                 
Sector size (logical/physical): 512B/512B                                                                             
Partition Table: gpt                                                                                                  

Number  Start  End  Size  File system  Name  Flags                                                                    

(parted) mklabel gpt                                                                                                  
Warning: The existing disk label on /dev/sdd will be destroyed and all data on this disk will be lost. Do you want to 
continue?                                                                                                             
Yes/No? yes                                                                                                           
New disk label type?  [gpt]?                                                                                          
(parted) mkpart primary 0 -1                                                                                          
(parted) print                                                                                                        

Model: IBM VirtualDisk (scsi)                                                                                         
Disk /dev/sdd: 14.0TB                                                                                                 
Sector size (logical/physical): 512B/512B                                                                             
Partition Table: gpt                                                                                                  

Number  Start   End     Size    File system  Name     Flags                                                           
 1      17.4kB  14.0TB  14.0TB               primary                                                                  

(parted) quit                                                                                                         
Information: Don't forget to update /etc/fstab, if necessary.                                                         

[root@Backup-ctgu /]# partprobe                                                                                       
No Implementation: Support for adding partitions to AIX disk labels is not implemented yet.                           
No Implementation: Support for adding partitions to AIX disk labels is not implemented yet.                           
No Implementation: Support for reading AIX disk labels is is not implemented yet.                                     
                                                                                          
[root@Backup-ctgu /]# parted                                                                                          
GNU Parted 1.8.1                                                                                                      
浣跨?/dev/sda                                                                                                        
Welcome to GNU Parted! Type 'help' to view a list of commands.                                                        
(parted) select sdd                                浣?                                                               
(parted) quit                                                                                                         
淇℃?瑕蹇璁版姘 /etc/fstab?                                                                                         
瑕锛涓                                                                                                                
[root@Backup-ctgu /]# export LANG=en                                                                                  
[root@Backup-ctgu /]# parted /dev/sdd                                                                                 
GNU Parted 1.8.1                                                                                                      
Using /dev/sdd                                                                                                        
Welcome to GNU Parted! Type 'help' to view a list of commands.                                                        
(parted) help                                                                                                         
  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                         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) print                                                                                                        

Model: IBM VirtualDisk (scsi)                                                                                         
Disk /dev/sdd: 14.0TB                                                                                                 
Sector size (logical/physical): 512B/512B                                                                             
Partition Table: gpt                                                                                                  

Number  Start   End     Size    File system  Name     Flags                                                           
 1      17.4kB  14.0TB  14.0TB               primary                                                                  

(parted) mkfs                                                                                                         
Warning: The existing file system will be destroyed and all data on the partition will be lost. Do you want to        
continue?                                                                                                             
Yes/No? yes                                                                                                           
Partition number? 1                                                                                                   
File system?  [ext2]? ext3                                                                                            
No Implementation: Support for creating ext3 file systems is not implemented yet.                                     
(parted) quit                                                                                                         
Information: Don't forget to update /etc/fstab, if necessary.                                                         

[root@Backup-ctgu /]# fdisk -l                                                                                        

Disk /dev/sda: 145.9 GB, 145999527936 bytes                                                                           
255 heads, 63 sectors/track, 17750 cylinders                                                                          
Units = cylinders of 16065 * 512 = 8225280 bytes                                                                      

   Device Boot      Start         End      Blocks   Id  System                                                        
/dev/sda1   *           1          25      200781   83  Linux                                                         
/dev/sda2              26        2114    16779892+  82  Linux swap / Solaris                                          
/dev/sda3            2115       17750   125596170   83  Linux                                                         

WARNING: GPT (GUID Partition Table) detected on '/dev/sdd'! The util fdisk doesn't support GPT. Use GNU Parted.       


Disk /dev/sdd: 13995.3 GB, 13995327094784 bytes                                                                       
255 heads, 63 sectors/track, 1701501 cylinders                                                                        
Units = cylinders of 16065 * 512 = 8225280 bytes                                                                      

   Device Boot      Start         End      Blocks   Id  System                                                        
/dev/sdd1               1      267350  2147483647+  ee  EFI GPT                                                       

        There is a valid AIX label on this disk.                                                                      
        Unfortunately Linux cannot handle these                                                                       
        disks at the moment.  Nevertheless some                                                                       
        advice:                                                                                                       
        1. fdisk will destroy its contents on write.                                                                  
        2. Be sure that this disk is NOT a still vital                                                                
           part of a volume group. (Otherwise you may                                                                 
           erase the other disks as well, if unmirrored.)                                                             
        3. Before deleting this physical volume be sure                                                               
           to remove the disk logically from your AIX                                                                 
           machine.  (Otherwise you become an AIXpert).                                                               

Disk /dev/sde: 329.8 GB, 329853488128 bytes                                                                           
255 heads, 63 sectors/track, 40102 cylinders                                                                          
Units = cylinders of 16065 * 512 = 8225280 bytes                                                                      

   Device Boot      Start         End      Blocks   Id  System                                                        
[root@Backup-ctgu /]# mkfs -t ext3 -b 8192 /dev/sdd1                                                                  
Warning: blocksize 8192 not usable on most systems.                                                                   
mke2fs 1.39 (29-May-2006)                                                                                             
mkfs.ext3: 8192-byte blocks too big for system (max 4096)                                                             
Proceed anyway? (y,n) n                                                                                               
[root@Backup-ctgu /]# cat /etc/mke2fs.conf                                                                            
[defaults]                                                                                                            
        base_features = sparse_super,filetype,resize_inode,dir_index                                                  
        blocksize = 4096                                                                                              
        inode_ratio = 8192                                                                                            

[fs_types]                                                                                                            
        small = {                                                                                                     
                blocksize = 1024                                                                                      
                inode_ratio = 4096                                                                                    
        }                                                                                                             
        floppy = {                                                                                                    
                blocksize = 1024                                                                                      
        }                                                                                                             
        news = {                                                                                                      
                inode_ratio = 4096                                                                                    
        }                                                                                                             
        largefile = {                                                                                                 
                inode_ratio = 1048576                                                                                 
        }                                                                                                             
        largefile4 = {                                                                                                
                inode_ratio = 4194304                                                                                 
        }                                                                                                             

[root@Backup-ctgu /]#  mkfs.ext3 -T  largefile4 /dev/sdd1 -F                                                          
mke2fs 1.39 (29-May-2006)                                                                                             
Filesystem label=                                                                                                     
OS type: Linux                                                                                                        
Block size=4096 (log=2)                                                                                               
Fragment size=4096 (log=2)                                                                                            
3336768 inodes, 3416827895 blocks                                                                                     
170841394 blocks (5.00%) reserved for the super user                                                                  
First data block=0                                                                                                    
Maximum filesystem blocks=4294967296                                                                                  
104274 block groups                                                                                                   
32768 blocks per group, 32768 fragments per group                                                                     
32 inodes per group                                                                                                   
Superblock backups stored on blocks:                                                                                  
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,                                       
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,                                           
        102400000, 214990848, 512000000, 550731776, 644972544, 1934917632,                                            
        2560000000                                                                                                    

Writing inode tables: done                                                                                            
Creating journal (32768 blocks): done                                                                                 
Writing superblocks and filesystem accounting information:                                                            

done                                                                                                                  

This filesystem will be automatically checked every 22 mounts or                                                      
180 days, whichever comes first.  Use tune2fs -c or -i to override.                                                   
[root@Backup-ctgu /]#                                                                                                 
[root@Backup-ctgu /]#                                                                                                 
[root@Backup-ctgu /]# ls                                                                                              
bin   dev     dsmserv.err  export  lib    lost+found  misc  net  proc  sbin     srv  tftpboot  tsm  var               
boot  ds4700  etc          home    lib64  media       mnt   opt  root  selinux  sys  tmp       usr                    
[root@Backup-ctgu /]# mount /dev/sdd1 /tsm                                                                            
[root@Backup-ctgu /]# df -k                                                                                           
Filesystem           1K-blocks      Used Available Use% Mounted on                                                    
/dev/sda3            121659892  29560596  85819488  26% /                                                             
/dev/sda1               194442     21469    162934  12% /boot                                                         
tmpfs                  3013012         0   3013012   0% /dev/shm                                                      
/dev/sdd1            13665981956    151296 12982465084   1% /tsm                                                      

[root@Backup-ctgu ~]# vi /etc/fstab 
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/boot1            /boot                   ext2    defaults        1 2
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
LABEL=SWAP-sda2         swap                    swap    defaults        0 0
/dev/sdd1               /tsm                    ext3    defaults        0 0


[root@Backup-ctgu ~]#                                                                                                 
<<< Log from 210.42.35.61 ended 五月 22, 2010, 15:55:27 >>>

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/11134849/viewspace-663422/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-07-19

  • 博文量
    155
  • 访问量
    516747