Lab 5 is due two weeks from tomorrow, Thursday before midnight, this is the break week its due.
Dealing with directories on unix and linux, we have a problem with size or space, this is is the old way on how to do this
A hard drive sda, you have three partitions, sda1, sda2, sda3, you could have had swap, /boot, /, 500, 300, 5g, we are looking at the sda3 5g it is the root partition is contains a file system, so he has the root directory he has /etc /usr /lib, after we format is its ext3 file system, its taking up the whole 5 gigs, take sup all the space in the container.
Mkfs –t ext3 /dev/sda3
In rescue mode you can format it,
We have a physical partitions and inside th partition we have a filing system, what happens when it gets full, In the old days you would go into fdisk /dev/sda, in fdisk you would d 3, its gone, your just deleting the partition table, not the fs out their, the new 3 now its gone, then you would put 6 gig then you would put write if you were to reboot the system you would still have the fs in their but its not using the full 6 but the 5, after that you reboot, you do the df command you see the root partition is 5g, you can now resize2fs /dev/sda3 , made for ext2/3 fs, when you resize this you are getting more space put into the filing system.
1.fdisk /dev/sda
D3
N3
6gb
W
2.reboot
Df
Resize2fs /dev/sda3
Expand your filing system to use the whole partition.
You can also resize it down, to make it smaller
1.resize2fs
Smaller
-3g
2.fdisk
Shrink partition
D3
N3
3gb
^^ this is an old method that is obsolete
Logical Volume Management Lab5
Take your home directory and make is into a logical volume,
Sda
1
2
3
Make 4 – extended partition, inside four make 5 and 6
You can take sda5 and sda6
1g 2g ----physical partitions
You can combine them into one volume group, called Seneca. 1 VOLUME GROUP
Seneca Represents 3g cause its 1 and 2, now that youhave a
VG you can make Logical Partitions,
Make 3g home , how to make this larger you can throw another drive in, sdb1 and sdb2, partition it with fdisk, you can add sdab1 into Seneca, you can –add the physical partition in the volume group and extend home 10g, this is done live.
You can use the home (logical volume) as a partition.
Going over the Lab,
First command 5 6 unused
Physical volume create
Pvcreate
Volume group create
No comments:
Post a Comment