olleh ucloud biz ubuntu data disk


references

fdisk

host:~$ ls -l /dev/xvd*
brw-rw---- 1 root disk 202,  0 2012-09-18 12:15 /dev/xvda
brw-rw---- 1 root disk 202,  1 2012-09-18 12:15 /dev/xvda1
brw-rw---- 1 root disk 202,  2 2012-09-18 12:15 /dev/xvda2
brw-rw---- 1 root disk 202, 16 2012-09-18 12:15 /dev/xvdb
host:~$ sudo 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 0xec499834.
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 (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-10443, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-10443, default 10443):
Using default value 10443

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

Calling ioctl() to re-read partition table.
Syncing disks.
host:~$

mkfs

host:~$ sudo mkfs /dev/xvdb1 -t ext4
host:~$

/etc/fstab

host:~$ sudo mkdir /data
host:~$ mount /dev/xvdb1 /data -t ext4
host:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system>                           <mount point>   <type>  <options>           <dump>  <pass>
proc                                      /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/xvda1 during installation
UUID=blar blar blar                       /               ext3    errors=remount-ro   0       1
# swap was on /dev/xvda2 during installation
UUID=blar blar blar                       none            swap    sw                  0       0

/dev/xvdb1                                /data           ext4    defaults            0       0
host:~$ shutdown -r now
host:~$
Advertisements

One comment

  1. Pingback: ucloudbiz – project server add. | gasaepiri

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