From 8a7c0b67f53e3d77158d472a577679796d2b957b Mon Sep 17 00:00:00 2001
From: Silvino Silva
Basic idea behind RAID is to deal with independent disks - as an array of drives. Raid 0 uses two or more disks as one, - with performance gains without fault-tolerance. From raid 1 - to 6 they offer diferent fault tolerance mechanisms.
-LVM or Logic Volume Manager bring one more layer, read Lvm made easy. Partitions under lvm are easy to be resized, moved and there is @@ -28,6 +23,12 @@ disk names exp; production, development, backups...
+Basic idea behind RAID is to deal with independent disks + as an array of drives. Raid 0 uses two or more disks as one, + with performance gains without fault-tolerance. From raid 1 + to 6 they offer diferent fault tolerance mechanisms.
+ +Until now "from install" there is only one partition, it is good idea to have a system with diferent partitions for each propos. If is a "fresh install";
@@ -127,7 +128,7 @@ # -$ sudo modprobe nbd - $ sudo qemu-nbd -c /dev/nbd0 /crux-img.qcow2 + $ sudo qemu-nbd -c /dev/nbd0 crux-img.qcow2
Information about preparing @@ -124,6 +124,67 @@ $ sudo qemu-nbd -d /dev/nbd0 +
Verify disk image information;
+ ++ $ qemu-img info c1-storage.qcow2 ++ +
+ image: c1-storage.qcow2 + file format: qcow2 + virtual size: 10G (10737418240 bytes) + disk size: 7.6G + cluster_size: 65536 + Format specific information: + compat: 1.1 + lazy refcounts: false + refcount bits: 16 + corrupt: false + $ ++ +
In this example is added 25G to the image;
+ ++ $ qemu-img resize c1-storage.qcow2 +25G ++ +
Read lvm resize if image + is using lvm, or use resize2fs. If size is not provided to resize2fs, + by default it will grow file system to all partition;
+ ++ $ sudo qemu-nbd -c /dev/nbd0 /srv/qemu/img/c1-server.qcow2 ++ +
+ # kpartx -a -s -l -u /dev/nbd0 + GPT:Primary header thinks Alt. header is not at the end of the disk. + GPT:Alternate GPT header not at the end of the disk. + GPT: Use GNU Parted to correct GPT errors. + + # parted /dev/nbd0 + GNU Parted 3.2 + Using /dev/nbd0 + Welcome to GNU Parted! Type 'help' to view a list of commands. + (parted) print + Warning: Not all of the space available to /dev/nbd0 appears to be used, you can + fix the GPT to use all of the space (an extra 16777216 blocks) or continue with + the current setting? + Fix/Ignore? Fix + + (parted) resize 3 100% + (parted) quit ++ +
+ # resize2fs /dev/mapper/nbd0p3 + # e2fsck /dev/mapper/nbd0p3 ++
Network configuration;
@@ -164,7 +225,7 @@ ADDR=10.0.0.254 NET=10.0.0.0 - GW=192.168.1.254 + GW=10.0.0.1 MASK=24 # one tap for each cpu core diff --git a/tools/storage.html b/tools/storage.html index 109c6fa..2fc95d4 100644 --- a/tools/storage.html +++ b/tools/storage.html @@ -9,7 +9,7 @@SMART provides statistics of disk firmware, this system handle errors has their occur. Badblocks detect bad blocks @@ -30,14 +30,14 @@
Temp partition with 20M-50M; +
Temp partition with 20M-50M;
(parted) mkpart primary ext4 4000MiB 4050MiB
Ports partition with 120G allows to host sources, package - backups and ports; + backups and ports;
(parted) mkpart primary ext4 192000MiB 312000MiB @@ -78,6 +78,17 @@Reboot in normal mode.
+2. Resize filesystem
+ +If partition is using lvm read + lvm resize, if you are using qemu + images read resize images
+ ++ # resize2fs /dev/sda3 + # e2fsck /dev/sda3 ++ Tools IndexThis is part of the c9-doc Manual. -- cgit 1.4.1-2-gfad0