How to interpret / manage USB disk space

Booting, installing, newbie
Post Reply
Message
Author
rberke
Posts: 9
Joined: Sat 08 Mar 2008, 12:33

How to interpret / manage USB disk space

#1 Post by rberke »

I have my Puppy 4.3.1 running from my 1GB USB stick. My PC has 2 GB RAM. I need help to understand how Puppy uses RAM versus writeable disks such as my configured USB stick.

During installation I selected EXT3 for the whole drive. Puppy asked me how large I wanted a space for saving my files. I chose 256M, but don't know if that's a good choice. Most of what I will use Puppy for will be with files on other systems. I'm sure my settings don't take much space, but I do want some reasonable room for photos. When I someday want to download other Puppy packages, I would want room for them, too. Do all downloads have to fit into my 256M area? How would I be able to use all the USB stick's capacity?


Here's what I stumbled upon to show the drive usage contents:

# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb1 986700 391300 545276 42% /initrd/mnt/dev_save
/dev/loop1 253871 12243 241628 5% /initrd/pup_ro1
tmpfs 1037228 41892 995336 5% /initrd/pup_rw
tmpfs 86100 85100 1000 99% /initrd/mnt/tmpfs
/dev/loop0 85120 85120 0 100% /initrd/pup_ro2
tmpfs 23752 22752 1000 96% /initrd/mnt/tmpfs2
/dev/loop3 22784 22784 0 100% /initrd/pup_z
unionfs 1037228 41892 995336 5% /
#


It looks like /dev/loop1 is where that 256M was applied.
It looks like /dev/sdb1 is the whole stick.

I'm confused about what runs only in RAM, and what uses areas on the USB stick's structures.

Here's my mount results:
# mount
rootfs on / type rootfs (rw,relatime)
/dev/sdb1 on /initrd/mnt/dev_save type ext3 (rw,noatime,errors=continue,data=writeback)
/dev/loop1 on /initrd/pup_ro1 type ext2 (rw,noatime,errors=continue)
tmpfs on /initrd/pup_rw type tmpfs (rw,relatime)
tmpfs on /initrd/mnt/tmpfs type tmpfs (rw,relatime,size=86100k)
/dev/loop0 on /initrd/pup_ro2 type squashfs (ro,noatime)
tmpfs on /initrd/mnt/tmpfs2 type tmpfs (rw,relatime,size=23752k)
/dev/loop3 on /initrd/pup_z type squashfs (ro,noatime)
unionfs on / type aufs (rw,relatime,si=781099ae)

I think what I'm having trouble with is Linux/Unix filesystem versus devices. The main experience for me over 20+ years has been with the Microsoft drive-letters for devices, and directories under them. I'm familiar with reaching network drives with mapped drive letters, and UNC naming. I've used SUBST to have drive letters refer to directories (sort of like a link, but only valid within the current session.)

Please point me to some docs about this. I expect that I'm asking a FAQ, but I just haven't found the right explanation.

Thanks,
Richard
User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#2 Post by mikeb »

As you are....
pup_4xx.sfs is loaded into ram..the core of puppy and the included apps.

tmpfs 1037228 41892 995336 5% /initrd/pup_rw
is a ram based operating area...the contents are periodically copied down to the pup_save which becomes your permanant storage on the flash stick..itself is not loaded to ram.

Access to the rest of the stick is at /initrd/mnt/dev_save which has a link from /mnt/home.

If you store data outside the puppy filesystem then 256MB should be fine..that's what I use...it can be resized if needed.

hope that helps

mike
rberke
Posts: 9
Joined: Sat 08 Mar 2008, 12:33

Choice / benefits of USB disk space

#3 Post by rberke »

I can see now that there is a mount point for all of the USB at SDB1 at /initrd/mnt/dev_save. A link makes it easier to access as /mnt/home. I guess I'm confused about the purpose of the 'root' directory, and how it relates to 'home'. Should they be the same thing?

I'm still not clear about when to configure a much bigger Puppy save file, or aim other types of saving to the rest of the USB.

Firefox saves cache files where?
How about downloaded explicit files?
Where do Puppy packages of applications files get stored? (use up space.)

Are all of those within the Puppy save file, or just general areas on the USB stick?

I'm not fussing about where they are. I'm just trying to understand so I don't make foolish assumptions or mistakes.

Thanks,
Richard
User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#4 Post by mikeb »

Ok

the folder /root is your home directory as with puppy you are user 'root'...the equivilant of being administrator on windows.

the /mnt/home is as you know the physical partition wher your puppy files are stored....the name is a little confusing definately. Anything stored here is in the real flash stick rather than in the virtual filesystem which is a layering of pup_4xx.sfs, the ram disk at /initrd/pup_rw and the pup_save.2fs file.

Make a bigger pup_save using the wizard from the menu when its getting full..most likely if you add software....
Downloaded files are by default into your home folder /root ...these would end up in the pup_save so filling it up..I tend to use that space as temporary storage and move wanted items out to say /mnt/home or to a hard drive or whatever...or choose to download there directly....getting used to the file layout does take a little time.

/root/.mozilla (hidden..click the eye) is the firefox profile location...I personally set the cache to 0 as I have broadband....the antiphishing files get large..you may wish to disable this feature. Some people move their profile to out of the pup_save and link it back....drag, drop and link makes those..very useful generally so get used to making them.

Packages get extracted and installed into the puppy file system so would reside in the pup_save...the package itself is temporarily downloaded/moved to /root/.packages but is deleted afterwards.

So in summary everything happens in the puppy file system unless you choose otherwise in order to limit pup_save usage.

mike

edit
/dev/loop1 253871 12243 241628 5% /initrd/pup_ro1
is the one to keep an eye on for pup_save usage though you should get a warning if its full
Try
df -h
for a better readout :)
rberke
Posts: 9
Joined: Sat 08 Mar 2008, 12:33

My understanding is expanding....

#5 Post by rberke »

Thanks MikeB for the additional info in your reply post. Gives me some more to think about and examine.

Am I understanding correctly that there's nothing functionally wrong/bad with making a big Puppy save file if my USB has the room for it? Are the only negative trade offs that the save file has to be read at start up and written at save and shutdown, where as the other areas of the disk don't? If you read/write more, that takes more time. And the size of the read-in consumes RAM.

For less frequently needed things like photos or music, it seems silly to dredge the up and shove them back often. However, I have to remember to aim/store them correctly.


Thanks,
Richard
User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#6 Post by mikeb »

There is a misconception on here that a larger pup_save takes longer to load...it does not......saving time is related to how much has changed so is irrispective of pup_save size.
The only consideration is how much room you have for it.

mike
Post Reply