SimplerCloud Pte Ltd

×
×

How to initialize the data-disk on my SUSE Linux Enterprise Server servelet?

Back

Once your order of SUSE Linux Enterprise Server servelet is completed, you will need to access your servelet via ssh client. Accessing servelet via ssh can be done using putty as ssh client.

1.Login to servelet using putty and type root as username and the servelet´s password.

2.Inside the console, execute the following commands in sequence:

  1. fdisk /dev/sdb
  2. n
  3. p
  4. 1
  5. [Press ENTER]
  6. [Press ENTER]
  7. w
  8. mkfs -t ext3 /dev/sdb1
  9. mkdir /data
  10. echo "/dev/sdb1 /data ext3 errors=remount-ro 0 2" >> /etc/fstab
  11. mount -a

 

Below is the example to initialize the data-disk on SUSE Linux Enterprise servelet:

==============================================================================================
 
(1)  Disk Partition creation and initialization
 
sc-SLES-11-SP3-1:~ # fdisk /dev/sdb
 
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4, default 1): 1
First sector (2048-41943039, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-41943039, default 41943039):
Using default value 41943039
 
Command (m for help): w
The partition table has been altered!
 
Calling ioctl() to re-read partition table.
Syncing disks.
sc-SLES-11-SP3-1:~ #
 
(2) Format and create file system
 
sc-SLES-11-SP3-1:~ # mkfs -t ext3 /dev/sdb1
mke2fs 1.41.9 (22-Aug-2009)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
1310720 inodes, 5242624 blocks
262131 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
160 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, 2654208,
        4096000
 
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
 
This filesystem will be automatically checked every 27 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
sc-SLES-11-SP3-1:~ #
 
(3) Create /data directory
 
sc-SLES-11-SP3-1:~ # mkdir /data
sc-SLES-11-SP3-1:~ #
 
(4) Add "/dev/sdb1 /data ext3 errors=remount-ro 0 2" into /etc/fstab
 
sc-SLES-11-SP3-1:~ # echo "/dev/sdb1 /data ext3 errors=remount-ro 0 2" >> /etc/fstab
sc-SLES-11-SP3-1:~ #
 
(5) Map the data disk and check the result
 
sc-SLES-11-SP3-1:~ # mount -a
sc-SLES-11-SP3-1:~ # df
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/sda2        8811252 3296368   5067296  40% /
udev              444904     120    444784   1% /dev
tmpfs             444904      76    444828   1% /dev/shm
/dev/sdb1       20641404  176196  19416684   1% /data

Was this article helpful?
Dislike0 Like0
Views: 6644