123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- newdisk-automator
- A tool for automating the partitioning of new disks in lcm
- Overview:
- This program creates a new partition table on the disk, consisting of a single partition occupying the whole space.
- It then divides the partition in up to four lvm logical volumes, whose size can be specified with the command line or calculated automatically by the program.
- This program does not mount the new partitions, nor update the fstab: these operations have to be performed afterwards.
- This program can be used in two mode: automatic and manual.
- Automatic:
- newdisk-automator [-qvf] device
- device is partitioned according to the following scheme:
- - calcolo: 100GB
- - swap: ram size + 1GB
- - free space: 10% of the total
- - condor: 40% of remaining space
- - tempdir: 60% of remaining space
- If the size of the disk is less than 102GB + ram size, this mode cannot be used.
- If the size of the disk is greater than the minimum size, but still less than (100GB + ram size) * 2, to use this mode the -f option must be passed.
- Be careful: in the automatic mode, calcolo and swap size are fixed, and forcing it with -f could result in having very small tempdir and condor partitions.
- Manual:
- newdisk-automator [-qv] device temp_size condor_size swap_size vm_size
- The partitions are assigned the size passed on the command line. S, b, K, M, G can be appended to the sizes for 512-byte-sectors, bytes, kibibytes, mebibytes and gibibytes. The default is bytes.
- If the total passed with the command line is greater than the size of the disk, the program stops.
- Error codes:
- 10 Usage error
- 11 Size units error
- 20 Device file does not exist
- 21 Device is not a block file
- 22 Device is mounted
- 23 Device is used as swap
- 24 Device is part of a used lvm volume
- 25 Device is part of a lvm volume group shared with other physical volumes
- 26 Device is not a regular disk (it may be a partition or another type of block file)
- 30 Device is too small to use default mode
- 31 Device does not have the reccomended size. Force with -f to use default mode
- 32 Device is smaller than the manually specified size
- 40 One of the programs called from the script returned a non 0 value. Check the stderr to get the code
- 41 The effective user id of the calling user is not 0. Only root can run this tool
|