pve磁盘分区

发表于 LINUX 分类,标签:



apt-get update
apt-get install vim
apt-get install parted


root@proxmox005:/mnt# parted /dev/sdc
GNU Parted 3.4
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mktable
New disk label type? gpt
(parted) mkpart
Partition name?  []? video
File system type?  [ext2]? ext4
Start? 0%
End? 100%
(parted) p
Model: DELL PERC H730P Mini (scsi)
Disk /dev/sdc: 6000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number  Start   End     Size    File system  Name   Flags
 1      1049kB  6000GB  6000GB  ext4         video
(parted) quit
Information: You may need to update /etc/fstab.
root@proxmox005:/mnt# blkid
/dev/sda2: UUID="E76C-5EE6" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="7ee195ed-f003-497a-9f94-ebcdf8bbd9e8"
/dev/sda3: UUID="ca0beZ-kr9X-Bbvi-CUoK-bE5D-4hJ8-wYtAHq" TYPE="LVM2_member" PARTUUID="64def7a0-38a5-4853-93b9-38ab0fdf1695"
/dev/mapper/pve-swap: UUID="39e8f6b5-132d-415d-95e4-b64f0c7053cc" TYPE="swap"
/dev/mapper/pve-root: UUID="9ba41971-09ed-41f8-b36a-105293baf3de" BLOCK_SIZE="4096" TYPE="ext4"
/dev/sda1: PARTUUID="b57fea19-5d75-4451-ac27-c6630d0a41a4"
/dev/sdc1: PARTLABEL="video" PARTUUID="13d06b7b-e585-4e74-9880-5fd3b13e17a2"
root@proxmox005:/mnt# mkfs.ext4 /dev/sdc1
mke2fs 1.46.5 (30-Dec-2021)
Creating filesystem with 1464860160 4k blocks and 183107584 inodes
Filesystem UUID: 5bd72c2c-3004-4744-b5e3-b90fb0d56fd7
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544
Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done
echo "/dev/sdc1 /stoneData/video ext4 defaults 0 0" >> /etc/fstab






root@proxmox005:/stoneData/video# parted /dev/sdb
GNU Parted 3.4
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mktable
New disk label type? gpt
(parted) mkpart
Partition name?  []? data
File system type?  [ext2]? ext4
Start? 0%
End? 100%
(parted) p
Model: DELL PERC H730P Mini (scsi)
Disk /dev/sdb: 18.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number  Start   End     Size    File system  Name  Flags
 1      1049kB  18.0TB  18.0TB  ext4         data
                                                                (parted) quit
Information: You may need to update /etc/fstab.
                                                                root@proxmox005:/stoneData/video# blkid
/dev/sda2: UUID="E76C-5EE6" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="7ee195ed-f003-497a-9f94-ebcdf8bbd9e8"
/dev/sda3: UUID="ca0beZ-kr9X-Bbvi-CUoK-bE5D-4hJ8-wYtAHq" TYPE="LVM2_member" PARTUUID="64def7a0-38a5-4853-93b9-38ab0fdf1695"
/dev/mapper/pve-swap: UUID="39e8f6b5-132d-415d-95e4-b64f0c7053cc" TYPE="swap"
/dev/mapper/pve-root: UUID="9ba41971-09ed-41f8-b36a-105293baf3de" BLOCK_SIZE="4096" TYPE="ext4"
/dev/sda1: PARTUUID="b57fea19-5d75-4451-ac27-c6630d0a41a4"
/dev/sdb1: PARTLABEL="data" PARTUUID="392f7fb9-2d3b-401e-93b8-1b8135b36503"
/dev/sdc1: UUID="5bd72c2c-3004-4744-b5e3-b90fb0d56fd7" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="video" PARTUUID="13d06b7b-e585-4e74-9880-5fd3b13e17a2"
root@proxmox005:/stoneData/video# mkfs.ext4 /dev/sdb1
mke2fs 1.46.5 (30-Dec-2021)
Creating filesystem with 4394581504 4k blocks and 274661376 inodes
Filesystem UUID: cf725317-955d-4e69-a05d-6cdb6ab989fe
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544, 1934917632,
2560000000, 3855122432
Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done
root@proxmox005:/stoneData/video# echo "/dev/sdb1 /stoneData/data ext4 defaults 0 0" >> /etc/fstab


参考

https://blog.csdn.net/imliuqun123/article/details/120742886

0 篇评论

发表我的评论