disk: create{Partition -> Filesystem}
What this function is actually doing is to create a filesystem, together with a new partition; for LVM that filesystem could also be created on a new logical volume though.
This commit is contained in:
parent
5693045916
commit
d415d57f95
1 changed files with 2 additions and 2 deletions
|
|
@ -40,7 +40,7 @@ func CreatePartitionTable(
|
||||||
for _, m := range mountpoints {
|
for _, m := range mountpoints {
|
||||||
if m.Mountpoint != "/" {
|
if m.Mountpoint != "/" {
|
||||||
partitionSize := m.MinSize / sectorSize
|
partitionSize := m.MinSize / sectorSize
|
||||||
basePartitionTable.createPartition(m.Mountpoint, partitionSize, rng)
|
basePartitionTable.createFilesystem(m.Mountpoint, partitionSize, rng)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -63,7 +63,7 @@ func CreatePartitionTable(
|
||||||
return basePartitionTable
|
return basePartitionTable
|
||||||
}
|
}
|
||||||
|
|
||||||
func (pt *PartitionTable) createPartition(mountpoint string, size uint64, rng *rand.Rand) {
|
func (pt *PartitionTable) createFilesystem(mountpoint string, size uint64, rng *rand.Rand) {
|
||||||
filesystem := Filesystem{
|
filesystem := Filesystem{
|
||||||
Type: "xfs",
|
Type: "xfs",
|
||||||
UUID: uuid.Must(newRandomUUIDFromReader(rng)).String(),
|
UUID: uuid.Must(newRandomUUIDFromReader(rng)).String(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue