Published using Google Docs
Documentació
Updated automatically every 5 minutes

Tasca 1: Muntatge i desmuntatge de dispositius en Linux. Automatització

1.1

Comanda mount

Us general de la comanda mount:

mount -t (tipus de dispositiu, fat, ext3, ext4, etc) (opcions) (dispositiu) (directori de destí)

Exemples:

mount -t ext3 -o rw /dev/hda2 /mnt/linux

mount -t vfat -o defaults /dev/hdb1 /mnt/windows

mount -t vfat -o rw /dev/floppy /mnt/disquet

mount -t iso9660 -o ro,exec /dev/hdc /mnt/cdrom

mount -t vfat -o rw /dev/sda1 /mnt/pendrive

-t: especificar el tipus d’archiu

-o: options adicionals com ro (read only), exec (permet executables), user (permisos per a qualsevol usuari), defaults (opcions per defecte: rw,suid,dev,exec,auto,nouser,async).

1.2

Muntatge i desmuntatge d’un disc dur

Afegim un disc dur:

mount

Busquem es seu nom a /dev:

mount1

Li donem format amb la comanda mkfs:

mount5

Desmontant-lo amb la comanda umount.

mount6

Creem una carpeta on montar-lo de nou:

mount10

El montem amb opcions de defecte a /mnt/dades.

mount7

1.3

Automatització d’un muntatge amb fstab

mount11

1.4

Opcions a l’archiu fstab

/dev/hdc /mnt/cdrom iso9660 ro,user,noauto,exec 0 0

Aquesta linea a fstab montaria el dispositiu /dev/hdc a la carpeta /mnt/cdrom amb el format iso9660 (estandar de format per CD-ROM) amb les opcions:

A més dump ignorará el sistema d’archius a l’hora de fer una copia de seguretat i fsck no el comprovará (fsck s’utilitza per comprovar problemes i reparar).

1.6

UUID

El UUID es un indentificador únic universal.

UUID en l’archiu fstab identifica el filesystem y la segona ruta del mateix.

Per veure les UUID podem fer un ls -l de la ruta /dev/disk/by-uuid.

mount8

O també amb la comanda blkid:

mount9

1.8

D-Bus i freedesktop.org

D-Bus es un sistema de programari que proporciona una forma simple de comunicació entre diverses aplicacions, desenvolupat com a part del projecte freedesktop.org.

Freedesktop.org es un projecte que treballa en la interoperabilitat i la compartició de la tecnologia base dels entorns d’escriptori, tant per GNU/Linux com en altres SO Unix-like.

1.9

UDISKS

Muntar i desmuntar amb udisks. Comandes udisksctl mount -b (dispositiu)

Per el que he pogut comprovar utilitza la ruta de muntatge del archiu fstab.

mount12

Tasca 2: Muntatge i desmuntatge de dispositius en Windows. Automatització.

BASIC AND DYNAMICS DISKS.

Before partitioning a drive or getting information about the partition layout of a drive, you must first understand the features and limitations of basic and dynamic disk storage types.

For the purposes of this topic, the term volume is used to refer to the concept of a disk partition formatted with a valid file system, most commonly NTFS, that is used by the Windows operating system to store files. A volume has a Win32 path name, can be enumerated by the FindFirstVolume and FindNextVolume functions, and usually has a drive letter assigned to it, such as C:. For more information about volumes and file systems, see File Systems.

In this topic:

There are two types of disks when referring to storage types in this context: basic disks and dynamic disks. Note that the storage types discussed here are not the same as physical disks or partition styles, which are related but separate concepts. For example, referring to a basic disk does not imply a particular partition style—the partition style used for the disk under discussion would also need to be specified. For a simplified description of how a basic disk storage type relates to a physical hard disk, see Disk Devices and Partitions.

Basic Disks

