Mount /var as a ramdisk?

Hi, I'm going to install arch onto a compact flash card. To minimize writes to the card am I going to link /tmp to /var/tmp and create a ramdisk at boot for /var to be mounted in.
Do I have to recreate the /var file system in the boot process somehow or will this be created automatically?
Is there anything else I should think about?
Thanks!

Concerning pacman, looking at the manpage ,it's seems possible to chose where is stored the database:
CONFIG: OPTIONS
DBPath = path/to/db/dir
Overrides the default location of the toplevel database direc-
tory. The default is var/lib/pacman.
. But ialso thinks it will be hard to put the entire /var into a ramdisk.

Similar Messages

  • Cant mount /var at boot

    I am experiencing problem with our v480 server, as ocasionally it fails to boot and gives cant mount /var error and goes into single user mode. (Log file is attached below). Once this happens, it doesnt come back into runlevel 3 until it is completely powered off and on.
    I fixed the (ufs log for / changed state to Error ) message by removing the patch 113073-14 and making / as nologging in /etc/vfstab file. But the problem with not mounting /var still comes up. I am attaching the log file below with the ufslog error message included (which doesnt show up after patch removal).
    I am looking for any suggestions or hints, what would be causing this. Thanks a lot.
    Sun Fire 480R, No Keyboard
    Copyright 1998-2004 Sun Microsystems, Inc. All rights reserved.
    OpenBoot 4.13.0, 4096 MB memory installed, Serial ##
    Creating CPU memory layout properties.
    Initializing 1MB of memory at addr a0ffb92000 - Initializing 12MB of memory at addr a0ff002000 - Initializing 16MB of memory at addr a0fe002000 - Initializing 4064MB of memory at addr a000000000 \ | / - \ | / - Reading temperature limits from FRUPROMs: CPU0/2 BACKPLANE
    Environmental monitor is ON
    Rebooting with command: boot
    Boot device: disk File and args:
    Loading ufs-file-system package 1.4 04 Aug 1995 13:02:54.
    FCode UFS Reader 1.12 00/07/17 15:48:16.
    Loading: /platform/SUNW,Sun-Fire-480R/ufsboot
    Loading: /platform/sun4u/ufsboot
    | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ SunOS Release 5.9 Version Generic_117171-12 64-bit
    Copyright 1983-2003 Sun Microsystems, Inc. All rights reserved.
    Use is subject to license terms.
    | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / WARNING: Cannot create minor node for <JNI,FCR> <jnic146x> <0>
    Can't find clone devinfo node
    jnic146x0: Hba: JNI,FCR Model: FCE-6460-N
    jnic146x0: FCode: Version 3.9 [3505]
    jnic146x0: IRQ: 1 Channel: 1
    jnic146x0: SubVend: 1242 Sub: 6460 Rev: 100 Vend: 1242 Dev: 1460
    jnic146x0: WWNN: 100000017301494A WWPN: 200000017301494A
    jnic146x0: Auto-negotiating link speed
    jnic146x0: Configured as Fabric port
    jnic146x0: JNIC v5.2.1.HIT.M05 (03082100)
    jnic146x0: Copyright(c) 1995-2003 JNI Corp, All Rights Reserved.
    jnic146x0: Link Up: 2Gig
    jnic146x0: Port 010200 (WWN 50060E80004417B1:50060E80004417B1) online.
    jnic146x0: Port 010600 (WWN 50060E80004417B3:50060E80004417B3) online.
    jnic146x0: Network Port FFFC01 (WWN 100000051E341635:20FD00051E341635) available.
    WARNING: Cannot create minor node for <JNI,FCR> <jnic146x> <1>
    Can't find clone devinfo node
    jnic146x1: Hba: JNI,FCR Model: FCE-6460-N
    jnic146x1: FCode: Version 3.9 [3505]
    jnic146x1: IRQ: 1 Channel: 1
    jnic146x1: SubVend: 1242 Sub: 6460 Rev: 100 Vend: 1242 Dev: 1460
    jnic146x1: WWNN: 10000001730146A9 WWPN: 20000001730146A9
    jnic146x1: Auto-negotiating link speed
    jnic146x1: Configured as Fabric port
    jnic146x1: JNIC v5.2.1.HIT.M05 (03082100)
    jnic146x1: Copyright(c) 1995-2003 JNI Corp, All Rights Reserved.
    jnic146x1: Link Up: 2Gig
    jnic146x1: Port 010200 (WWN 50060E80004417B0:50060E80004417B0) online.
    jnic146x1: Port 010600 (WWN 50060E80004417B2:50060E80004417B2) online.
    jnic146x1: Network Port FFFC01 (WWN 100000051E344E7D:20FD00051E344E7D) available.
    jnic146x0: Target0: Port 010200 (WWN 50060E80004417B1:50060E80004417B1) online.
    jnic146x0: Target1: Port 010600 (WWN 50060E80004417B3:50060E80004417B3) online.
    jnic146x1: Target0: Port 010200 (WWN 50060E80004417B0:50060E80004417B0) online.
    jnic146x1: Target1: Port 010600 (WWN 50060E80004417B2:50060E80004417B2) online.
    jnic146x0: Target0: Lun0 present.
    jnic146x1: Target0: Lun0 present.
    jnic146x0: Target0: Lun1 present.
    jnic146x1: Target0: Lun1 present.
    jnic146x0: Target0: Lun2 present.
    jnic146x1: Target0: Lun2 present.
    jnic146x0: Target0: Lun3 present.
    jnic146x1: Target0: Lun3 present.
    jnic146x0: Target0: Lun4 present.
    jnic146x1: Target0: Lun4 present.
    jnic146x0: Target1: Lun0 present.
    jnic146x1: Target1: Lun0 present.
    jnic146x0: Target1: Lun1 present.
    jnic146x1: Target1: Lun1 present.
    jnic146x0: Target1: Lun2 present.
    jnic146x1: Target1: Lun2 present.
    jnic146x0: Target1: Lun3 present.
    jnic146x1: Target1: Lun3 present.
    jnic146x0: Target1: Lun4 present.
    jnic146x1: Target1: Lun4 present.
    WARNING: Error writing ufs log state
    WARNING: ufs log for / changed state to Error
    WARNING: Please umount(1M) / and run fsck(1M)
    VxVM sysboot INFO V-5-2-3390 Starting restore daemon...
    VxVM sysboot INFO V-5-2-3409 starting in boot mode...
    NOTICE: VxVM vxdmp V-5-0-34 added disk array DISKS, datype = Disk
    NOTICE: VxVM vxdmp V-5-0-34 added disk array D6001A6B, datype = HDS9500V
    configuring IPv4 interfaces: ce0 ce1.
    Hostname: beta23
    VxVM INFO V-5-2-3247 starting special volumes ( swapvol rootvol usr var opt )...
    Configuring /dev and /devices
    Configuring the /dev directory (compatibility devices)
    mount: /dev/vx/dsk/bootdg/var is already mounted, /var is busy,
    or the allowable number of mount points has been exceeded
    mount: mount-point /var/run does not exist.
    VxVM vxvm-startup2 INFO V-5-2-503 VxVM general startup...
    Dec 13 22:09:04 vxvm:vxconfigd: V-5-1-1589 enable failed: Error in disk group configuration copies
    Dec 13 22:09:04 vxvm:vxconfigd: Database file not found; transactions are disabled.
    VxVM vxvm-startup2 ERROR V-5-2-3656 Vold is not enabled for transactions
    No volumes started
    INIT: Cannot create /var/adm/utmpx
    INIT: failed write of utmpx entry:" "
    INIT: failed write of utmpx entry:" "
    INIT: SINGLE USER MODE

    Thank you so much for your response.
    This error doesnt occur in all boots, but once it occurs , we have to power off the machine and power back on and machine boots normally into run level 3 without this /var error. otherwise a simple reboot doesnt help and we get the same error.
    Here is the /etc/vfstab file, may be you can suggest further.
    #device device mount FS fsck mount mount
    #to mount to fsck point type pass at boot options
    fd - /dev/fd fd - no -
    /proc - /proc proc - no -
    /dev/vx/dsk/bootdg/swapvol - - swap - no -
    /dev/vx/dsk/bootdg/rootvol /dev/vx/rdsk/bootdg/rootvol / ufs 1 no nologging
    /dev/vx/dsk/bootdg/usr /dev/vx/rdsk/bootdg/usr /usr ufs 1 no -
    /dev/vx/dsk/bootdg/var /dev/vx/rdsk/bootdg/var /var ufs 1 no -
    /dev/vx/dsk/bootdg/opt /dev/vx/rdsk/bootdg/opt /opt ufs 2 yes -
    swap - /tmp tmpfs - yes -
    #/dev/odm added for support of Oracle access to VxFS
    /dev/odm - /dev/odm odm - no -
    #NOTE: volume rootvol (/) encapsulated partition c0t0d0s0
    #NOTE: volume swapvol (swap) encapsulated partition c0t0d0s1
    #NOTE: volume usr (/usr) encapsulated partition c0t0d0s3
    #NOTE: volume var (/var) encapsulated partition c0t0d0s4
    #NOTE: volume opt (/opt) encapsulated partition c0t0d0s5
    /dev/vx/dsk/dxdbdg/u01 /dev/vx/rdsk/dxdbdg/u01 /u01 vxfs - yes suid
    /dev/vx/dsk/dxdbdg/u02 /dev/vx/rdsk/dxdbdg/u02 /u02 vxfs - yes suid
    /dev/vx/dsk/dxdbdg/u04 /dev/vx/rdsk/dxdbdg/u04 /u04 vxfs - yes suid
    /dev/vx/dsk/dxdbdg/u05 /dev/vx/rdsk/dxdbdg/u05 /u05 vxfs - yes suid
    /dev/vx/dsk/dxdbdg/u06 /dev/vx/rdsk/dxdbdg/u06 /u06 vxfs - yes suid
    Thanks again

  • Can't mount /var/lock at boot time [SOLVED]

    I set up my fstab to mount /tmp /var/run and /var/lock to tmpfs. When I boot my computer /var/lock does not mount correctly. If I use mount -a after boot it mounts. How can I fix this?
    Last edited by namelessone (2010-12-05 01:49:30)

    dmesg doesn't show anything out of the ordinary. During boot I get the message along the lines of "failed to mount /var/lock" (it goes by really fast so I don't remember the exact wording)
    fstab says:
    tmpfs /var/lock tmpfs defaults,nodev,nosuid,noexec,mode=1777,size=10m 0 0
    tmpfs /var/run tmpfs defaults,nodev,nosuid,noexec,mode=0755,size=10m 0 0
    /dev/mapper/vol-var /var jfs defaults, noatime 0 1
    Last edited by namelessone (2010-12-04 19:57:18)

  • [SOLVED] Mounting /tmp as a ramdisk with systemd

    Hi, how would one go about setting up /tmp to be a ramdisk when using systemd?  (I'm entirely new to systemd, but since Arch is switching to it I guess I need to learn it.)  With rc.sysinit it was simple; I just added a call to "mount" early on in the script.
    Last edited by jlindgren (2012-08-28 00:16:56)

    jlindgren wrote:There was some reason I was mounting it earlier on than it would have been from /etc/fstab with initscripts -- but I can't remember what that reason was.   Possibly it would not even matter for systemd; anyway, I'll try it.  Thanks.
    If you really need it early you should add a hook for the initrd and rebuild it. (similar to the usr-hook I think)
    Last edited by progandy (2012-08-27 23:16:31)

  • Separate /var resiserfs partition on usb drive won't mount on boot

    It has mounted successfully a few times.  I set it up because I don't want /var on my Revodrive, and I've added a label (var) to the partition.  I've tried mounting at first by UUID, then label, then strictly by dev (which isn't an option considering the number of block devices I have attached at any given time).
    I have to manually mount var afterward, and this causes all sorts of hal problems with KDE, such as not being able to see my hard drives in Dolphin.
    Any ideas?  I have another mechanical HDD that I'm going to be using as a download drive, so I could locate var there if needed.
    Here is my daemons array in rc.con:
    DAEMONS=(dbus hal network rpcbind nfs-common syslog-ng samba sshd alsa sensors netfs)
    and fstab
    devpts /dev/pts devpts defaults 0 0
    shm /dev/shm tmpfs nodev,nosuid 0 0
    /dev/mapper/sil_bgbgdjaddicbp1 / ext4 defaults,noatime 0 1
    /dev/mapper/sil_bgbgdjaddicbp2 /home ext4 defaults,noatime 0 1
    UUID=31061fe9-f3de-40d3-93da-c0fce7ed5014 /boot ext2 defaults 0 0
    #UUID=7fb98876-0e33-44b8-90e4-f2a103dd0166 /var reiserfs defaults 0 0
    /dev/disk/by-label/var /var reiserfs defaults,noatime 0 0
    none /tmp tmpfs nodev,nosuid,noatime,size=1000M,mode=1777 0 0
    shm /dev/shm tmpfs nodev,nosuid,size=6G 0 0
    Last edited by DarksideEE7 (2010-12-23 10:16:59)

    stqn wrote:Someone will probably come up with a better solution, and I don't even know if that will fix your problem, but you could try adding "usb" to the beginning to the HOOKS line in /etc/mkinitcpio.conf. I think it is needed to be able to boot from a usb disk. (You'll have to run "mkinitcpio -p kernel26" afterwards.)
    That makes sense.  I actually prefer using the sata drive as /var, but I was just interested as to why it wasn't mounting. 
    BTW I have GRUB and boot installed on the same USB drive (from which I boot), then it mounts the root and home partitions on my OCZ Revodrive.  This drive is essentially fakeraid with an sil satalink controller, and I was never able to get grub installed on the dmraid setup.  I just gave up.  It actually works quite well though.

  • Recover /var mount-point into new boot environment

    I installed Solaris 10 u7 with zfs pool containing / mount-point (root)
    One issue to mention is that - for no compulsory reason - I asked Solaris installer to place /var mount point into different file system (an option of the installer which I did not fully understood)
    I used Live Upgrade to migrate Solaris 10 u7 to U8. First:
    lucreate -c CBE - n NBE
    I assume NBE boot environment was created in the zfs pool (rpool)
    I did not take care of /var at this time.
    I did luupgrade - to apply new Update 8 into NBE - the target boot environment.
    Then did luactivate NBE and "init 6" to reboot.
    At boot time Solaris does start NBE (Solaris 10 U8) - but cannot mount /var - hence forces console into
    Maintenance Mode.
    What is the strategy to use the /var file-system from CBE (old boot environment) ?
    Can I mount file-system of old CBE /var ?
    Or should I mount a spare file system as NBE /var and somehow copy it?
    Please enlist a series of steps (commands), thanks.

    I reinstalled Solaris 10 Update7 - this time with / (root) and /var on same dataset (file system).
    This time lucreate and "luupgrade to Update 8" and luactivate ended OK
    (no problems with mounting /var after "init 6" reboot)

  • Mounting existing directory as a ramdisk

    I get bored in class.
    For most people, this means browsing facebook, but I couldn't care less about that. Since my laptop has minimal graphics abilities, I've reverted to playing games in Dosbox. Problem: Nobody cared about power consumption in that era and those games tend to keep the hard drive spun up. This burns up my battery.
    Eventually I'll get an SSD, but in the mean time I realized that the whole DOS C: drive is so small I could just mount it in a ramdisk. But then I would have to mount the ramdisk in some other directory, copy everything over, edit dosbox.conf, and then copy it back when I'm done.
    So wouldn't it be cool if you could just remount an existing directory as a ramdisk, and have all its original contents automatically coppied to ram and then coppied back to the hard drive when you unmount it? Wouldn't that also be handy for your firefox profile, and other stuff that expects things to be in a specific directory? Anyone know an easy way to do this?

    See profile-sync-daemon and anything-sync-daemon by graysky.
    Edit: @graysky: If you had waited 10 seconds, you could have avoided the shameless self-promotion...
    Last edited by alphaniner (2013-03-18 20:17:59)

  • [solved] Setting up a "persistent" ramdisk with systemd

    I have been doing much thinking in terms of using a ramdisk (tmpfs) to mitigate, or rather postpone SSD write limit issues as well as to enhance system performance. After following the steps described in the Ramdisk wiki page to no avail, I realized I have a systemd setup. I have also found another topic describing how to "hack" init scripts into the systemd build but I am not sure this is the "right" (or most elegant) way. Essentially I would like to move/copy several folders to a ramdisk and have its contents written back to disk after system suspend/shutdown. Just general guidelines would suffice!
    (1) How should I go about setting up a "persistent" ramdisk with systemd? How would I setup "before" and "after" hooks?
    (2) From what I have gathered so far, it appears that for the above, using rsync rather than cp would be a more efficient way to write ramdisk contents to disk. Is this true?
    (3) The example described in the Ramdisk wiki page loads pacman cache and lib into a ramdisk. How about completely putting /var to a ramdisk?
    (4) Will doing what I have described above (including /var) possibly leave my system in an inconsistent state?
    I am trying to get this running on a computer with 8 GB of RAM on which memory usage rarely goes above 2 GB. I am not too worried about power failures as what I intend to put on the ramdisk is not mission critical (with the possible exception of /var).
    I apologize in advance if I posted my concerns in the wrong subforum as I am both a Linux rookie and an Arch noob; I have also tried using the search function but I may have formulated my query improperly (the answers seemed irrelevant!) Thanks in advance for your time and please let me know if I have omitted important details.
    Last edited by ndejay (2012-10-31 13:50:02)

    #create 'ramdisksave' directory using terminal
    mkdir /home/ramdisksave
    #edit grub config or custom_40. This allocates max ram for ramdisks
    kernel /vmlinuz ramdisk_size=2048000
    #edit rc.local add these lines to create & mount ramdisk at boot
    mke2fs -t ext2 /dev/ram1 2048000
    mount /dev/ram1 /home/ramdisksave
    #copies 'ramdisksave' contents to ramdisk save as *.sh make exe!
    cp -a /home/ramdisksave/.  /mnt/ram1
    #saves ramdisk contents to ramdisksave folder save as *.sh make exe!
    cp -a /mnt/ram1/.  /home/ramdisksave/
    #deletes ramdisk contents save as *.sh make exe!
    cd /mnt && rm -rf ram1/*
    #deletes ramdisksave contents save as *.sh make exe! DANGEROUS!!
    cd /home && rm -rf ramdisksave/*
    for safety better to create ramdisksave on another partition.  Scripts can be crontabbed, can add tar compression options to save space, use rsync to copy only  new etc etc.......script lines can be added to r.sysinit for startup and rc.shutdown for load and save at startup and shutdown.
    Last edited by st.emsee (2013-06-22 11:23:44)

  • /var partition seems to be corrupted

    hi everyone,
    not wanting to necrobump an ancient thread on this i thought i'd create a new post.
    when i booted up today, i was greeted with quite a few failed entries in my bootsplash. gdm wouldn't run, but a login on tty2 worked. seems that my /var partition (seperate partition on sdb, / is on sda) is throwing i/o errors and is mounted read-only.
    is there a way i can move all the files from sdb to sda (or another partition - hdd space shouldn't be a problem, i have plenty), and then change my fstab to reflect the new mountpoint? do i even need to copy the contents of /var or can i somehow just recreate the directory structure and point fstab to a different location?
    in case its relevant, i also use deja dup to backup /var/pacman/cache to a seperate location (sdd i think). i may be able to recreate pacman's cache once i manage to mount /var somewhere that works.
    im on a different system now and i have to go to work in a bit, so i can only post further details later today or tomorrow, but i'd be grateful for any tips or hints as to how to proceed here.
    thanks a bunch!
    regards,
    M.

    so... turns out i wasn't smart, fast or lucky enough. im able to boot and everything seems to work somewhat, but being that pacman's pretty useless without /var it seems i have to reinstall.
    i only kept regular backups of /var/cache/pacman/ and the partition (i was trying out bcache with it, worked pretty well too) i saved it to seems to be acting up also.
    is there anything particular i should be aware of when reinstalling? i'll make sure to back up / first, but i'm guessing i wont be needing it as i assume i'll be reinstalling everything from scratch.
    does anyone else have experience reinstalling arch?
    regards,
    M.
    Last edited by miles969 (2014-07-29 18:08:42)

  • Var on different drive

    Hello,
    Given a configuration with 4 internal drives, is there a reason not to create and mount /var on a different drive? Is there any requirement that /var be on the same physical drive as / or just that it be mount-able?
    For example, if the root filesystem and swap are mirrored on disk0 and disk1, is there a reason not to create /home and /var on mirrored slices of disk2 and disk3?

    There is no requirement for /var to be on the same physical drive as /. However if you are mirroring /. It might be a good thing to mirror /var too, since it has important information. Information about patching, pkging etc are kept in /var/sadm. Also keeping it on the same drive makes it easy to live upgrade..though Live upgrade supports /var on different file systems. /export/home could very well be on a separate disk.

  • [Solved] systemd and fstab with /var bind

    I'm having some troubles migrating to systemd. I have the following in my fstab:
    # /etc/fstab: static file system information
    # <file system> <dir>   <type>  <options>       <dump>  <pass>
    tmpfs           /tmp    tmpfs   nodev,nosuid,size=8G    0       0
    UUID=2bedbb1a-015f-4c46-ab48-f3ffc55b154b /boot ext2 defaults 0 1
    #UUID=2c5f02a3-c8a1-45ed-92f4-dc09e56c09d7 /var ext4 discard,noatime 0 1
    UUID=2c5f02a3-c8a1-45ed-92f4-dc09e56c09d7 /mnt/mythtv ext4 discard,noatime 0 1
    UUID=910898cb-2d67-4689-ba51-358d94b2531d swap swap defaults 0 0
    UUID=cac6ccea-456a-4c09-a1db-57cec02b238d / ext4 discard,noatime 0 1
    /dev/mapper/VolGroupArray-lvmedia /mnt/media ext4 auto 0 0
    mnt/media/var /var bind defaults,bind 0 0
    (/dev/sda is an ssd disk so I decided to move /var to my software raid and lvm disks)
    However this doesn't seem to work anymore with systemd as it doesn't get mounted automatically anymore. I've setup a debug console, there I can mount it by simply typing mount /var and then I can manually start the services that failed.
    didn't actually solve the bind stuff, but decided to make a new partition on the lvm disk and mount /var there.
    Last edited by blahbla77 (2012-11-18 13:58:13)

    Are you really missing a leading / from the last line?

  • GDM no logging to /var/log complains

    I have a simple warning coming up:
    gdm-binary[pidnum]: WARNING: gdn_config_parse: Logdir /var/log/gdm does not exist or isn't a directory. Using ServAuthDir /var/lib/gdm
    Now if I create that directory and restart gdm everyone is happy. But since I use tmpfs to mount /var/log - Its a netbook, I dont want to log the drive to death ;-) it complains everytime it boots. I wouldnt mind if it went ahead and created its logdir but for some reason it doesnt.
    Is there anyway to stop gdm from even writing logs? syslog isnt running as a demon on the box.
    Thanks,

    I am using the innitab method
    the line is :
    x:5:respawn:/usr/sbin/gdm -nodaemon
    I could dump all output to /dev/null but thats ugly. I'd rather get rid of the loggin entirely

  • Move /var/log to HDD from SSD

    Hi guys
    I just installed arch for the first time and made the mistake of having /var/log on my SSD. How do I "move" it to my HDD? Someone on #archlinux told me to symlink it but I don't know how to do that in a way so the logs get written directly to the HDD but not the SSD.
    Any ideas?

    I didn't much care when I set this box up about /var being on my SSD, but now I've been wondering. So, having had experience with moving filesystems in the past (/usr, /tmp, ...) on running machines I figured /var wouldn't be much problem. Here is what I did:
    First, I dual boot and the 2 HDD's are setup in RAID0 and are for local misc. storage so it was setup in only 2 partitions, 1 1GB one for Linux swap, and 1 massive partition for everything else. That big partition is for my misc. Windows stuff, so it's NTFS and unusable for the purpose at hand. I simply used GParted to slice off a 4GB piece at the end of the drive. This is what I will be using for /var.
    I then made a directory under / named 'var.tmp' (ie: /var.tmp). This I used for a temporary mount point for my new /var partition. I also edited my /etc/fstab to add in the new partition and mount point, ie: /dev/mapper/pdc_bggaahdef3 /var ext4 defaults,user_xattr,noatime 0 1
    From here I mounted the new partition on /var.tmp and ran the following command chain:
    cp -av /var/* /var.tmp && umount /dev/mapper/pdc_bggaahdef3 && mv /var /var.old && mkdir /var && mount /var
    So as fast as possible I'm copying the current contents of /var onto the new drive (using the archive flag which retains all permissions, symlinks, etc), unmounting that new drive (for later remounting), moving the current /var to /var.old (in case something bad happens or gets missed I can revert back), and finally re-making the /var directory and mounting the new drive.
    I did restart a few services just in case as I don't want to reboot at the moment, and confirmed via /var/run and /var/run/daemons that processes are still keeping track of themselves, and also /var/log is logging current events. The system seems happy, but any quirks encounted should be fixable by a reboot so everything can properly refresh.
    If you already have a mount on a HDD that you're using under Linux, instead of making a dedicated partition just for /var as I did, you could (as suggested) use the symlink method. This is basically just mv'ing /var to that partition and then ln -s /new/location/of/var /var
    Hope this helps!

  • Root copied at ~/mounted. How? And how to remove safely?

    My root is located on a btrfs volume labeled "aroot" in subvolume "aroot/arch". My user directory (~) is located on the volume "raid1" in subvolume "raid1/nstgc5". I noticed this when my daily back up script was copying way too much, which is a different issue (my OS installation should not be 22 GB), and found that indeed it was copying from the subvolume, not / since only those thing which are in the subvolume are present on ~/mounted.
    My first thing to check was /etc/fstab. Nope, nothing there.
    Next I searched through 5000 lines of journalctl for "mounted" but found only two instances and neither of them were related.
    After that I checked my snapshots to confirm that (1) it was not present yesterday and (2) if the snapshot also has this "copy" of my arch installation, which is not quite the same as /. Both turned out to be "yes" in the sense that this is a new thing since yesterday's run of the back up script (which runs btrfs sub snap and rsync), and that I have a second copy of my arch installation.
    And lastly, I ran "cat /var/log/pacman.log | tail" and compared it to "cat ~/mounted/var/log/pacman.log |tail". What this shows is that it is a copy, and not any sort of reflink, hardlink or what not. Or at least that's what I think.
    My two questions are then, how did this happen, and what is a safe way to fix it?

    First of all I really dont understand people who insert any NOT compatible cards into the slot and dont check the slot properties.
    You can damage the slot using a not compatible card!
    Why didnt you check the user manual which is always preinstalled on your notebook?
    There are all details about the compatible cards.
    However, I really dont know if you will be able to remove the inserted card but maybe you could use tiny pair of tweezers
    Note; don't open the notebook. This would cancel the warranty. The best solution is to ask the notebook technician for the help...
    good luck

  • Ramdisk size wrong

    Hello,
    i'm trying to create a little ramdisk to store temporary data
    because such data is updated very quickly and i want to reduce
    disk writes.
    I have created and mounted the ramdisk using these commands:
    - ramdiskadm -a bmondisk 512K
    - mount -F tmpfs /dev/ramdisk/bmondisk /ramfs
    While "ramdiskadm" command reports the expected data:
    Block Device Size Removable
    /dev/ramdisk/bmondisk 524288 Yes
    Executing "df -h /ramfs" shows the following:
    Filesystem size used avail capacity Mounted on
    /dev/ramdisk/bmondisk 2.2G 72K 2.2G 1% /ramfs
    Why the size isn't 512k but 2.2G ??
    My host is an Ultra60 (2 x 300mhz) with 2gb of ram running solaris 9
    with all the latest patches installed (i had run smpatch even this morning).
    Thanks in advance for any help!!
    Roberto

    This may not be what you want, but I managed to mount a ramdisk as the root /.
    I was not interested to tried setting up such an array, as it seems to me that the ramdisk method is more flexible than the array method. By flexibility, I mean that the size of the ramdisk can be changed between reboots, but the array cannot -- I don't think that an array can be expanded or shrinked once created. Also, the disk is not needed to be accessed once the ramdisk is ready; and you can choose what folders of the root hierarchy to be copied into RAM.

Maybe you are looking for