Know the properties and attributes assigned to the disk,partition and volume using Dispart tool

When a disk or volume is initialed some properties and attributes are assigned to it. 

The Operating system and partition manager reads the properties  and attributes before accessing the files in it. The attributes assigned to a disk or volume helps the operating system to decide what operations allowed on it and what is prohibited.

 

System config :

  • Microsoft Windows 10 x64
  • Powershell
  • Diskpart tool
 


Run diskpart tool in Window OS :

  • Start PowerShell tool with Administrative level access.
  • Type and run the command Diskpart.






Show the properties of a disk using Diskpart tool

Detail disk command is used to show the properties of the disk.

To show the properties of a disk user must first select the disk using select disk command.


To show the properties of a disk, do the followings:
  • To show the list of all the disk which is attached to the computer type and run the command list disk. This will show the list of disk attached to the computer and the number assigned to the disk.
  • To select a disk with number assigned to it is 0, type and run the command select disk=0
  • To show the properties of the disk type and run the command detail disk. it show various properties of the disk and a list of volumes in the partition.






detail disk command will show various properties of the disk.

Disk ID : it shows a unique identification number assigned to the disk.
 
Type : It show the type of interface.
 
Status
The status of the disk is of two types.  
  • Online : Online status indicates that the content of the disk is accessible.
  • Offline : Offline status indicates that the content of the disk is not accessible.
 
Ready Ónly

Yes indicates that the disk has been attributed as read only. When the disk is in ready only mode it is only allowed to read the information about the volume. 


Various operations cannot be done on the volumes in the disk which has been set as ready only. Operation which are not allowed on a volume are :
  • Covert the disk from MBR to GPT and vice versa.
  • Format a volume.
  • Creation and deletion of the volume.
  • Change the label of a volume.
  • Shrink the volume.
  • Extend the volume.
  • Change attributes of the volume.
  • Modification of deletion of the files stored in the volume.




Boot disk
Yes indicates that the disk has been attributed as a boot disk containing operating system files.
No indicates that the disk does not contain operating system files.



Pagefile disk
Yes indicates that the disk is used to store the page file.
No indicates that the disk is not used to store the page file.

Hibernation File Disk
Yes indicates that the disk is used to store the hibernation file.
No indicates that the disk is not used to store the hibernation file.


Crashdump disk
Yes indicates that the disk is used to store the Operating System crashdump files.
Yes indicates that the disk is not used to store the Operating System crashdump files.
 
Clustered disk
Yes indicates that the disk is part of the clustered disk.


Disk detail command also shows the 
  1. list of volumes in the disk and the number assigned to the volumes.
  2. Drive letter assigned to the volume.
  3. The label assigned to the volume.
  4. The file system of the volume.
  5. The type of volume.
  6. The size of the volume.
  7. The status of the volume which indicates whether the volume is healthy or not.




Show the properties of a volume using Diskpart tool

Detail volume command can be used to show the properties of the volume. To use this command user must first select a volume using select volume command.


To show the properties of a volume, do the followings:
  • To show the list of all the volumes in the computer type and run the command list volume. It will show the list of volumes in the computer and the number assigned to it. It will also show the Drive letter and Label assigned to the volumes.  These information's are useful  to user in correctly identifying a volume in which the user want to do certain operations.
  • To select a volume which has been assigned a volume number 5, type and run the command select volume=5.
  • To show the properties of the volume type and run the command detail volume.






Detail volume command show various information about the volume. 
It shows the disk in which the volume is located.

Read-only

Read only attributes show whether the volume has been set as read only or not.

  • Yes indicates that only read operation is allowed with the files stored the volume. It is not allowed to modify or delete the files in the volume. It is not allowed to format or change the layout of the volume.
  • No indicates that all the operation is allowed with the files stored the volume.


Hidden


  • No : It indicates that the volume is visible.
  • Yes : It indicates the files in the volume are not visible.


No default Drive Letter

  • No :  It indicates that drive letter should be assigned by the Operating system when the volume is found.
  • Yes :  It indicates that a drive letter should not be assigned by the operating system.


Offline

  • No : It indicates the the volume is online and the files in the volume is accessible for read and write operations.
  • Yes :  It indicates the the volume is offline and the files in the volume is not accessible for read and write operations.

Bitlocker Encrypted

  • No : It indicates that the volume is not encrypted with bitlocker app.
  • Yes :  It indicates that the volume is encrypted with bitlocker app.



Protecting files in a volume using read-only attribute

The read only attribute is useful in protecting the files from accidental deletion or modification. To protect important files user can create a separate volume where the files will be stored. The user can change the attribute of the volume to read-only.
 
 
To protect the volume do the followings:
  • Run diskpart tool in Powershell with Administrative level access.
  • Type and run the command list volume to show the list of volumes.
  • To select a volume which will be protected type and run the command select volume=3. Replace the volume number with the .
  • Type and run the command attributes volume set readonly. This command will set the readonly attribute in the selected volume.





To see the attributes of the volume type and run the command attributes volume.







To remove the protection from the volume do the followings:
  • Run Powershell with Administrative level access.
  • Type and run the command diskpart.
  • Type and run the command list volume to show the list of volumes.
  • To select a volume which will be protected type and run the command select volume=3. Replace the volume number with the .
  • Type and run the command attributes volume clear readonly. This command will remove the readonly attribute from the selected volume.








Hide a volume


Using the diskpart tool user can hide a volume by using the attribute named hidden. The volume will not be visible to the most of the software's. It can be used to protect the files in a volume by keeping it hidden from view.

Hidden attributes cannot be assigned to removable drives.


To hide a volume, do the followings:
  • Run Powershell tool with Administrative level access.
  • Type and run the command diskpart.
  • Type and run the command list volume to show the list of volumes.
  • To select a volume which will be hidden type and run the command select volume=2. Replace the volume number with the number assigned to the volume which you want to hide.
  • Type and run the command attributes volume set hidden.





To remove the hidden attribute from a volume, do the followings:
  • Run Powershell tool with Administrative level access.
  • Type and run the command diskpart.
  • Type and run the command list volume to show the list of volumes.
  • To select a volume which will be hidden type and run the command select volume=2. Replace the volume number with the number assigned to the volume which is hidden.
  • Type and run the command attributes volume clear hidden.











إرسال تعليق

Post a Comment (0)

أحدث أقدم