crear particion con parted

Por lo general siempre que he creado particiones las he creado con fdisk, pero bueno el fdisk ya no nos permite crear particiones tan grandes, otra por que en la chamba ya no quieren que usemos fdisk si no parted 😛 y a parte con formato gpt, ya no msdos para soporte de mbr 😛 bueno asi que veamos como crear una particion sencilla con parted

 
 

~]# parted -a optimal /dev/xvdc
GNU Parted 2.1
Using /dev/xvdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) help                                                             
  align-check TYPE N                        check partition N for TYPE(min|opt) alignment
  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]                           print 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 partition 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 [devices|free|list,all|NUMBER]     display the partition table, available devices, free space, all found partitions, or a particular
        partition
  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                                  display the version number and copyright information of GNU Parted
(parted) mklabel gpt                                                      
(parted) print                                                            
Model: Xen Virtual Block Device (xvd)
Disk /dev/xvdc: 215GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
 
Number  Start  End  Size  File system  Name  Flags
 
(parted) print free                                                       
Model: Xen Virtual Block Device (xvd)
Disk /dev/xvdc: 215GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
 
Number  Start   End    Size   File system  Name  Flags
        17.4kB  215GB  215GB  Free Space
 
(parted) help unit
  unit UNIT                                set the default unit to UNIT
 
	UNIT is one of: s, B, kB, MB, GB, TB, compact, cyl, chs, %, kiB, MiB, GiB, TiB
(parted) unit GiB                                                         
(parted) print free
Model: Xen Virtual Block Device (xvd)
Disk /dev/xvdc: 200GiB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
 
Number  Start    End     Size    File system  Name  Flags
        0.00GiB  200GiB  200GiB  Free Space
 
 
(parted) mkpart primary 0 200                                             
(parted) name 1 u01                                                       
(parted) print                                                            
Model: Xen Virtual Block Device (xvd)
Disk /dev/xvdc: 200GiB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
 
Number  Start    End     Size    File system  Name  Flags
 1      0.00GiB  200GiB  200GiB               u01
 
(parted) quit                                                             
Information: You may need to update /etc/fstab.      
 
 
     ~]# mkfs.ext4 /dev/xvdc1
mke2fs 1.43-WIP (20-Jun-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
13107200 inodes, 52428288 blocks
2621414 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
1600 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
 
Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done  
 
~]# vi /etc/fstab
 
Montamos la particion  y si le damos un df en este caso ya etara vible nuestra particion de /dev/xvdc1

Leave a Reply

Your email address will not be published. Required fields are marked *