Jump to content
aelius

[Linux] Etichetarea partitiilor ext3, ext4

Recommended Posts

Posted

In acest scurt tutorial am sa va arat cum puteti eticheta partitiile ext4 (disk label). De exemplu, am un HDD extern (USB) si cand il conectez la un laptop cu debian, aceasta se monteaza automat in '/media/<DISK-UUID>'.

Exemplu:


root@hp:~# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 291G 268G 8.6G 97% /
udev 10M 0 10M 0% /dev
tmpfs 302M 736K 301M 1% /run
/dev/disk/by-uuid/e63117ce-c47f-48c6-afdc-74006b6a7b03 291G 268G 8.6G 97% /
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 1.2G 31M 1.2G 3% /run/shm
/dev/sdb1 459G 195G 241G 45% /media/7f11a5cd-8fad-4af7-b716-8886e7f5376c

Dupa cum puteti vedea, partitia de care este vorba se numeste '/dev/sdb1' si este mountata in '/media/7f11a5cd-8fad-4af7-b716-8886e7f5376c' pentru ca nu are niciun fel de label.

Mai jos voi adauga un label acestei partitii cu e2label. Acest tool face parte din pachetul e2fsprogs


root@hp:~# e2label /dev/sdb1 STORAGE

La urmatorul mount, partitia a fost mountata automat in '/media/STORAGE'

Exemplu:


root@hp:~# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 291G 268G 8.5G 97% /
udev 10M 0 10M 0% /dev
tmpfs 302M 736K 301M 1% /run
/dev/disk/by-uuid/e63117ce-c47f-48c6-afdc-74006b6a7b03 291G 268G 8.5G 97% /
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 1.2G 28M 1.2G 3% /run/shm
/dev/sdb1 459G 195G 241G 45% /media/STORAGE
root@hp:~#

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...