Tagged: olleh

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:~$

olleh ucloud biz ubuntu account


KT olleh ucloud biz 서버를 구매하면 기본으로 root 계정을 사용하게끔 되어 있는 것 같다.

add new adminsudo user

root@xxx:~$ useradd <username> -m -s /bin/bash
root@xxx:~$ passwd <username>
Password:
Retype new password:
passwd: password updated successfully
root@xxx:~$ adduser <username> sudo
Adding user `<username>' to group 'sudo' ...
Adding user <username> to group sudo
Done.
root@xxx:~$

disable root account

username@host:~$ sudo passwd -l root
passwd: password expiry information changed.
username@host:~$