A.2 DST Commands for NCPCON

The commands in this section can be used only with the NCP Console Command utility. You can issue the commands from the NCP Console interactive mode, or prepend the command with ncpcon when issuing it from a script or at a terminal console prompt as the root user. For information, see Section A.1, Using NCPCON for DST Commands.

create shadow_volume <primary_volumename> <shadow_path> /ID=<volume_id>

Creates a non-clustered shadow association between a primary NSS volume and secondary NSS volume, and adds the SHADOW_VOLUME mount information to the /etc/opt/novell/ncpserv.conf file.

When you issue the command from the NCP Console, you do not need to restart ndsd in order for the changes to take effect. When you issue the command from a Linux prompt, you must restart ndsd in order for the changes to take effect.

OPTIONS  

primary_volumename

Specifies the volume name for the primary NSS volume, such as VOL1.

shadow_path

Specifies the Linux path of the mount location for the secondary NSS volume, such as /media/nss/ARCVOL1.

/ID=<volume_id>

Specifies a unique volume ID (0 to 254) to use when mounting the shadow volume.

When the primary volume has a state of Shadowed, the volume ID that you assign as its NCP volume ID represents the DST shadow volume pair of volumes. The secondary volume does not have a separate volume ID when it is in the shadow relationship.

EXAMPLES  

create shadow_volume VOL1 /home/shadows/VOL1

Creates a shadow volume where VOL1 is the primary storage area and /home/shadows/VOL1 is its mount point as a shadow volume.

remove shadow_volume [/l] [/i] [/f] <primary_volumename>

Removes the non-clustered shadow relationship between a primary NSS volume and a secondary NSS volume, and removes the SHADOW_VOLUME command from the /etc/opt/novell/ncpserv.conf file. You must unmount the volume before you issue the command.

IMPORTANT:You can use this command as part of the process to unlink the primary and secondary volumes of a non-clustered DST shadow volume. For information, see Section 9.12, Removing the Shadow Relationship for a Non-Clustered DST Shadow Volume.

Typically, you specify the /l option, which leaves the files in place on the primary volume and secondary volume, and removes the shadow relationship. This is equivalent to the Volume Tasks > Remove Shadow Action Options > Remove Shadow option in Novell Remote Manager.

When the /l option is not used, the command attempts to move all files on the secondary volume to the primary volume, and then removes the shadow relationship between the two volumes. Ensure that the primary volume has sufficient space to accommodate the files before you unmount the volume and issue the remove command. Moving the files can take some time, depending on how much data must be moved. If a file move fails, the unlinking of the shadow relationship also fails. You can use the /i option to ignore file move errors and allow the unlinking to succeed. After the files on the secondary volume have been moved to the primary volume, the shadow relationship is removed, and a summary report is created and displayed.

OPTIONS  

primary_volumename

Specifies the volume name for the primary NSS volume, such as VOL1.

/l

Leaves the files in place on the two volumes and removes the shadow relationship.

/i

Ignores any file move errors that might occur if you issue the command without the /l option, and allows the unlinking of the shadow relationship to succeed.

For example, if there are duplicate files on the volumes, the duplicate instance on the secondary volume cannot be moved to the primary volume, and the shadow relationship cannot be unlinked. Using the /i option ignores the file move error and allows the relationship to be unlinked.

/f

Provides a full detail report of actions taken. Use this option to understand which file moves might be failing.

EXAMPLES  

Issue the following commands from the NCP Console, or add ncpcon at the front of the command when issuing it from a script or at a terminal console prompt.

ncpcon remove shadow_volume /i /f VOL1

Removes the shadow relationship for shadow volume VOL1, and moves all files from the secondary storage area to the primary storage area. You must dismount VOL1 before you issue this command. File move errors are ignored. Full details of the actions taken are reported.

remove shadow_volume /l VOL1

Removes the shadow relationship for shadow volume VOL1, and leaves files where they currently are on the secondary storage area and the primary storage area. You must dismount VOL1 before you issue this command.

