wiki:ParticionesLogicas/en

Manage Logical Partitions from Console by using Procedures

The partitioned wizard of the admin console is not be able to manage or show the information of logic partitions.

In this section we use the command "Run Script" and procedures for this task.

Usually anything we can do with OpenGnSys command line, we can manage it in the console with these two options.

Commands

Init Information

HDD Size

# ogGetDiskSize 1
312571224

List of Partitions

The command ogListPartitions needs the number of hard disk you want to list the information of partition table.

# ogListPartitions 1
NTFS:40000000 EXT2:30000000 LINUX-SWAP:2000000 CACHE:30000000 

Modify Partitions

The command ogCreatePartitions has as input argument the number of hard disk and partition information to create (TYPE:SIZE)

This command not allow modify the cache, so not admit CACHE type.

OpenGnSys placed the cache in the fourth primary partition at the end of the hard disk. If we have cache in the client, we allow to do three primary partitions and the others will be logics. If we have not cache, the fourth partition will be available.

In the example, we define the third cache type as extended and we include two logics partitions. The cache will be the same.

# ogCreatePartitions 1 NTFS:40000000 EXT2:30000000 EXTENDED:32000000 EXT2:30000000 LINUX-SWAP:2000000

NTFS:40000000 NTFS:30000000 EXTENDED:32000000 EXT2:30000000 LINUX-SWAP:2000000

Show the information of logics partitions

Remote conection client with SSH

Administration console: remote console

Lets send a command to the client and get the answer

Sometimes this option of the console unable to return the client's response.

Administration console: configure computer

It only shows the third partition is extended.

Modify the partitions

In the "tab Classrooms" on a computer, click on command "run script", in the text box "Script Code" we include the command ogCreatePartitions with the needed parameters and click on Accept.

To see the results we connect with SSH:

Automate the configuration of the partitions

You can automate the command by creating a procedure. It can be launch from any scope inmediately or programing it in a task.

Create the procedure

Use the command run script, but now the run option to choose is different: in the "tab Classrooms" on a computer, click on "run script":

  • In the textbox "Script Code" include command ogCreatePartitions with the needed parameters.
  • Select "Save as procedure" and include the name of the procedure.
  • Click on "Accept" to send the command.

Launch a procedure

Once the procedure is created it can be used from any scope.

We can also program it in the scope you want including in a task.

Last modified 7 years ago Last modified on Jul 14, 2017, 1:07:08 PM

Attachments (7)

Download all attachments as: .zip