1. Virtual Box Manager --> Settings --> Storage --> Add Hard Disk under SATA ( Define size )
2. Restart Virtual Machine.
3. Open Terminal prompt --> Switch to 'root'
4.
[root@NA9F2RFV1 ~]# parted
GNU Parted 2.1
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sda: 12.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 525MB 524MB primary ext4 boot
2 525MB 12.9GB 12.4GB primary lvm
[root@NA9F2RFV1 ~]# cat /proc/partitions
major minor #blocks name
8 0 12582912 sda
8 1 512000 sda1
8 2 12069888 sda2
8 16 46438560 sdb
252 0 7938048 dm-0
252 1 4128768 dm-1
[root@NA9F2RFV1 ~]# parted /dev/sdb
GNU Parted 2.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Error: /dev/sdb: unrecognised disk label (You have to create label for the disk partition before allocate size)
------------------------------------------------------
(parted) help
align-check TYPE N check partition N for TYPE(min|opt) alignment
check NUMBER do a simple check on the file system
cp [FROM-DEVICE] FROM-NUMBER TO-NUMBER copy file system to another partition
help [COMMAND] print general help, or help on COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition table)
mkfs NUMBER FS-TYPE make a FS-TYPE file system on partition NUMBER
mkpart PART-TYPE [FS-TYPE] START END make a partition
mkpartfs PART-TYPE FS-TYPE START END make a partition with a file system
move NUMBER START END move partition NUMBER
name NUMBER NAME name partition NUMBER as NAME
print [devices|free|list,all|NUMBER] display the partition table, available devices, free space, all found partitions, or a particular partition
quit exit program
rescue START END rescue a lost partition near START and END
resize NUMBER START END resize partition NUMBER and its file system
rm NUMBER delete partition NUMBER
select DEVICE choose the device to edit
set NUMBER FLAG STATE change the FLAG on partition NUMBER
toggle [NUMBER [FLAG]] toggle the state of FLAG on partition NUMBER
unit UNIT set the default unit to UNIT
version display the version number and copyright information of GNU Parted
-----------------------------------------------------
(parted) mklabel msdos
(parted) p
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdb: 47.6GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
(parted) mkpart (Allocate size for the partition)
Partition type? primary/extended? primary
File system type? [ext2]?
Start? 1
End?
End? 45G
(parted) p
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdb: 47.6GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 45.0GB 45.0GB primary
(parted) q
Information: You may need to update /etc/fstab.
[root@NA9F2RFV1 ~]# cat /proc/partitions
major minor #blocks name
8 0 12582912 sda
8 1 512000 sda1
8 2 12069888 sda2
8 16 46438560 sdb
8 17 43943936 sdb1
252 0 7938048 dm-0
252 1 4128768 dm-1
[root@NA9F2RFV1 ~]# mkfs /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
2747136 inodes, 10985984 blocks
549299 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
336 block groups
32768 blocks per group, 32768 fragments per group
8176 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624
Writing inode tables: done
Writing superblocks and filesystem accounting information:
done
This filesystem will be automatically checked every 35 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
Here I m creating Mount point under /opt (Mount point name - /thirdparty)
[root@NA9F2RFV1 ~]# ls /opt
rh VBoxGuestAdditions-4.3.16
[root@NA9F2RFV1 ~]# mkdir /opt/thirdparty
[root@NA9F2RFV1 ~]# vi /etc/fstab (Information: You need to update /etc/fstab)
Add new point:
# /etc/fstab
# Created by anaconda on Tue Nov 4 11:50:56 2014
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_na9f2rfv1-lv_root / ext4 defaults 1 1
UUID=210a8ed9-3741-4342-b0f9-fe2fc5fc1fd2 /boot ext4 defaults 1 2
/dev/mapper/vg_na9f2rfv1-lv_swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/sdb1 /opt/thirdparty ext2 defaults 1 0
Final STEP : You can mount it.
[root@NA9F2RFV1 ~]# mount /opt/thirdparty/
[root@NA9F2RFV1 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_na9f2rfv1-lv_root
7.5G 5.4G 1.8G 76% /
tmpfs 1004M 272K 1004M 1% /dev/shm
/dev/sda1 485M 55M 405M 12% /boot
/dev/sdb1 42G 48M 40G 1% /opt/thirdparty
[root@NA9F2RFV1 ~]#
You are all set with new Mount point. I m ready to start playing with Middle ware products on Oracle Virtual Box :-)
Thanks,
- Srikanth Govada
2. Restart Virtual Machine.
3. Open Terminal prompt --> Switch to 'root'
4.
[root@NA9F2RFV1 ~]# parted
GNU Parted 2.1
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sda: 12.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 525MB 524MB primary ext4 boot
2 525MB 12.9GB 12.4GB primary lvm
[root@NA9F2RFV1 ~]# cat /proc/partitions
major minor #blocks name
8 0 12582912 sda
8 1 512000 sda1
8 2 12069888 sda2
8 16 46438560 sdb
252 0 7938048 dm-0
252 1 4128768 dm-1
[root@NA9F2RFV1 ~]# parted /dev/sdb
GNU Parted 2.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Error: /dev/sdb: unrecognised disk label (You have to create label for the disk partition before allocate size)
------------------------------------------------------
(parted) help
align-check TYPE N check partition N for TYPE(min|opt) alignment
check NUMBER do a simple check on the file system
cp [FROM-DEVICE] FROM-NUMBER TO-NUMBER copy file system to another partition
help [COMMAND] print general help, or help on COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition table)
mkfs NUMBER FS-TYPE make a FS-TYPE file system on partition NUMBER
mkpart PART-TYPE [FS-TYPE] START END make a partition
mkpartfs PART-TYPE FS-TYPE START END make a partition with a file system
move NUMBER START END move partition NUMBER
name NUMBER NAME name partition NUMBER as NAME
print [devices|free|list,all|NUMBER] display the partition table, available devices, free space, all found partitions, or a particular partition
quit exit program
rescue START END rescue a lost partition near START and END
resize NUMBER START END resize partition NUMBER and its file system
rm NUMBER delete partition NUMBER
select DEVICE choose the device to edit
set NUMBER FLAG STATE change the FLAG on partition NUMBER
toggle [NUMBER [FLAG]] toggle the state of FLAG on partition NUMBER
unit UNIT set the default unit to UNIT
version display the version number and copyright information of GNU Parted
-----------------------------------------------------
(parted) mklabel msdos
(parted) p
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdb: 47.6GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
(parted) mkpart (Allocate size for the partition)
Partition type? primary/extended? primary
File system type? [ext2]?
Start? 1
End?
End? 45G
(parted) p
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdb: 47.6GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 45.0GB 45.0GB primary
(parted) q
Information: You may need to update /etc/fstab.
[root@NA9F2RFV1 ~]# cat /proc/partitions
major minor #blocks name
8 0 12582912 sda
8 1 512000 sda1
8 2 12069888 sda2
8 16 46438560 sdb
8 17 43943936 sdb1
252 0 7938048 dm-0
252 1 4128768 dm-1
[root@NA9F2RFV1 ~]# mkfs /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
2747136 inodes, 10985984 blocks
549299 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
336 block groups
32768 blocks per group, 32768 fragments per group
8176 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624
Writing inode tables: done
Writing superblocks and filesystem accounting information:
done
This filesystem will be automatically checked every 35 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
Here I m creating Mount point under /opt (Mount point name - /thirdparty)
[root@NA9F2RFV1 ~]# ls /opt
rh VBoxGuestAdditions-4.3.16
[root@NA9F2RFV1 ~]# mkdir /opt/thirdparty
[root@NA9F2RFV1 ~]# vi /etc/fstab (Information: You need to update /etc/fstab)
Add new point:
# /etc/fstab
# Created by anaconda on Tue Nov 4 11:50:56 2014
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_na9f2rfv1-lv_root / ext4 defaults 1 1
UUID=210a8ed9-3741-4342-b0f9-fe2fc5fc1fd2 /boot ext4 defaults 1 2
/dev/mapper/vg_na9f2rfv1-lv_swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/sdb1 /opt/thirdparty ext2 defaults 1 0
Final STEP : You can mount it.
[root@NA9F2RFV1 ~]# mount /opt/thirdparty/
[root@NA9F2RFV1 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_na9f2rfv1-lv_root
7.5G 5.4G 1.8G 76% /
tmpfs 1004M 272K 1004M 1% /dev/shm
/dev/sda1 485M 55M 405M 12% /boot
/dev/sdb1 42G 48M 40G 1% /opt/thirdparty
[root@NA9F2RFV1 ~]#
You are all set with new Mount point. I m ready to start playing with Middle ware products on Oracle Virtual Box :-)
Thanks,
- Srikanth Govada