shadow <primary_volumename> operation=<lp | ls | mp | ms> [options]

Allows you to list files on the shadow volume, or to move files between the primary storage area and the secondary storage area based on specified criteria. All files on the selected shadow volume that match the criteria are moved. Use the command from within cron jobs to automate data partitioning.

OPERATION OPTIONS  

lp

Lists primary files. Lists all files currently residing on the primary storage area.

ls

Lists shadow files. Lists all files currently residing on the secondary storage area.

mp

Moves files to primary. Moves files that match the specified criteria to the primary storage area from the secondary storage area.

ms

Moves files to shadow. Moves files that match the specified criteria to the secondary storage area from the primary storage area.

OPTIONS  

primary_volumename

Specifies the volume name for the primary NSS volume, such as VOL1.

pattern="searchPattern"

Specifies the file pattern to match against.

owner="username.context"

Specifies the Novell eDirectory user name and context of the owner of the files to match against.

uid=uidValue

Specifies the Linux user ID to match against.

time=[time_field]

Specifies which time field to match against, where the time_field is:

[m][a][c]
  • m: Last time modified (content)

  • a: Last time accessed

  • c: Last time changed (metadata)

range=[time_period]

Specifies which time period to match against, where the time_period is:

[a][b][c][d][e][f][g][h][i][j]
  • a: Within last day

  • b: 1 day to 1 week

  • c: 1 week to 2 weeks

  • d: 2 weeks to 1 month

  • e: 1 month to 2 months

  • f: 2 months to 4 months

  • g: 4 months to 6 months

  • h: 6 months to 1 year

  • i: 1 year to 2 years

  • j: More than 2 years

size=[size_differential]

Specifies the size differential to match against, where the size_differential is:

[a][b][c][d][e][f][g][h][i][j][k]
  • a: Less than 1 KB

  • b: 1 KB to 4 KB

  • c: 4 KB to 16 KB

  • d: 16 KB to 64 KB

  • e: 64 KB to 256 KB

  • f: 256 KB to 1 MB

  • g: 1 MB to 4 MB

  • h: 4 MB to 16 MB

  • i: 16 MB to 64 MB

  • j: 64 MB to 256 MB

  • k: More than 256 MB

output="filename"

Outputs the search results to the specified file.

EXAMPLES  

shadow VOL1 operation=ls pattern="*.exe"

Lists all files of type EXE that currently reside on the secondary storage area for the shadow volume VOL1.

shadow VOL1 operation=lp size=g

Lists all files of sizes between 1 MB to 4 MB that currently reside on the primary storage area for the shadow volume VOL1.

shadow VOL1 operation=ms time=m range=j

Moves all files on the primary storage area that have not been modified in more than two years from the primary storage area to the secondary storage area for the shadow volume VOL1.

shift "primary_volumename:\path\filename" [primary | shadow]

Returns the specified file’s location as being on the primary storage area or secondary storage area. Specify the primary or secondary options to move the specified file from its current location to the specified storage area.

IMPORTANT:The shift command works only at the command line, and not in ncpcon interactive mode. Enter the command as the root user at a terminal console prompt.

OPTIONS  

primary

Moves the specified file from the secondary storage area to the primary storage area. The file must be closed when you issue the command; otherwise, the command fails.

shadow

Moves the specified file from the primary storage area to the secondary storage area. The file must be closed when you issue the command; otherwise, the command fails.

EXAMPLES  

Enter the commands as the root user at a terminal console prompt.

ncpcon shift VOL1:"path\textfile.txt"

Shows the specified file’s storage area location in the shadow volume as primary (the primary storage area) or shadow (the secondary storage area) for the shadow volume sys.

ncpcon shift VOL1:"path\textfile.txt" primary

Moves the specified file’s storage area location from the secondary storage area to the primary storage area for the shadow volume sys.

ncpcon shift VOL1:"path\textfile.txt" shadow

Moves the specified file’s storage area location from the primary storage area to the secondary storage area for the shadow volume sys.