Basic disks are the storage types most often used with Windows. The term basic disk refers to a disk that contains partitions, such as primary partitions and logical drives, and these in turn are usually formatted with a file system to become a volume for file storage. Basic disks provide a simple storage solution that can accommodate a useful array of changing storage requirement scenarios. Basic disks also support clustered disks, Institute of Electrical and Electronics Engineers (IEEE) 1394 disks, and universal serial bus (USB) removable drives. For backward compatibility, basic disks usually use the same Master Boot Record (MBR) partition style as the disks used by the Microsoft MS-DOS operating system and all versions of Windows but can also support GUID Partition Table (GPT) partitions on systems that support it. For more information about MBR and GPT partition styles, see the Partition Styles section.

You can add more space to existing primary partitions and logical drives by extending them into adjacent, contiguous unallocated space on the same disk. To extend a basic volume, it must be formatted with the NTFS file system. You can extend a logical drive within contiguous free space in the extended partition that contains it. If you extend a logical drive beyond the free space available in the extended partition, the extended partition grows to contain the logical drive as long as the extended partition is followed by contiguous unallocated space. For more information, see How Basic Disks and Volumes Work.

The following operations can be performed only on basic disks:

Dynamic Disks

Dynamic disks provide features that basic disks do not, such as the ability to create volumes that span multiple disks (spanned and striped volumes) and the ability to create fault-tolerant volumes (mirrored and RAID-5 volumes). Like basic disks, dynamic disks can use the MBR or GPT partition styles on systems that support both. All volumes on dynamic disks are known as dynamic volumes. Dynamic disks offer greater flexibility for volume management because they use a database to track information about dynamic volumes on the disk and about other dynamic disks in the computer. Because each dynamic disk in a computer stores a replica of the dynamic disk database, for example, a corrupted dynamic disk database can repair one dynamic disk by using the database on another dynamic disk. The location of the database is determined by the partition style of the disk. On MBR partitions, the database is contained in the last 1 megabyte (MB) of the disk. On GPT partitions, the database is contained in a 1-MB reserved (hidden) partition.

Dynamic disks are a separate form of volume management that allows volumes to have noncontiguous extents on one or more physical disks. Dynamic disks and volumes rely on the Logical Disk Manager (LDM) and Virtual Disk Service (VDS) and their associated features. These features enable you to perform tasks such as converting basic disks into dynamic disks, and creating fault-tolerant volumes. To encourage the use of dynamic disks, multi-partition volume support was removed from basic disks, and is now exclusively supported on dynamic disks.

The following operations can be performed only on dynamic disks:

TASCA 2:

  1. Create a new simple volume

2. Mount it in a follow empty folder inside C:\

3. Once the volume is created succesfully, we can change it properties right clicking on the volume created and then go to security-permissions to modify the permissions of the users.

Tasca 3: Eines d'administració de discos en Windows: Diskpart

La meva tasca consisteix en aprendre i gestionar volums i particions de windows mitjançant el Diskpart.

(primer vaig estar la majoria dels dies pasan el rato)Primerament vaig crear un disc dins el windows

Tasca 4: Eines d'administració de discos en Linux

És una comanda que permet administrar les particions del disc.

Per crear una partició primer afegim un altre disk sobre el qual hi farem les proves. Un cop dintre l’Ubuntu en la terminal s’executa el comandament sudo fdisk /dev/sda per especificar el disk sobre el qual es farà la partició, seguidament, s’obrirà tot un “menú del comandament” on només s’ha dintroduir l’ordre que es vol que es dugui a terme.

Un cop dintre s’executa el comandament g per crear una taula de particions i amb el p les poden veure totes les particions.

Per crear una partició s’ha de fer servir el comandament n, un seleccionat, et deix escollir si vols que sigui una partició primària (p) o estesa (e). Un cop seleccionat s’ha d’especificar el número de la partició, el sector on es vol que comenci i en el que es vol que acabi.

Per eliminar alguna partició s’ha de fer servir el comandament d i s’ha d’especificar quina partició es vol esborrar.

Per guardar els canvis realitzats s’ha de fer servir el comandament w.

Es utilitzat per crear un sistema de fitxers en una partició buida d’un sistema Linux. El paràmetre és el nom del dispositiu (per exemple /dev/hda1, /dev/sdb2) o un fitxer que contindrà el sistema de fitxers, la mida és el nombre de blocs que utilitza el sistema de fitxers.

