To partition and format an additional hard drive on a Cloud Server with a Linux Debian Operating System proceed as follows:
Disk /dev/sdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 1 2610 20964793+ 82 Linux swap / Solaris
# mkfs.ext3 /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
655360 inodes, 2621184 blocks
131059 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2684354560
80 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, 1605632
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 39 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
# Created by anaconda on Mon May 21 09:51:28 2012
# 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-lv_root / ext4 defaults 1 1
UUID=880645ef-dfff-477d-92d3-886935289a74 /boot ext4 defaults 1 2
/dev/mapper/vg-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/cdrom /media/cdrom iso9660 noauto,owner,ro 0 0
/dev/sdb1 /backup ext3 defaults 1 1
- Access the Cloud Server via SSH or via Applet Java.
- Once you have accessed it, type
fdisk -l from the command line and press enter.
- The information will then be displayed on the disks installed and their partitions.
- To identify the disk you have just added: it is usually located in the form
/dev/sdb if it is the first disk added. If the disk you just added does not appear on the list you will probably need to reboot the virtual machine: type
reboot and confirm; once you have restarted the Cloud Server repeat the operations from point 1.
- Launch the utility CFdisk from the command line indicating the disk you want to partition by typing for example
cfdisk /dev/sdb and pressing enter (in this example the disk you want to partition is dev/sdb/).
- A screen will appear with the disk's features: at this point move with the arrows to the command [
New] and press enter.
You will be asked to choose between the first two options [
Primary] and [
Logical] the new partition: select for example [
Primary] and confirm.
Then you will be asked to choose the size of the partition (if the number suggested is left unchanged a partition will be created for all the new disk space) and confirm. The new partition will then be created, and listed in the main screen under the name
sdb1 in our example.
At this point by still moving with the arrow keys and selecting [
Type] you can choose the Filesystem on the partition created: you will be offered a list of Filesystem types, then type the code corresponding to the type chosen and confirm by pressing Enter. The initial screen will be updated with the choice type for the partition created.
- From the main screen by selecting [
Write] you can format the partition created: you will be asked for confirmation to continue with the operation; after a few moments the operation will be completed and you will be redirected to the main screen.
- To exit move to [
quit] and to check, by re-typing
fdisk -l can also see the new partition created in the list of disks.
- Now all that's left to do is create the Filesystem in the created partition: first of all exit from
parted by typing
quit and then if you wish to create an ext3 partition launch the
mkfs.ext.3 command for the created partition (which in the example is /dev/sdb1).
The operations described have an exclusively exemplary nature: the improper use or use without due care and skill, can cause the partial and/or total loss of data, and in some cases may disrupt the correct operation of the virtual machine. Using this guide without the appropriate skills is not recommended. Aruba S.p.A. does not accept any responsibility for any problems or damage caused by using these guides.