Montage partition

Afficher les partitions

fdisk -l

Changer la partition /dev/sdd 

[root@ ~]# fdisk /dev/sdd
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xd0f05947. 
Changes will remain in memory only, until you decide to write them. 
After that, of course, the previous content won't be recoverable. 

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u').

Command (m for help): n 
Command action 
    e extended 
    p primary partition (1-4)

Partition number (1-4): 1
First cylinder (1-13054, default 1): 
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-13054, default 13054): 
Using default value 13054 

Command (m for help): w 
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

Affichage des partitions, /dev/sdd => /dev/sdd1

fdisk -l

Formatage de la partition en ext4

mkfs.ext4 /dev/sdd1

Création d'un répertoire cible pour le point de montage :

mkdir /data

Modification du fichier /etc/fstab, ajout du point de montage :

/dev/sdd1               /data                   ext4    defaults        1 2

Montage du répertoire /data

mount /data