remote-lab.net learn by doing

Linux reload partition table

Below are the steps you can use in order to be able to create a filesystem on a newly created partition (vda3 in our example) without reboot:


[email protected]:~# fdisk -l
Disk /dev/vda: 16.1 GB, 16106127360 bytes
16 heads, 63 sectors/track, 31207 cylinders, total 31457280 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003d859
   Device Boot      Start         End      Blocks   Id  System
/dev/vda1            2048     1953791      975872   82  Linux swap / Solaris
/dev/vda2   *     1953792    11718655     4882432   83  Linux
/dev/vda3        11718656    31457279     9869312   83  Linux
[email protected]:~# ls /dev/vda
vda   vda1  vda2
[email protected]:~# aptitude install parted
[email protected]:~# partprobe
[email protected]:~# ls /dev/vda
vda   vda1  vda2  vda3
[email protected]:~# mkfs.ext4 /dev/vda3
comments powered by Disqus