Archive for September, 2016

Even though the parted command shows the partition as ext3, you can format it as ext4.

(parted) mklabel gpt
Warning: The existing disk label on /dev/sda will be destroyed and all data on this disk will be lost. Do you want to
continue?
Yes/No? Yes                                                               
(parted) unit TB
(parted) mkpart primary 0.00TB 10.00TB
(parted) p                                                                
Model: LSI MR9261-8i (scsi)
Disk /dev/sda: 9.99TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name     Flags
 1      0.00TB  9.99TB  9.99TB  ext3         primary

(parted) quit                                                             
Information: You may need to update /etc/fstab.

[root@mh ~]# mkfs.ext4 /dev/sda1
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
305025024 inodes, 2440183808 blocks
122009190 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
74469 block groups
32768 blocks per group, 32768 fragments per group
4096 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

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

[root@mh ~]# blkid
/dev/sda1: UUID="1485be35-8319-4a49-b0bd-9ee465303b41" TYPE="ext4" PARTLABEL="primary" PARTUUID="a7f0e3ef-3e72-4bc9-849a-90dde882f07f" 
/dev/sdb1: UUID="6ca14ed0-e5e0-422a-9e82-ea72fc84516b" TYPE="ext4" 
/dev/sdb2: UUID="ceb6e531-4a0a-49b9-9e59-d8f1ae4593c6" TYPE="swap" 
/dev/sdb3: UUID="ab27cea4-abc8-49d8-894f-2c39408b196f" TYPE="ext4" 
[root@mh ~]# blkid|grep sda
/dev/sda1: UUID="1485be35-8319-4a49-b0bd-9ee465303b41" TYPE="ext4" PARTLABEL="primary" PARTUUID="a7f0e3ef-3e72-4bc9-849a-90dde882f07f" 
[root@mh ~]# blkid|grep sda >> /etc/fstab
[root@mh ~]# vi /etc/fstab
[root@mh ~]# mount -a