<<

Portal > Knowledgebase > Service Provider > Azure > How to add 2nd disk using

How to add 2nd disk using fdisk

Mark Lee - 2016-08-09 - 0 Comments - in Azure

How to: Adding a new disk for logs onto ScaleArc

Release Classification Level DB Categories Platform

All How To ALL Logging

OBJECTIVE

A dedicated space for storing Scalearc logs is necessary. This can be done by adding a disk and using fdisk

PROCEDURE

This article descibes necessary steps to allocate an extra disk in order for storing ScaleArc related logs.

Step-1. Verify that a new disk has been allocated onto the machine

[[email protected]]# fdisk -l Disk /dev/xvda: 21.5 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00089bae Device Boot End Blocks Id System /dev/xvda1 * 1 33 262144 83 Linux Partition 1 does not end on cylinder boundary. /dev/xvda2 33 537 4048896 82 Linux swap / Solaris Partition 2 does not end on cylinder boundary. /dev/xvda3 537 2611 16659456 83 Linux

Disk /dev/xvdb: 4294 MB, 4294967296 bytes 255 heads, 63 sectors/track, 522 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000

Step-2. Using fdisk to partition the new disk [[email protected]]# fdisk /dev/xvdb Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0xc91e059a. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) WARNING: DOS- compatible mode is deprecated. It's strongly recommended to switch off the mode ( 'c') and change display units to sectors (command 'u').

Command (m for ):

Step-3. Create the partition and write the changes

Command (m for help): p Disk /dev/xvdb: 4294 MB, 4294967296 bytes 255 heads, 63 sectors/track, 522 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xc91e059a Device Boot Start End Blocks Id System

Command (m for help):

Command (m for help): n Command action e extended p primary partition (1-4) p

Partition number (1-4): 1 First cylinder (1-522, default 1): Using default value 1 Last cylinder, +cylinders or +size{K,M,G} (1-522, default 522): Using default value 522

Command (m for help):

Command (m for help): w The partition table has been altered!

Calling ioctl() to re-read partition table. Syncing disks. [[email protected]]#

Step-4. Create a new file system for the disk [[email protected]]# mkfs.ext4 /dev/xvdb1 mke2fs 1.41.12 (17- May-2010) Filesystem label= OS : Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 262144 inodes, 1048233 blocks 52411 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=1073741824 32 block groups 32768 blocks per group, 32768 fragments per group 8192 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736 Writing inode tables: done Creating journal (16384 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 28 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.

Step-5. Make the /data directory and the disk

# /data #mount /dev/xvdba1 /data

NOTE: If /data already exists on the OS disk do the following:

# mv /data /data.old # mkdir /data # mount /dev/xvdba1 /data # cp -r /data.old/* /data

Step-6. Make the /data directory and mount the disk

# vi /etc/fstab add these lines: /dev/xvdba1 /data ext4 defaults 0 0

NOTE: to remove /data.old, reboot the system then do:

#rm -rf /data.old

If you are experiencing issues with ScaleArc or with any of it's features, please contact ScaleArc Support. We are available 24x7 by phone 855 800 7225 or +1 408 412 7315. For general support inquiries, you can also e-mail us at [email protected]. Copyright ©2014 ScaleArc, Inc. All rights reserved. Contact Support | Contact ScaleArc | Feedback 2901 Tasman Drive Santa Clara, CA 95054 | Email: [email protected]

Permalink: https://support.scalearc.com/kb/articles/3663

Tags

/data disk add disk