Quantcast
Channel: Byte Miner » admin
Viewing all articles
Browse latest Browse all 12

VMware disk addition without reboot

$
0
0

The process describes how you can add disks to a VMware Linux based server without the need to reboot the server.

Before formatting the disk, you will first need to scan SCSI drives by running:

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

and then format as usual:

mkfs -t ext3 /dev/sd<whatever> <diskspace>

e.g. mkfs -t ext3 /dev/sdc 8388608

N.B. For calculating disk space, say your disk size is 8GB then 8*1024*1024 is what you need to enter.
and finally mount the disk to wherever you want to:

mount -t ext3 /dev/sd<whatever> /<mountpoint>

e.g. mount -t ext3 /dev/sdc /code

You will also need to add disk on /etc/fstab otherwise disk won’t be mounted upon reboot.

You can copy existing entries and create a separate line for the new disk, just change drive name and mount point.

Sample /etc/fstab file:

# cat /etc/fstab
/dev/VolGroup00/LogVol00 /                      ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
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/VolGroup00/LogVol01 swap                   swap    defaults        0 0
/dev/sdb                 /opt                   ext3    defaults        1 2
/dev/sdc                 /code                  ext3    defaults        1 2

 

The post VMware disk addition without reboot appeared first on Byte Miner.


Viewing all articles
Browse latest Browse all 12

Trending Articles