README 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. newdisk-automator
  2. A tool for automating the partitioning of new disks in lcm
  3. Overview:
  4. This program create a new partition table on the disk, consisting of a single partition occupying the whole space.
  5. 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.
  6. This program does not mount the new partitions, nor update the fstab: these operations have to be performed afterwards.
  7. This program can be used in two mode: automatic and manual.
  8. Automatic:
  9. newdisk-automator [-qvf] device
  10. device is partitioned according to the following scheme:
  11. - calcolo: 100GB
  12. - swap: ram size + 1GB
  13. - free space: 10% of the total
  14. - condor: 40% of remaining space
  15. - tempdir: 60% of remaining space
  16. If the size of the disk is less than 102GB + ram size, this mode cannot be used.
  17. 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.
  18. 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.
  19. Manual:
  20. newdisk-automator [-qv] device temp_size condor_size swap_size vm_size
  21. 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.
  22. If the total passed with the command line is greater than the size of the disk, the program stops.
  23. Error codes:
  24. 10 Usage error
  25. 11 Size units error
  26. 20 Device file does not exist
  27. 21 Device is not a block file
  28. 22 Device is mounted
  29. 23 Device is used as swap
  30. 24 Device is part of a used lvm volume
  31. 25 Device is part of a lvm volume group shared with other physical volumes
  32. 26 Device is not a regular disk (it may be a partition or another type of block file)
  33. 30 Device is too small to use default mode
  34. 31 Device does not have the reccomended size. Force with -f to use default mode
  35. 32 Device is smaller than the manually specified size
  36. 40 One of the programs called from the script returned a non 0 value. Check the stderr to get the code