Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Need Guidance on an AMD Geode LX800 System
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43213
Location: 56N 3W

PostPosted: Sat May 02, 2015 2:07 pm    Post subject: Reply with quote

dab_s_bad,

If you make the LV holding the filesystem bigger, you can use resize2fs to make the filesystem fill the bigger LV.
This works with the filesystem mounted and in use too.

Shrinking is harder.
First you must shrink the filesystem, then you can shrink the LV.
Take care as there are no checks that the LV is bigger than the filesystem, until you try to mount it next.
If the filesystem is too big for the LV, it won't mount and may get damaged, as you can allocate the extra space to another LV.

The initrd, short for Inital RAM Drive is a small root filesystem that is used to hold the code required to mound the real root filesystem.
It may or may not contain kernel modules. That depends on how you make your kernel.

I have root on LVM on top of raid5. Te kernel can neither assemble the raid, nor read LVM so I must have mdadm and LVM available before the kernel can even see my root filesystem. As mdadm and LVM are userspace tools. They have to go into the initrd.

The boot process is grub loads the kernel and initrd, then jumps to the kernel.
The kernel starts up and mounts the initrd as its root filesystem. Now it can use mdadm and LVM. The init script in the initrd tells how to assemble the raid, start the LVM and mount the real root filesystem. More details ...
Don't try to follow the initrd set up, its out of date and won't work exactly as is but the concepts have not changed.

You can actually put a whole working distro in the initrd. A few firewall distros do that. The Gentoo minimal CD can run from RAM but thats not quite the same. Also see Tinhat Linux, which is Gentoo based.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
dab_s_bad
n00b
n00b


Joined: 08 May 2008
Posts: 54
Location: Toledo City, Cebu, Philippines

PostPosted: Sat May 02, 2015 2:29 pm    Post subject: Reply with quote

thank you sir,

let me read those things, again, many thanks ^_^
Back to top
View user's profile Send private message
dab_s_bad
n00b
n00b


Joined: 08 May 2008
Posts: 54
Location: Toledo City, Cebu, Philippines

PostPosted: Sat May 02, 2015 2:52 pm    Post subject: Reply with quote

er, to add, if I don't have LV, can I resize ext4? or really need LVM for me to enable shrink/resize?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43213
Location: 56N 3W

PostPosted: Sat May 02, 2015 5:00 pm    Post subject: Reply with quote

dab_s_bad,

Without the filesystem being is a logical volume (LV) you must first make the partition holding the filesystem bigger.
Then you can grow the filesystem to fit the new larger partition size.

Resizing partitions is not usually easy and may involve moving data around on the disk, which is risky.
Code:
lvresize -L+2G /dev/mapper/vg-packages
resize2fs /dev/mapper/vg-packages

with no reboot, no down time, adds 2G to /dev/mapper/vg-packages.

With LVM the space may not all be in one piece
Code:
$ sudo /sbin/lvdisplay /dev/mapper/vg-packages
Password:
  --- Logical volume ---
  LV Path                /dev/vg/packages
  LV Name                packages
  VG Name                vg
  LV UUID                iLeEkJ-qBP0-QZ5X-XDUv-8Yvu-E3xP-PR4qBo
  LV Write Access        read/write
  LV Creation host, time ,
  LV Status              available
  # open                 0
  LV Size                60.00 GiB
  Current LE             15360
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     768
  Block device           253:7
Segments 2 shows that this LV is in two parts on the drive.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum