화요일, 3월 18, 2025
HomeESXiESXi ghost OS Ubunutu HDD 추가

ESXi ghost OS Ubunutu HDD 추가

ESXi ghost OS Ubunutu HDD 추가

1.ESXi HDD 추가
hddadd001

hddadd002

hddadd003

hddadd004

hddadd005

hddadd006

2.ghost OS 설정


fdisk -l

....
Disk /dev/sdc: 17.2 GB, 17179869184 bytes
255 heads, 63 sectors/track, 2088 cylinders, total 33554432 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdc doesn't contain a valid partition table

....

fdisk /dev/sdc
n -> p -> 1 -> enter -> enter -> w


root@family:~# fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xfd9c0c77.
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)

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-33554431, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-33554431, default 33554431): 
Using default value 33554431

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

Calling ioctl() to re-read partition table.
Syncing disks.

3.format
mkfs.ext4 /dev/sdc

root@family:~# mkfs.ext4 /dev/sdc
mke2fs 1.42.9 (4-Feb-2014)
/dev/sdc is entire device, not just one partition!
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1048576 inodes, 4194304 blocks
209715 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
128 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

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done   


4.추가 된 HDD UUID 확인
ls -l /dev/disk/by-uuid/

[lrwxrwxrwx 1 root root 9 Dec 28 10:47 51356155-2f3a-4065-ba00-5ae95d0cdca5 -> ../../sdc]

root@family:~# ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 Dec 28 10:43 0f3ed55a-5494-4d08-9466-f41a08aefb52 -> ../../dm-1
lrwxrwxrwx 1 root root  9 Dec 28 10:47 51356155-2f3a-4065-ba00-5ae95d0cdca5 -> ../../sdc
lrwxrwxrwx 1 root root 10 Dec 28 10:43 599a76ca-5719-45d8-bcd1-de22a0437e49 -> ../../sda1
lrwxrwxrwx 1 root root 10 Dec 28 10:43 6904693b-4bdd-4274-920a-fe43b574f6a9 -> ../../dm-0
lrwxrwxrwx 1 root root  9 Dec 28 10:43 d094b22e-16d4-4a6d-8b98-3465c15b9b2e -> ../../sdb

5.mount

vi /etc/fstab

[# /dev/sdc1 16G
UUID=51356155-2f3a-4065-ba00-5ae95d0cdca5 /home03 ext4 errors=remount-ro 0 1
]

위의 내용을 추가합니다.

root@family:~# cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' 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).
#
#                
/dev/mapper/family--vg-root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda1 during installation
UUID=599a76ca-5719-45d8-bcd1-de22a0437e49 /boot           ext2    defaults        0       2
# /dev/sdc1 16G
UUID=51356155-2f3a-4065-ba00-5ae95d0cdca5 /home03         ext4   errors=remount-ro 0       1 
/dev/mapper/family--vg-swap_1 none            swap    sw              0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular