- 积分
- 42
- 威望
-
- 金钱
-
- 注册时间
- 2010-8-5
- 在线时间
- 小时
- 最后登录
- 1970-1-1
|
[root@MyCloudServer ~]# dh -ls
-bash: dh: command not found
[root@MyCloudServer ~]# df -l
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
9743696 1241148 7999588 14% /
/dev/xvda1 101086 36764 59103 39% /boot
tmpfs 524380 0 524380 0% /dev/shm
[root@MyCloudServer ~]# df -lh
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
9.3G 1.2G 7.7G 14% /
/dev/xvda1 99M 36M 58M 39% /boot
tmpfs 513M 0 513M 0% /dev/shm
[root@MyCloudServer ~]# sdisk -l
-bash: sdisk: command not found
[root@MyCloudServer ~]# fdisk -l
Disk /dev/xvdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/xvdb doesn't contain a valid partition table
Disk /dev/xvda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/xvda1 * 1 13 104391 83 Linux
/dev/xvda2 14 1044 8281507+ 8e Linux LVM
/dev/xvda3 1045 1305 2096482+ 8e Linux LVM
[root@MyCloudServer ~]#
[root@MyCloudServer ~]# fdisk -lh
fdisk: invalid option -- h
Usage: fdisk [-b SSZ] [-u] DISK Change partition table
fdisk -l [-b SSZ] [-u] DISK List partition table(s)
fdisk -s PARTITION Give partition size(s) in blocks
fdisk -v Give fdisk version
Here DISK is something like /dev/hdb or /dev/sda
and PARTITION is something like /dev/hda7
-u: give Start and End in sector (instead of cylinder) units
-b 2048: (for certain MO disks) use 2048-byte sectors
[root@MyCloudServer ~]# fdisk -l
Disk /dev/xvdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/xvdb doesn't contain a valid partition table
Disk /dev/xvda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/xvda1 * 1 13 104391 83 Linux
/dev/xvda2 14 1044 8281507+ 8e Linux LVM
/dev/xvda3 1045 1305 2096482+ 8e Linux LVM
[root@MyCloudServer ~]# cd /home
[root@MyCloudServer home]# dir
[root@MyCloudServer home]#
[root@MyCloudServer home]# fdisk -l
Disk /dev/xvdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/xvdb doesn't contain a valid partition table
Disk /dev/xvda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/xvda1 * 1 13 104391 83 Linux
/dev/xvda2 14 1044 8281507+ 8e Linux LVM
/dev/xvda3 1045 1305 2096482+ 8e Linux LVM
[root@MyCloudServer home]# df -l
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
9743696 1241148 7999588 14% /
/dev/xvda1 101086 36764 59103 39% /boot
tmpfs 524380 0 524380 0% /dev/shm
[root@MyCloudServer home]# df -lh
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
9.3G 1.2G 7.7G 14% /
/dev/xvda1 99M 36M 58M 39% /boot
tmpfs 513M 0 513M 0% /dev/shm
[root@MyCloudServer home]# fdisk -l
Disk /dev/xvdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/xvdb doesn't contain a valid partition table
Disk /dev/xvda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/xvda1 * 1 13 104391 83 Linux
/dev/xvda2 14 1044 8281507+ 8e Linux LVM
/dev/xvda3 1045 1305 2096482+ 8e Linux LVM
[root@MyCloudServer home]# fdisk /dev/xvdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 2610.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2610, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-2610, default 2610):
Using default value 2610
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@MyCloudServer home]# fdisk -l
Disk /dev/xvdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/xvdb1 1 2610 20964793+ 83 Linux
Disk /dev/xvda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/xvda1 * 1 13 104391 83 Linux
/dev/xvda2 14 1044 8281507+ 8e Linux LVM
/dev/xvda3 1045 1305 2096482+ 8e Linux LVM
[root@MyCloudServer home]# mkfs.ext3 /dev/xvdb1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
2621440 inodes, 5241198 blocks
262059 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
160 block groups
32768 blocks per group, 32768 fragments per group
16384 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 38 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@MyCloudServer home]# cd ~
[root@MyCloudServer ~]# dir
gzidc
[root@MyCloudServer ~]# dir home
dir: home: No such file or directory
[root@MyCloudServer ~]# cd /home
[root@MyCloudServer home]# dir
[root@MyCloudServer home]# cd ~
[root@MyCloudServer ~]# mount /dev/xvdb1 /home/
[root@MyCloudServer ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
9.3G 1.2G 7.7G 14% /
/dev/xvda1 99M 36M 58M 39% /boot
tmpfs 513M 0 513M 0% /dev/shm
/dev/xvdb1 20G 173M 19G 1% /home
[root@MyCloudServer ~]# cat /etc/fstab
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
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/VolGroup00/LogVol01 swap swap defaults 0 0
[root@MyCloudServer ~]# vi /etc/fstab
[root@MyCloudServer ~]# cat /etc/fstab
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
/dev/xvdb1 /home ext3 defaults,noatime 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/VolGroup00/LogVol01 swap swap defaults 0 0
[root@MyCloudServer ~]# passwd
Changing password for user root.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@MyCloudServer ~]# reboot
Broadcast message from root (pts/7) (Mon Jun 23 23:11:30 2014):
The system is going down for reboot NOW!
[root@MyCloudServer ~]# |
|