stupid, RHEL.....

[] /sbin/parted  /dev/sdb


GNU Parted 1.8.1
Using /dev/sdb
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) mklabel gpt                                                     
Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want to continue?
/sbin/parted: invalid token: gpt
Yes/No? yes                                                              
New disk label type?  [loop]? gpt                                        
(parted) mkpart primary 0 -0                                             
(parted) print all                                                       

Model: ATA Hitachi HDS72202 (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      17.4kB  2000GB  2000GB               primary      


...........................................................................................................................   

[] /sbin/mkfs.ext4dev -L ks.ext4 -m 0 /dev/sdb1

mke4fs 1.41.12 (17-May-2010)
Filesystem label=ks.ext4
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
122101760 inodes, 488378637 blocks
0 blocks (0.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
14905 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, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
        102400000, 214990848
Writing inode tables: done                           
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 20 mounts or
180 days, whichever comes first.  Use tune4fs -c or -i to override.


add the following line in /etc/fstab

/dev/sdb1               /media/data             auto            user,auto,rw,exec               0       0

create the directory

[] mkdir /media/data
[] chown user.user /media/data



'Computer > linux' 카테고리의 다른 글

Clean up old kernel in grub list (Ubuntu)  (0) 2011.01.28
Using parted, add a new 2TiB HDD  (0) 2011.01.26
ssh connection without typing password  (0) 2011.01.19
several find commands  (0) 2011.01.18
posted by citadel