Per crear un sistema Ext4 en una partició primària s’ha de fer servir el comandament sudo mkfs.ext4 -b 1024 /dev/sdb1 on el -b 1024 és el nombre de bits que ocuparà, l’sdb és el disk en el qual és farà i l’1 es en la partició del disk en la que és farà.

aquest pas també és pot fer amb el comandament #mkfs -t ext4 /dev/sdb1.

S’utilitza per comprovar el sistema de fitxers ext2, ext3 i ext4, verifica que no hi hagi cap error en els blocs del sistema i les repara si és necessari.

Per verificar l’estat del sistema s’ha d’utilitzar el comandament sudo e2fsck  /dev/sdb1 on sdb1 indica que s’examinarà la partició 1 del disk b.

En aquest exemple es veu com no hi ha cap error en la primera partició del disk b.

Journal

Un Journal és un log, una gravació seqüencial en un registre (ja sigui en un fitxer o en una base de dades ) de tots els esdeveniments que afecten a un procés en particular. D’aquesta manera és crea un registre del comportament del sistema.

La majoria de logs s’emmagatzemen en un text sense format o en xml, d’aquesta manera poden ser fàcilment llegits i processats. No obstant altres vegades es constitueixen directament sobre el dispositiu utilitzant camps magnètics i plusos electrònics que poden ser recol·lectats i llegits amb eines i tècniques especials.

La Self Monitoring Analysis and Reporting Technology consisteix en la detecció anticipada de falles en el disc dur per tal de poder realitzar còpies del seu contingut o poder-lo reemplaçar abans de que es produeixi una pèrdua de dades irreversible. Aquest tipus de tecnologia ha de ser compatible amb la BIOS de l’equip, estar activada i que el propi disc dur la suporti.

La tecnologia SMART monitoritza els diferents paràmetres del disc com la velocitat dels plats, sectors defectuosos, errors de calibració, distàncies entre capçal i plat, la temperatura del disc, etc. Quan es produeix un error la BIOS avisa mitjançant un missatge que apareix en pantalla, en aquest moment, és quan l’usuari pot realitzar la còpia de seguretat del disc o intentar reparar-lo.

Els discs virtuals de VirtualBox presenten tecnologia SMART però no pot suportar-la perquè la seva BIOS està virtualitzada.

https://es.wikipedia.org/wiki/Fdisk

http://es.ccm.net/faq/10941-linux-el-comando-fdisk

http://www.howtogeek.com/106873/how-to-use-fdisk-to-manage-partitions-on-linux/

http://unix.stackexchange.com/questions/120734/blocks-column-in-output-of-fdisk

https://en.wikipedia.org/wiki/Cylinder-head-sector#Blocks_and_clusters

http://es.ccm.net/faq/10941-linux-el-comando-fdisk

http://www.computerhope.com/unix/mkfs.htm

http://www.linfo.org/mkfs.html

https://www.servidoresadmin.com/comando-linux-mkfs/

http://www.thegeekstuff.com/2013/01/mke2fs-examples

https://www.unixtutorial.org/2014/07/how-to-use-mkfs/

http://manpages.ubuntu.com/manpages/xenial/man8/e2fsck.8.html

https://es.wikipedia.org/wiki/Journaling

https://es.wikipedia.org/wiki/S.M.A.R.T.

WEBGRAFIA POL

https://www.howtogeek.com/school/using-windows-admin-tools-like-a-pro/lesson4/

https://www.partitionwizard.com/dynamicdisk/spanned-volume.html

https://ioc.xtec.cat/materials/FP/Materials/2251_ASIX/ASIX_2251_M01/web/html/WebContent/u6/a2/continguts.html

WEBGRAFIA TASCA 1:

http://blog.desdelinux.net/auto-montar-particiones-con-fstab/

http://www.nexolinux.com/ejemplos-usos-mount-y-umount/

https://just4cool.wordpress.com/2009/02/19/conociendo-el-fstab-y-sus-opciones/

https://wiki.archlinux.org/index.php/Fstab_(Espa%C3%B1ol)