Volume add

How to add volumes to both WIndows and Linux instances


Commands for Linux

List the disks:

fdisk -l

Run fdisk on the new volume:
sudo fdisk /dev/vdb

List help:
m

New partition:
n

Make it primary:
p

Make it the first:
1

Write the table
w

Make a file system on the new partition:
sudo mkfd -t ext3 /dev/vdb1

Make a new directory to mount the volume
sudo mkdir /storage
sudo mkdir /storage/new

Mount the volume
sudo mount /dev/vdb1 /storage/new

Add it to /etc/fstab if you want to remount on reboot:
/dev/vdb1   /storage/new   ext3   defaults  0   2



Commands for Windows:

from cmd prompt

Start diskpart
diskpart

Set san policy
san policy=onlineall

List disks:
list disk

Select the new disk
select disk 1

Clear the attributes from the disk
attributes disk clear readonly

Online disk
online disk

Now you can go to the gui, in disk management right click on the gray area next to the disk and initialize. Then right click on the new storage and create a new volume.


Comments