Linux Basic: Creating a Filesystem

From disk to filesystem:

> Rescan on scisi controller to detect the disk (controller id 0, in  this example)

echo "- - -" > /sys/class/scsi_host/host0/scan

– List disks

fdisk -l

> Fdisk choosing options n -> new p->partition 1-> partition number

fdisk /dev/sdm

> Create physcal volume

pvcreate /dev/sdm1

> Create Volume Group

vgcreate oracle /dev/sdb1

> Rename Volume Group

vgrename oracle vgoracle

> Create LV

lvcreate -L 19G -n lvoracle vgoracle

> Extend LV

lvextend -L +990M /dev/vgoracle/lvoracle

> Make FileSystem

mkfs.ext3 -m 0 -v /dev/vgoracle/lvoracle

OBS: m 0 is the journal (for recovery in case of crash).  “0” because I don’t want it now. So, 100% of disco will be available for using on fs.

> Mount filesystem on Directory

mount -t ext3 /dev/vgoracle/lvoracle /oracle/

> Just to check:

$ df -h
/dev/mapper/vgoracle-lvoracle
20G  173M   20G   1% /oracle

 

Have a nice day!
Matheus.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s